Commit ba67b510035141bd89b40bf65efa0a79834311ca
Committed by
David S. Miller
1 parent
dc8eaaa006
Exists in
master
and in
13 other branches
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). Signed-off-by: Ivan Vecera <ivecera@redhat.com> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
drivers/net/ethernet/broadcom/tg3.c
... | ... | @@ -12286,7 +12286,9 @@ |
12286 | 12286 | if (tg3_flag(tp, MAX_RXPEND_64) && |
12287 | 12287 | tp->rx_pending > 63) |
12288 | 12288 | tp->rx_pending = 63; |
12289 | - tp->rx_jumbo_pending = ering->rx_jumbo_pending; | |
12289 | + | |
12290 | + if (tg3_flag(tp, JUMBO_RING_ENABLE)) | |
12291 | + tp->rx_jumbo_pending = ering->rx_jumbo_pending; | |
12290 | 12292 | |
12291 | 12293 | for (i = 0; i < tp->irq_max; i++) |
12292 | 12294 | tp->napi[i].tx_pending = ering->tx_pending; |