xsk: align xdp socket batch size with dpdk
Subsystems (3)
PATCH 1/1 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 increase performance.
--- net/xdp/xsk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/xdp/xsk.c +1 -1
@@ -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);
Signature · 1 line
1.7.1
Quoted 8 lines · Li RongQing
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.
My apologies for the delay RongQing. I forgot to ack this for some reason. Your suggestion makes sense and will improve performance in other cases too. Thank you.
Quoted 21 lines
Signed-off-by Li RongQing <[email protected]>--- net/xdp/xsk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)net/xdp/xsk.c +1
-2@@ -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
This patch was applied to bpf/bpf-next.git (refs/heads/master):
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
Quoted 9 lines · On Wed, 14 Apr 2021 13:39:12 +0800 you wrote:
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.
[...]
Here is the summary with links:
- xsk: align xdp socket batch size with dpdk
https://git.kernel.org/bpf/bpf-next/c/e7a1c1300891
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html