All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Kurt Kanzenbach <kurt@linutronix.de>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Sriram Yagnaraman <sriram.yagnaraman@ericsson.com>,
	Benjamin Steinke <benjamin.steinke@woks-audio.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	<intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
	<bpf@vger.kernel.org>,
	Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Subject: Re: [PATCH iwl-next v6 0/6] igb: Add support for AF_XDP zero-copy
Date: Fri, 16 Aug 2024 14:17:03 +0200	[thread overview]
Message-ID: <Zr9DP5Dr+IRYESD+@boxer> (raw)
In-Reply-To: <20240711-b4-igb_zero_copy-v6-0-4bfb68773b18@linutronix.de>

On Fri, Aug 16, 2024 at 11:23:59AM +0200, Kurt Kanzenbach wrote:
> This is version 6 of the AF_XDP zero-copy support for igb. Since Sriram's
> duties changed I am sending this instead. Additionally, I've tested this on
> real hardware, Intel i210 [1].
> 
> Changes since v5:
> 
>  - Rebase to 6.11
>  - Fix set-but-unused variable warnings
>  - Split first patches (Maciej)
>  - Add READ/WRITE_ONCE() for xsk_pool and xdp_prog (Maciej)
>  - Add synchronize_net() (Maciej)
>  - Remove IGB_RING_FLAG_AF_XDP_ZC (Maciej)
>  - Add NETDEV_XDP_ACT_XSK_ZEROCOPY to last patch (Maciej)
>  - Update Rx ntc handling (Maciej)
>  - Move stats update and xdp finalize to common functions (Maciej)
>  - "Likelyfy" XDP_REDIRECT case (Maciej)
>  - Check Tx disabled and carrier in igb_xmit_zc() (Maciej)
>  - RCT (Maciej)
>  - Link to v5: https://lore.kernel.org/r/20240711-b4-igb_zero_copy-v5-0-f3f455113b11@linutronix.de

I'll go through the set on monday.
Thanks!

> 
> Changes since v4:
> 
>  - Rebase to v6.10
>  - Fix issue reported by kernel test robot
>  - Provide napi_id for xdp_rxq_info_reg() so that busy polling works
>  - Set olinfo_status in igb_xmit_zc() so that frames are transmitted
> 
> Link to v4: https://lore.kernel.org/intel-wired-lan/20230804084051.14194-1-sriram.yagnaraman@est.tech/
> 
> [1] - https://github.com/Linutronix/TSN-Testbench/tree/main/tests/busypolling_i210
> 
> Original cover letter:
> 
> The first couple of patches adds helper funcctions to prepare for AF_XDP
> zero-copy support which comes in the last couple of patches, one each
> for Rx and TX paths.
> 
> As mentioned in v1 patchset [0], I don't have access to an actual IGB
> device to provide correct performance numbers. I have used Intel 82576EB
> emulator in QEMU [1] to test the changes to IGB driver.
> 
> The tests use one isolated vCPU for RX/TX and one isolated vCPU for the
> xdp-sock application [2]. Hope these measurements provide at the least
> some indication on the increase in performance when using ZC, especially
> in the TX path. It would be awesome if someone with a real IGB NIC can
> test the patch.
> 
> AF_XDP performance using 64 byte packets in Kpps.
> Benchmark:	XDP-SKB		XDP-DRV		XDP-DRV(ZC)
> rxdrop		220		235		350
> txpush		1.000		1.000		410
> l2fwd 		1.000		1.000		200
> 
> AF_XDP performance using 1500 byte packets in Kpps.
> Benchmark:	XDP-SKB		XDP-DRV		XDP-DRV(ZC)
> rxdrop		200		210		310
> txpush		1.000		1.000		410
> l2fwd 		0.900		1.000		160
> 
> [0]: https://lore.kernel.org/intel-wired-lan/20230704095915.9750-1-sriram.yagnaraman@est.tech/
> [1]: https://www.qemu.org/docs/master/system/devices/igb.html
> [2]: https://github.com/xdp-project/bpf-examples/tree/master/AF_XDP-example
> 
> v3->v4:
> - NULL check buffer_info in igb_dump before dereferencing (Simon Horman)
> 
> v2->v3:
> - Avoid TX unit hang when using AF_XDP zero-copy by setting time_stamp
>   on the tx_buffer_info
> - Fix uninitialized nb_buffs (Simon Horman)
> 
> v1->v2:
> - Use batch XSK APIs (Maciej Fijalkowski)
> - Follow reverse xmas tree convention and remove the ternary operator
>   use (Simon Horman)
> 
> ---
> Sriram Yagnaraman (6):
>       igb: Always call igb_xdp_ring_update_tail() under Tx lock
>       igb: Remove static qualifiers
>       igb: Introduce igb_xdp_is_enabled()
>       igb: Introduce XSK data structures and helpers
>       igb: Add AF_XDP zero-copy Rx support
>       igb: Add AF_XDP zero-copy Tx support
> 
>  drivers/net/ethernet/intel/igb/Makefile   |   2 +-
>  drivers/net/ethernet/intel/igb/igb.h      |  36 +-
>  drivers/net/ethernet/intel/igb/igb_main.c | 232 ++++++++----
>  drivers/net/ethernet/intel/igb/igb_xsk.c  | 561 ++++++++++++++++++++++++++++++
>  4 files changed, 770 insertions(+), 61 deletions(-)
> ---
> base-commit: e7d731326ef0622f103e5ed47d3405f71cdcd7f6
> change-id: 20240711-b4-igb_zero_copy-bb70a31ecb0f
> 
> Best regards,
> -- 
> Kurt Kanzenbach <kurt@linutronix.de>
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Kurt Kanzenbach <kurt@linutronix.de>
Cc: Jesper Dangaard Brouer <hawk@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Sriram Yagnaraman <sriram.yagnaraman@est.tech>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Richard Cochran <richardcochran@gmail.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Sriram Yagnaraman <sriram.yagnaraman@ericsson.com>,
	Benjamin Steinke <benjamin.steinke@woks-audio.com>,
	Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org, Tony Nguyen <anthony.l.nguyen@intel.com>,
	intel-wired-lan@lists.osuosl.org,
	Jakub Kicinski <kuba@kernel.org>,
	bpf@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v6 0/6] igb: Add support for AF_XDP zero-copy
Date: Fri, 16 Aug 2024 14:17:03 +0200	[thread overview]
Message-ID: <Zr9DP5Dr+IRYESD+@boxer> (raw)
In-Reply-To: <20240711-b4-igb_zero_copy-v6-0-4bfb68773b18@linutronix.de>

On Fri, Aug 16, 2024 at 11:23:59AM +0200, Kurt Kanzenbach wrote:
> This is version 6 of the AF_XDP zero-copy support for igb. Since Sriram's
> duties changed I am sending this instead. Additionally, I've tested this on
> real hardware, Intel i210 [1].
> 
> Changes since v5:
> 
>  - Rebase to 6.11
>  - Fix set-but-unused variable warnings
>  - Split first patches (Maciej)
>  - Add READ/WRITE_ONCE() for xsk_pool and xdp_prog (Maciej)
>  - Add synchronize_net() (Maciej)
>  - Remove IGB_RING_FLAG_AF_XDP_ZC (Maciej)
>  - Add NETDEV_XDP_ACT_XSK_ZEROCOPY to last patch (Maciej)
>  - Update Rx ntc handling (Maciej)
>  - Move stats update and xdp finalize to common functions (Maciej)
>  - "Likelyfy" XDP_REDIRECT case (Maciej)
>  - Check Tx disabled and carrier in igb_xmit_zc() (Maciej)
>  - RCT (Maciej)
>  - Link to v5: https://lore.kernel.org/r/20240711-b4-igb_zero_copy-v5-0-f3f455113b11@linutronix.de

I'll go through the set on monday.
Thanks!

> 
> Changes since v4:
> 
>  - Rebase to v6.10
>  - Fix issue reported by kernel test robot
>  - Provide napi_id for xdp_rxq_info_reg() so that busy polling works
>  - Set olinfo_status in igb_xmit_zc() so that frames are transmitted
> 
> Link to v4: https://lore.kernel.org/intel-wired-lan/20230804084051.14194-1-sriram.yagnaraman@est.tech/
> 
> [1] - https://github.com/Linutronix/TSN-Testbench/tree/main/tests/busypolling_i210
> 
> Original cover letter:
> 
> The first couple of patches adds helper funcctions to prepare for AF_XDP
> zero-copy support which comes in the last couple of patches, one each
> for Rx and TX paths.
> 
> As mentioned in v1 patchset [0], I don't have access to an actual IGB
> device to provide correct performance numbers. I have used Intel 82576EB
> emulator in QEMU [1] to test the changes to IGB driver.
> 
> The tests use one isolated vCPU for RX/TX and one isolated vCPU for the
> xdp-sock application [2]. Hope these measurements provide at the least
> some indication on the increase in performance when using ZC, especially
> in the TX path. It would be awesome if someone with a real IGB NIC can
> test the patch.
> 
> AF_XDP performance using 64 byte packets in Kpps.
> Benchmark:	XDP-SKB		XDP-DRV		XDP-DRV(ZC)
> rxdrop		220		235		350
> txpush		1.000		1.000		410
> l2fwd 		1.000		1.000		200
> 
> AF_XDP performance using 1500 byte packets in Kpps.
> Benchmark:	XDP-SKB		XDP-DRV		XDP-DRV(ZC)
> rxdrop		200		210		310
> txpush		1.000		1.000		410
> l2fwd 		0.900		1.000		160
> 
> [0]: https://lore.kernel.org/intel-wired-lan/20230704095915.9750-1-sriram.yagnaraman@est.tech/
> [1]: https://www.qemu.org/docs/master/system/devices/igb.html
> [2]: https://github.com/xdp-project/bpf-examples/tree/master/AF_XDP-example
> 
> v3->v4:
> - NULL check buffer_info in igb_dump before dereferencing (Simon Horman)
> 
> v2->v3:
> - Avoid TX unit hang when using AF_XDP zero-copy by setting time_stamp
>   on the tx_buffer_info
> - Fix uninitialized nb_buffs (Simon Horman)
> 
> v1->v2:
> - Use batch XSK APIs (Maciej Fijalkowski)
> - Follow reverse xmas tree convention and remove the ternary operator
>   use (Simon Horman)
> 
> ---
> Sriram Yagnaraman (6):
>       igb: Always call igb_xdp_ring_update_tail() under Tx lock
>       igb: Remove static qualifiers
>       igb: Introduce igb_xdp_is_enabled()
>       igb: Introduce XSK data structures and helpers
>       igb: Add AF_XDP zero-copy Rx support
>       igb: Add AF_XDP zero-copy Tx support
> 
>  drivers/net/ethernet/intel/igb/Makefile   |   2 +-
>  drivers/net/ethernet/intel/igb/igb.h      |  36 +-
>  drivers/net/ethernet/intel/igb/igb_main.c | 232 ++++++++----
>  drivers/net/ethernet/intel/igb/igb_xsk.c  | 561 ++++++++++++++++++++++++++++++
>  4 files changed, 770 insertions(+), 61 deletions(-)
> ---
> base-commit: e7d731326ef0622f103e5ed47d3405f71cdcd7f6
> change-id: 20240711-b4-igb_zero_copy-bb70a31ecb0f
> 
> Best regards,
> -- 
> Kurt Kanzenbach <kurt@linutronix.de>
> 
> 

  parent reply	other threads:[~2024-08-16 12:17 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-16  9:23 [PATCH iwl-next v6 0/6] igb: Add support for AF_XDP zero-copy Kurt Kanzenbach
2024-08-16  9:23 ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-16  9:24 ` [PATCH iwl-next v6 1/6] igb: Always call igb_xdp_ring_update_tail() under Tx lock Kurt Kanzenbach
2024-08-16  9:24   ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-16  9:38   ` Sebastian Andrzej Siewior
2024-08-16  9:38     ` [Intel-wired-lan] " Sebastian Andrzej Siewior
2024-08-16  9:56     ` Kurt Kanzenbach
2024-08-16  9:56       ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-19 13:07   ` Maciej Fijalkowski
2024-08-19 13:07     ` [Intel-wired-lan] " Maciej Fijalkowski
2024-08-19 14:21     ` Kurt Kanzenbach
2024-08-19 14:21       ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-16  9:24 ` [PATCH iwl-next v6 2/6] igb: Remove static qualifiers Kurt Kanzenbach
2024-08-16  9:24   ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-19 13:10   ` Maciej Fijalkowski
2024-08-19 13:10     ` [Intel-wired-lan] " Maciej Fijalkowski
2024-08-19 14:23     ` Kurt Kanzenbach
2024-08-19 14:23       ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-16  9:24 ` [PATCH iwl-next v6 3/6] igb: Introduce igb_xdp_is_enabled() Kurt Kanzenbach
2024-08-16  9:24   ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-19 13:11   ` Maciej Fijalkowski
2024-08-19 13:11     ` [Intel-wired-lan] " Maciej Fijalkowski
2024-08-16  9:24 ` [PATCH iwl-next v6 4/6] igb: Introduce XSK data structures and helpers Kurt Kanzenbach
2024-08-16  9:24   ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-19 13:19   ` Maciej Fijalkowski
2024-08-19 13:19     ` [Intel-wired-lan] " Maciej Fijalkowski
2024-08-19 13:41     ` Kurt Kanzenbach
2024-08-19 13:41       ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-19 14:10       ` Maciej Fijalkowski
2024-08-19 14:10         ` [Intel-wired-lan] " Maciej Fijalkowski
2024-08-19 14:27         ` Kurt Kanzenbach
2024-08-19 14:27           ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-19 19:34         ` Sriram Yagnaraman
2024-08-19 19:34           ` [Intel-wired-lan] " Sriram Yagnaraman
2024-08-20 12:24           ` Kurt Kanzenbach
2024-08-20 12:24             ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-20 12:33             ` Fijalkowski, Maciej
2024-08-20 12:33               ` [Intel-wired-lan] " Fijalkowski, Maciej
2024-08-16  9:24 ` [PATCH iwl-next v6 5/6] igb: Add AF_XDP zero-copy Rx support Kurt Kanzenbach
2024-08-16  9:24   ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-19 14:47   ` Maciej Fijalkowski
2024-08-19 14:47     ` [Intel-wired-lan] " Maciej Fijalkowski
2024-08-16  9:24 ` [PATCH iwl-next v6 6/6] igb: Add AF_XDP zero-copy Tx support Kurt Kanzenbach
2024-08-16  9:24   ` [Intel-wired-lan] " Kurt Kanzenbach
2024-08-19 16:30   ` Maciej Fijalkowski
2024-08-19 16:30     ` [Intel-wired-lan] " Maciej Fijalkowski
2024-08-16 12:17 ` Maciej Fijalkowski [this message]
2024-08-16 12:17   ` [Intel-wired-lan] [PATCH iwl-next v6 0/6] igb: Add support for AF_XDP zero-copy Maciej Fijalkowski

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=Zr9DP5Dr+IRYESD+@boxer \
    --to=maciej.fijalkowski@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=ast@kernel.org \
    --cc=benjamin.steinke@woks-audio.com \
    --cc=bigeasy@linutronix.de \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=richardcochran@gmail.com \
    --cc=sriram.yagnaraman@ericsson.com \
    --cc=sriram.yagnaraman@est.tech \
    /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.