xsk: Align XDP socket batch size with DPDK

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 <lirongqing@baidu.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/1618378752-4191-1-git-send-email-lirongqing@baidu.com
This commit is contained in:
Li RongQing 2021-04-14 13:39:12 +08:00 committed by Daniel Borkmann
parent 64ef3ddfa9
commit e7a1c13008

View File

@ -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);