Skip to content

Commit 2bea803

Browse files
committed
libxdp: Print a warning if there are not enough free slots in the dispatcher
Just returning E2BIG with no error message when the dispatcher is full is a bit confusing. Add a warning message to indicate the source of the error. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
1 parent 9059c20 commit 2bea803

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/libxdp/libxdp.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -2928,8 +2928,10 @@ static struct xdp_multiprog *xdp_multiprog__generate(struct xdp_program **progs,
29282928

29292929
num_new_progs += remove_progs ? -num_progs : num_progs;
29302930

2931-
if (num_new_progs > MAX_DISPATCHER_ACTIONS)
2931+
if (num_new_progs > MAX_DISPATCHER_ACTIONS) {
2932+
pr_warn("Not enough free slots in the dispatcher.\n");
29322933
return ERR_PTR(-E2BIG);
2934+
}
29332935

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

0 commit comments

Comments
 (0)