All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/8][pull request] i40e: support XDP multi-buffer
@ 2023-03-06 21:08 Tony Nguyen
  2023-03-06 21:08 ` [PATCH net-next 1/8] i40e: consolidate maximum frame size calculation for vsi Tony Nguyen
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Tony Nguyen @ 2023-03-06 21:08 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet, netdev
  Cc: Tony Nguyen, 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>

The following are changes since commit 5ca26d6039a6b42341f7f5cc8d10d30ca1561a7b:
  Merge tag 'net-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
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

 drivers/net/ethernet/intel/i40e/i40e_main.c  |  78 ++--
 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  |  21 +-
 4 files changed, 307 insertions(+), 232 deletions(-)

-- 
2.38.1


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

end of thread, other threads:[~2023-03-09  2:28 UTC | newest]

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

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.