From: Li RongQing <lirongqing@baidu.com>
To: bpf@vger.kernel.org, magnus.karlsson@intel.com
Subject: [PATCH] xsk: align xdp socket batch size with dpdk
Date: Wed, 14 Apr 2021 13:39:12 +0800 [thread overview]
Message-ID: <1618378752-4191-1-git-send-email-lirongqing@baidu.com> (raw)
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
increase performance.
Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
net/xdp/xsk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index a71ed66..cd62d4b 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);
--
1.7.1
next reply other threads:[~2021-04-14 5:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 5:39 Li RongQing [this message]
2021-04-23 4:51 ` [PATCH] xsk: align xdp socket batch size with dpdk Magnus Karlsson
2021-04-23 8:00 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1618378752-4191-1-git-send-email-lirongqing@baidu.com \
--to=lirongqing@baidu.com \
--cc=bpf@vger.kernel.org \
--cc=magnus.karlsson@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.