netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Xing <kerneljasonxing@gmail.com>
To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, bjorn@kernel.org, magnus.karlsson@intel.com,
	maciej.fijalkowski@intel.com, jonathan.lemon@gmail.com,
	sdf@fomichev.me, ast@kernel.org, daniel@iogearbox.net,
	hawk@kernel.org, john.fastabend@gmail.com, horms@kernel.org,
	andrew+netdev@lunn.ch
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org,
	Jason Xing <kernelxing@tencent.com>
Subject: [PATCH net-next 0/2] xsk: improvement performance in copy mode
Date: Mon, 11 Aug 2025 21:12:34 +0800	[thread overview]
Message-ID: <20250811131236.56206-1-kerneljasonxing@gmail.com> (raw)

From: Jason Xing <kernelxing@tencent.com>

Like in VM using virtio_net, there are not that many machines supporting
advanced function like multi-buffer and zerocopy. Using xsk copy mode
becomes a default choice to support bypass kernel feature instead of
resorting to DPDK.

Prior to this series, zerocopy mode has a better performance than copy
mode. But now, the copy mode outperforms zc mode by 12.9%, which was
tested on ixgbe driver by means of xdpsock.

The thought behind this series is to aggregate packets in a certain
small group like GSO/GRO and then send them at one time by only grabbing
the tx queue and disable bh once.

Jason Xing (2):
  xsk: introduce XDP_GENERIC_XMIT_BATCH setsockopt
  xsk: support generic batch xmit in copy mode

 Documentation/networking/af_xdp.rst |   9 ++
 include/linux/netdevice.h           |   2 +
 include/net/xdp_sock.h              |   2 +
 include/uapi/linux/if_xdp.h         |   1 +
 net/core/dev.c                      |  18 ++++
 net/xdp/xsk.c                       | 135 +++++++++++++++++++++++++++-
 tools/include/uapi/linux/if_xdp.h   |   1 +
 7 files changed, 165 insertions(+), 3 deletions(-)

-- 
2.41.3


             reply	other threads:[~2025-08-11 13:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11 13:12 Jason Xing [this message]
2025-08-11 13:12 ` [PATCH net-next 1/2] xsk: introduce XDP_GENERIC_XMIT_BATCH setsockopt Jason Xing
2025-08-12 16:40   ` Maciej Fijalkowski
2025-08-12 23:46     ` Jason Xing
2025-08-18  6:20   ` Dan Carpenter
2025-08-11 13:12 ` [PATCH net-next 2/2] xsk: support generic batch xmit in copy mode Jason Xing
2025-08-12 14:30   ` Jesper Dangaard Brouer
2025-08-12 17:49     ` Maciej Fijalkowski
2025-08-13  1:02       ` Jason Xing
2025-08-13 13:06         ` Jason Xing
2025-08-15 16:40           ` Jesper Dangaard Brouer
2025-08-16  0:03             ` Jason Xing
2025-08-16 13:42               ` Jason Xing
2025-08-13  0:57     ` Jason Xing
2025-08-15  6:44     ` Jason Xing
2025-08-21 17:29       ` Jesper Dangaard Brouer
2025-08-22  1:13         ` Jason Xing

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=20250811131236.56206-1-kerneljasonxing@gmail.com \
    --to=kerneljasonxing@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=kernelxing@tencent.com \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    /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 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).