[PATCH net-next v2 0/8][pull request] i40e: support XDP multi-buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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@xxxxxxxxx/

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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux