summaryrefslogtreecommitdiffstats
path: root/net/xdp
diff options
context:
space:
mode:
authorLi RongQing <lirongqing@baidu.com>2021-04-14 13:39:12 +0800
committerDaniel Borkmann <daniel@iogearbox.net>2021-04-23 09:50:35 +0200
commite7a1c1300891d8f11d05b42665e299cc22a4b383 (patch)
tree239c0a2641202e83777dfc8e099df0d7e6148446 /net/xdp
parent64ef3ddfa95ebf4606eedd3ec09a838e1c1af341 (diff)
downloadlinux-e7a1c1300891d8f11d05b42665e299cc22a4b383.tar.bz2
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
Diffstat (limited to 'net/xdp')
-rw-r--r--net/xdp/xsk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index a71ed664da0a..cd62d4ba87a9 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -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);