From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2023-02-14 18:52:26
This series contains updates to ixgbe and i40e drivers.
Jason Xing corrects comparison of frame sizes for setting MTU with XDP on
ixgbe and adjusts frame size to account for a second VLAN header on ixgbe
and i40e.
The following are changes since commit 05d7623a892a9da62da0e714428e38f09e4a64d8:
net: stmmac: Restrict warning on disabling DMA store and fwd mode
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 10GbE
Jason Xing (3):
ixgbe: allow to increase MTU to 3K with XDP enabled
i40e: add double of VLAN header when computing the max MTU
ixgbe: add double of VLAN header when computing the max MTU
drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 ++
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 28 +++++++++++--------
3 files changed, 20 insertions(+), 12 deletions(-)
--
2.38.1
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2023-02-14 18:52:28
From: Jason Xing <kernelxing@tencent.com>
Include the second VLAN HLEN into account when computing the maximum
MTU size as other drivers do.
Fixes: 0c8493d90b6b ("i40e: add XDP support for pass and drop actions")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Tested-by: Chandan Kumar Rout <redacted> (A Contingent Worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2023-02-14 18:52:28
From: Jason Xing <kernelxing@tencent.com>
Recently I encountered one case where I cannot increase the MTU size
directly from 1500 to a much bigger value with XDP enabled if the
server is equipped with IXGBE card, which happened on thousands of
servers in production environment. After applying the current patch,
we can set the maximum MTU size to 3K.
This patch follows the behavior of changing MTU as i40e/ice does.
References:
[1] commit 23b44513c3e6 ("ice: allow 3k MTU for XDP")
[2] commit 0c8493d90b6b ("i40e: add XDP support for pass and drop actions")
Fixes: fabf1bce103a ("ixgbe: Prevent unsupported configurations with XDP")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Tested-by: Chandan Kumar Rout <redacted> (A Contingent Worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 25 ++++++++++++-------
1 file changed, 16 insertions(+), 9 deletions(-)
@@ -6788,18 +6800,13 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu){structixgbe_adapter*adapter=netdev_priv(netdev);-if(adapter->xdp_prog){+if(ixgbe_enabled_xdp_adapter(adapter)){intnew_frame_size=new_mtu+ETH_HLEN+ETH_FCS_LEN+VLAN_HLEN;-inti;--for(i=0;i<adapter->num_rx_queues;i++){-structixgbe_ring*ring=adapter->rx_ring[i];-if(new_frame_size>ixgbe_rx_bufsz(ring)){-e_warn(probe,"Requested MTU size is not supported with XDP\n");-return-EINVAL;-}+if(new_frame_size>ixgbe_max_xdp_frame_size(adapter)){+e_warn(probe,"Requested MTU size is not supported with XDP\n");+return-EINVAL;}}
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2023-02-14 18:52:29
From: Jason Xing <kernelxing@tencent.com>
Include the second VLAN HLEN into account when computing the maximum
MTU size as other drivers do.
Fixes: fabf1bce103a ("ixgbe: Prevent unsupported configurations with XDP")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Tested-by: Chandan Kumar Rout <redacted> (A Contingent Worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 ++
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)
@@ -73,6 +73,8 @@#define IXGBE_RXBUFFER_4K 4096#define IXGBE_MAX_RXBUFFER 16384 /* largest size for a single descriptor */+#define IXGBE_PKT_HDR_PAD (ETH_HLEN + ETH_FCS_LEN + (VLAN_HLEN * 2))+/* Attempt to maximize the headroom available for incoming frames. We*usea2Kbufferforreceivesandneed1536/1534tostorethedatafor*theframe.Thisleavesuswith512bytesofroom.Fromthatweneed
@@ -6801,8 +6801,7 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)structixgbe_adapter*adapter=netdev_priv(netdev);if(ixgbe_enabled_xdp_adapter(adapter)){-intnew_frame_size=new_mtu+ETH_HLEN+ETH_FCS_LEN+-VLAN_HLEN;+intnew_frame_size=new_mtu+IXGBE_PKT_HDR_PAD;if(new_frame_size>ixgbe_max_xdp_frame_size(adapter)){e_warn(probe,"Requested MTU size is not supported with XDP\n");
Hello:
This series was applied to netdev/net.git (master)
by Tony Nguyen [off-list ref]:
On Tue, 14 Feb 2023 10:51:43 -0800 you wrote:
This series contains updates to ixgbe and i40e drivers.
Jason Xing corrects comparison of frame sizes for setting MTU with XDP on
ixgbe and adjusts frame size to account for a second VLAN header on ixgbe
and i40e.
The following are changes since commit 05d7623a892a9da62da0e714428e38f09e4a64d8:
net: stmmac: Restrict warning on disabling DMA store and fwd mode
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 10GbE
[...]