qede: Fix internal loopback failure with jumbo mtu configuration
Subsystems (3)
PATCH 1/1 qede: Fix internal loopback failure with jumbo mtu configuration
Driver uses port-mtu as packet-size for the loopback traffic. This patch limits the max packet size to 1.5K to avoid data being split over multiple buffer descriptors (BDs) in cases where MTU > PAGE_SIZE.
Signed-off-by Sudarsana Reddy Kalluru <[email protected]>
Signed-off-by Ariel Elior <[email protected]>
--- drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/ethernet/qlogic/qede/qede_ethtool.c +5 -2
@@ -1654,8 +1654,11 @@ static int qede_selftest_run_loopback(struct qede_dev *edev, u32 loopback_mode)/* Wait for loopback configuration to apply */ msleep_interruptible (500 ); -/* prepare the loopback packet */ - pkt_size = edev->ndev->mtu +ETH_HLEN ; +/* Setting max packet size to 1.5K to avoid data being split over +* multiple BDs in cases where MTU > PAGE_SIZE. +*/ + pkt_size = (((edev->ndev->mtu <ETH_DATA_LEN ) ? + edev->ndev->mtu :ETH_DATA_LEN ) +ETH_HLEN ); skb =netdev_alloc_skb (edev->ndev, pkt_size);if (!skb) {
Signature · 1 line
1.8.3.1
From: Sudarsana Reddy Kalluru <[email protected]>
Date: Thu, 7 Mar 2019 07:56:35 -0800
Quoted 6 lines
Driver uses port-mtu as packet-size for the loopback traffic. This patch limits the max packet size to 1.5K to avoid data being split over multiple buffer descriptors (BDs) in cases where MTU >
PAGE_SIZE.Signed-off-by Sudarsana Reddy Kalluru <[email protected]>Signed-off-by Ariel Elior <[email protected]>
Applied.