i40e: change Rx buffer size for legacy-rx to support XDP multi-buffer
authorTirthendu Sarkar <tirthendu.sarkar@intel.com>
Thu, 9 Mar 2023 18:56:09 +0000 (00:26 +0530)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 9 Mar 2023 21:10:57 +0000 (13:10 -0800)
commitf7f732a7196d2e876639b1af453b30a6a5fe4a90
treeb66a7add924f8a28aff45957c6569b285e0352b3
parenta4ba62906db80246b24408e5c8a9e9d78b647b00
i40e: change Rx buffer size for legacy-rx to support XDP multi-buffer

Adding support for XDP multi-buffer entails adding information of all
the fragments of the packet in the xdp_buff. This approach implies that
underlying buffer has to provide tailroom for skb_shared_info.

In the legacy-rx mode, driver can only configure up to 2k sized Rx buffers
and with the current configuration of 2k sized Rx buffers there is no way
to do tailroom reservation for skb_shared_info. Hence size of Rx buffers
is now lowered to 2048 - sizeof(skb_shared_info). Also, driver can only
chain up to 5 Rx buffers and this means max MTU supported for legacy-rx
is now 8614 (5 * rx_buffer_len  - ETH header with VLAN).

Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_main.c