Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument list too long > 10 programs (MAX_DISPATCHER_ACTIONS ?) #465

Open
Ch4rlus opened this issue Jan 3, 2025 · 1 comment
Open

Argument list too long > 10 programs (MAX_DISPATCHER_ACTIONS ?) #465

Ch4rlus opened this issue Jan 3, 2025 · 1 comment

Comments

@Ch4rlus
Copy link

Ch4rlus commented Jan 3, 2025

Hey,

I have 10 XDP programs loaded on a interface. Trying to load a 11th program generates :

Couldn't attach XDP program on iface 'enp3s0np0': Argument list too long(-7)

I guess this is linked to MAX_DISPATCHER_ACTIONS = 10 and the following condition:
https://github.com/xdp-project/xdp-tools/blob/abff006c6568ba84cff7d88006439506076e4add/lib/libxdp/libxdp.c#L2931C1-L2935C19

#xdp-tools/lib/libxdp/libxdp.c
	if (num_new_progs > MAX_DISPATCHER_ACTIONS)
		return ERR_PTR(-E2BIG);

	pr_debug("Generating multi-prog dispatcher for %zu programs\n",
		 num_new_progs);

May I suggest adding a debug (or error) message to indicate the limit? It would make it easier for the user to understand the error :)

On a side node: Has anyone tried increasing MAX_DISPATCHER_ACTIONS? I imagine there's a good reason for the limit to be low, but I haven't found any discussion about it.

@tohojo
Copy link
Member

tohojo commented Jan 6, 2025

Good point about the error message - we should improve that. How are you loading the programs? Using xdp-loader, or through the libxdp API?

As for the reason for the maximum of 10 programs, well, I picked that somewhat arbitrarily when first writing that code. Didn't really expect anyone to hit the limit as there's a certain element of diminishing returns the more programs you load (performance-wise). What's you use case for loading that many programs? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants