public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/8][pull request] i40e: support XDP multi-buffer
@ 2023-03-09 21:28 Tony Nguyen
  2023-03-09 21:28 ` [PATCH net-next v2 1/8] i40e: consolidate maximum frame size calculation for vsi Tony Nguyen
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Tony Nguyen @ 2023-03-09 21:28 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet, netdev
  Cc: Tony Nguyen, tirthendu.sarkar, maciej.fijalkowski,
	magnus.karlsson, ast, daniel, hawk, john.fastabend, bpf

Tirthendu Sarkar says:

This patchset adds multi-buffer support for XDP. Tx side already has
support for multi-buffer. This patchset focuses on Rx side. The last
patch contains actual multi-buffer changes while the previous ones are
preparatory patches.

On receiving the first buffer of a packet, xdp_buff is built and its
subsequent buffers are added to it as frags. While 'next_to_clean' keeps
pointing to the first descriptor, the newly introduced 'next_to_process'
keeps track of every descriptor for the packet. 

On receiving EOP buffer the XDP program is called and appropriate action
is taken (building skb for XDP_PASS, reusing page for XDP_DROP, adjusting
page offsets for XDP_{REDIRECT,TX}).

The patchset also streamlines page offset adjustments for buffer reuse
to make it easier to post process the rx_buffers after running XDP prog.

With this patchset there does not seem to be any performance degradation
for XDP_PASS and some improvement (~1% for XDP_TX, ~5% for XDP_DROP) when
measured using xdp_rxq_info program from samples/bpf/ for 64B packets.

Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

Changelog:
	v1 -> v2:
	- Make rx_buffer_len dependent on size of skb_shared_info instead
	  of fixed size for legaxy-rx mode [Jakub Kicinski]
	- Add checks to error out when size of skb_shared_info does not
	  match expected size [Jakub Kicinski]

v1: https://lore.kernel.org/netdev/20230306210822.3381942-1-anthony.l.nguyen@intel.com/

The following are changes since commit db47fa2e4cbf180a39d8e6d6170962bd7d82e52d:
  Merge branch 'sctp-add-another-two-stream-schedulers'
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 40GbE

Tirthendu Sarkar (8):
  i40e: consolidate maximum frame size calculation for vsi
  i40e: change Rx buffer size for legacy-rx to support XDP multi-buffer
  i40e: add pre-xdp page_count in rx_buffer
  i40e: Change size to truesize when using i40e_rx_buffer_flip()
  i40e: use frame_sz instead of recalculating truesize for building skb
  i40e: introduce next_to_process to i40e_ring
  i40e: add xdp_buff to i40e_ring struct
  i40e: add support for XDP multi-buffer Rx

 .../net/ethernet/intel/i40e/i40e_ethtool.c    |   7 +
 drivers/net/ethernet/intel/i40e/i40e_main.c   |  88 ++--
 drivers/net/ethernet/intel/i40e/i40e_trace.h  |  20 +-
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 420 ++++++++++--------
 drivers/net/ethernet/intel/i40e/i40e_txrx.h   |  20 +-
 5 files changed, 321 insertions(+), 234 deletions(-)

-- 
2.38.1


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

end of thread, other threads:[~2023-03-14  0:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-09 21:28 [PATCH net-next v2 0/8][pull request] i40e: support XDP multi-buffer Tony Nguyen
2023-03-09 21:28 ` [PATCH net-next v2 1/8] i40e: consolidate maximum frame size calculation for vsi Tony Nguyen
2023-03-09 21:28 ` [PATCH net-next v2 2/8] i40e: change Rx buffer size for legacy-rx to support XDP multi-buffer Tony Nguyen
2023-03-09 21:28 ` [PATCH net-next v2 3/8] i40e: add pre-xdp page_count in rx_buffer Tony Nguyen
2023-03-09 21:28 ` [PATCH net-next v2 4/8] i40e: Change size to truesize when using i40e_rx_buffer_flip() Tony Nguyen
2023-03-09 21:28 ` [PATCH net-next v2 5/8] i40e: use frame_sz instead of recalculating truesize for building skb Tony Nguyen
2023-03-09 21:28 ` [PATCH net-next v2 6/8] i40e: introduce next_to_process to i40e_ring Tony Nguyen
2023-03-09 21:28 ` [PATCH net-next v2 7/8] i40e: add xdp_buff to i40e_ring struct Tony Nguyen
2023-03-09 21:28 ` [PATCH net-next v2 8/8] i40e: add support for XDP multi-buffer Rx Tony Nguyen
2023-03-14  0:10 ` [PATCH net-next v2 0/8][pull request] i40e: support XDP multi-buffer 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