Skip to content

Commit

Permalink
xsk: Align XDP socket batch size with DPDK
Browse files Browse the repository at this point in the history
DPDK default burst size is 32, however, kernel xsk sendto
syscall can not handle all 32 at one time, and return with
error.

So make kernel XDP socket batch size larger to avoid
unnecessary syscall fail and context switch which will help
to increase performance.

Signed-off-by: Li RongQing <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Magnus Karlsson <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
lrq-max authored and borkmann committed Apr 23, 2021
1 parent 64ef3dd commit e7a1c13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/xdp/xsk.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "xdp_umem.h"
#include "xsk.h"

#define TX_BATCH_SIZE 16
#define TX_BATCH_SIZE 32

static DEFINE_PER_CPU(struct list_head, xskmap_flush_list);

Expand Down

0 comments on commit e7a1c13

Please sign in to comment.