* [PATCH net 1/1] qede: Fix internal loopback failure with jumbo mtu configuration
@ 2019-03-07 15:56 Sudarsana Reddy Kalluru
2019-03-07 17:43 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Sudarsana Reddy Kalluru @ 2019-03-07 15:56 UTC (permalink / raw)
To: davem; +Cc: netdev, aelior, mkalderon
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 <skalluru@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index 16331c6..3ec2de4 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
@@ -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) {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net 1/1] qede: Fix internal loopback failure with jumbo mtu configuration
2019-03-07 15:56 [PATCH net 1/1] qede: Fix internal loopback failure with jumbo mtu configuration Sudarsana Reddy Kalluru
@ 2019-03-07 17:43 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-03-07 17:43 UTC (permalink / raw)
To: skalluru; +Cc: netdev, aelior, mkalderon
From: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Date: Thu, 7 Mar 2019 07:56:35 -0800
> 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 <skalluru@marvell.com>
> Signed-off-by: Ariel Elior <aelior@marvell.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-07 17:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 15:56 [PATCH net 1/1] qede: Fix internal loopback failure with jumbo mtu configuration Sudarsana Reddy Kalluru
2019-03-07 17:43 ` David Miller
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.