bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xsk: align xdp socket batch size with dpdk
@ 2021-04-14  5:39 Li RongQing
  2021-04-23  4:51 ` Magnus Karlsson
  2021-04-23  8:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Li RongQing @ 2021-04-14  5:39 UTC (permalink / raw)
  To: bpf, magnus.karlsson

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xsk: align xdp socket batch size with dpdk
  2021-04-14  5:39 [PATCH] xsk: align xdp socket batch size with dpdk Li RongQing
@ 2021-04-23  4:51 ` Magnus Karlsson
  2021-04-23  8:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Magnus Karlsson @ 2021-04-23  4:51 UTC (permalink / raw)
  To: Li RongQing; +Cc: bpf, Karlsson, Magnus

On Wed, Apr 14, 2021 at 2:39 PM Li RongQing <lirongqing@baidu.com> 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.

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.

Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>

> 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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xsk: align xdp socket batch size with dpdk
  2021-04-14  5:39 [PATCH] xsk: align xdp socket batch size with dpdk Li RongQing
  2021-04-23  4:51 ` Magnus Karlsson
@ 2021-04-23  8:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-23  8:00 UTC (permalink / raw)
  To: Li RongQing; +Cc: bpf, magnus.karlsson

Hello:

This patch was applied to bpf/bpf-next.git (refs/heads/master):

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-23  8:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14  5:39 [PATCH] xsk: align xdp socket batch size with dpdk Li RongQing
2021-04-23  4:51 ` Magnus Karlsson
2021-04-23  8:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).