tg3: update rx_jumbo_pending ring param only when jumbo frames are enabled
Subsystems (3)
PATCH 1/1 tg3: update rx_jumbo_pending ring param only when jumbo frames are enabled
The patch fixes a problem with dropped jumbo frames after usage of 'ethtool -G ... rx'.
Scenario:
1. ip link set eth0 up
2. ethtool -G eth0 rx N # <- This zeroes rx-jumbo
3. ip link set mtu 9000 dev eth0
The ethtool command set rx_jumbo_pending to zero so any received jumbo packets are dropped and you need to use 'ethtool -G eth0 rx-jumbo N' to workaround the issue.
The patch changes the logic so rx_jumbo_pending value is changed only if jumbo frames are enabled (MTU > 1500).
--- drivers/net/ethernet/broadcom/tg3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/tg3.c +3 -1
@@ -12286,7 +12286,9 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *eif (tg3_flag (tp,MAX_RXPEND_64 ) && tp->rx_pending >63 ) tp->rx_pending =63 ; - tp->rx_jumbo_pending = ering->rx_jumbo_pending; + +if (tg3_flag (tp,JUMBO_RING_ENABLE )) + tp->rx_jumbo_pending = ering->rx_jumbo_pending;for (i =0 ; i < tp->irq_max; i++) tp->napi[i].tx_pending = ering->tx_pending;
Signature · 1 line
1.8.3.2
Quoted 8 lines · Ivan Vecera
The patch fixes a problem with dropped jumbo frames after usage of 'ethtool -G ... rx'.
Scenario:
1. ip link set eth0 up
2. ethtool -G eth0 rx N # <- This zeroes rx-jumbo
3. ip link set mtu 9000 dev eth0
Quoted 7 lines
The ethtool command set
rx_jumbo_pendingto zero so any received jumbo packets are dropped and you need to use 'ethtool -G eth0 rx-jumbo N' to workaround the issue.
The patch changes the logic sorx_jumbo_pendingvalue is changed only if jumbo frames are enabled (MTU > 1500).Signed-off-by Ivan Vecera <[email protected]>
David Miller
maintainerFrom: Ivan Vecera <[email protected]>
Date: Thu, 17 Apr 2014 14:51:08 +0200
Quoted 8 lines
The patch fixes a problem with dropped jumbo frames after usage of 'ethtool -G ... rx'.
Scenario:
1. ip link set eth0 up
2. ethtool -G eth0 rx N # <- This zeroes rx-jumbo
3. ip link set mtu 9000 dev eth0
Quoted 7 lines
The ethtool command set
rx_jumbo_pendingto zero so any received jumbo packets are dropped and you need to use 'ethtool -G eth0 rx-jumbo N' to workaround the issue.
The patch changes the logic sorx_jumbo_pendingvalue is changed only if jumbo frames are enabled (MTU > 1500).Signed-off-by Ivan Vecera <[email protected]>
Applied and queued up for -stable.