tg3: Fix for disallow tx coalescing time to be 0
Subsystems (3)
PATCH 1/1 tg3: Fix for disallow tx coalescing time to be 0
The recent commit 087d7a8c disallows to set Rx coalescing time to be 0 as this stops generating interrupts for the incoming packets. I found the zero Tx coalescing time stops generating interrupts similarly for outgoing packets and fires Tx watchdog later. To avoid this, don't allow to set Tx coalescing time to 0.
--- drivers/net/ethernet/broadcom/tg3.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/broadcom/tg3.c +1 -0
@@ -14012,6 +14012,7 @@ static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) if ((ec->rx_coalesce_usecs > MAX_RXCOL_TICKS) || (!ec->rx_coalesce_usecs) || (ec->tx_coalesce_usecs > MAX_TXCOL_TICKS) || + (!ec->tx_coalesce_usecs) || (ec->rx_max_coalesced_frames > MAX_RXMAX_FRAMES) || (ec->tx_max_coalesced_frames > MAX_TXMAX_FRAMES) || (ec->rx_coalesce_usecs_irq > max_rxcoal_tick_int) ||
Signature · 1 line
2.7.3
Michael Chan
maintainerQuoted 19 lines · Ivan Vecera
The recent commit
087d7a8cdisallows to set Rx coalescing time to be 0 as this stops generating interrupts for the incoming packets. I found the zero Tx coalescing time stops generating interrupts similarly for outgoing packets and fires Tx watchdog later. To avoid this, don't allow to set Tx coalescing time to 0.Signed-off-by Ivan Vecera <[email protected]>--- drivers/net/ethernet/broadcom/tg3.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/broadcom/tg3.c +0
-0
drivers/net/ethernet/broadcom/tg3.c static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) · line 14018
Quoted 7 lines
drivers/net/ethernet/broadcom/tg3.c +1
-0@@ -14012,6 +14012,7 @@ static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) if ((ec->rx_coalesce_usecs > MAX_RXCOL_TICKS) || (!ec->rx_coalesce_usecs) || (ec->tx_coalesce_usecs > MAX_TXCOL_TICKS) || + (!ec->tx_coalesce_usecs) || (ec->rx_max_coalesced_frames > MAX_RXMAX_FRAMES) || (ec->tx_max_coalesced_frames > MAX_TXMAX_FRAMES) || (ec->rx_coalesce_usecs_irq > max_rxcoal_tick_int) ||
As Rick pointed out last time, we can remove this check which follows the block of code above:
/* No tx interrupts will be generated if both are zero */ if ((ec->tx_coalesce_usecs == 0) &&
(ec->tx_max_coalesced_frames == 0))
return -EINVAL;
Hello.
Quoted 1 line · Ivan Vecera
The recent commit
087d7a8cdisallows to set Rx coalescing time to be 0
You should specify both 12-digit SHA1 and the commit summary enclosed in ("").
Quoted 9 lines
as this stops generating interrupts for the incoming packets. I found the zero Tx coalescing time stops generating interrupts similarly for outgoing packets and fires Tx watchdog later. To avoid this, don't allow to set Tx coalescing time to 0.
Signed-off-by Ivan Vecera <[email protected]>
[...]
MBR, Sergei
Dne 30.8.2016 v 19:52 Sergei Shtylyov napsal(a):
Quoted 13 lines
Hello.
Quoted 1 line · Ivan Vecera
The recent commit
087d7a8cdisallows to set Rx coalescing time to be 0You should specify both 12-digit SHA1 and the commit summary enclosed in ("").
Quoted 5 lines
as this stops generating interrupts for the incoming packets. I found the zero Tx coalescing time stops generating interrupts similarly for outgoing packets and fires Tx watchdog later. To avoid this, don't allow to set Tx coalescing time to 0.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Ivan Vecera <[email protected]>[...]
MBR, Sergei
No problem, Sergei, will post v2.
Dne 30.8.2016 v 17:46 Michael Chan napsal(a):
Quoted 32 lines · Ivan Vecera
Quoted 19 lines
The recent commit
087d7a8cdisallows to set Rx coalescing time to be 0 as this stops generating interrupts for the incoming packets. I found the zero Tx coalescing time stops generating interrupts similarly for outgoing packets and fires Tx watchdog later. To avoid this, don't allow to set Tx coalescing time to 0.Signed-off-by Ivan Vecera <[email protected]>--- drivers/net/ethernet/broadcom/tg3.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/broadcom/tg3.c +0
-0drivers/net/ethernet/broadcom/tg3.c static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) · line 14018
Quoted 7 lines
drivers/net/ethernet/broadcom/tg3.c +1
-0@@ -14012,6 +14012,7 @@ static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) if ((ec->rx_coalesce_usecs > MAX_RXCOL_TICKS) || (!ec->rx_coalesce_usecs) || (ec->tx_coalesce_usecs > MAX_TXCOL_TICKS) || + (!ec->tx_coalesce_usecs) || (ec->rx_max_coalesced_frames > MAX_RXMAX_FRAMES) || (ec->tx_max_coalesced_frames > MAX_TXMAX_FRAMES) || (ec->rx_coalesce_usecs_irq > max_rxcoal_tick_int) ||As Rick pointed out last time, we can remove this check which follows the block of code above:
Quoted 5 lines
/* No tx interrupts will be generated if both are zero */ if ((
ec->tx_coalesce_usecs== 0) &&
(ec->tx_max_coalesced_frames== 0))
return-EINVAL;
Michael,
should I add the removal of these checks to v2?
Ivan
Michael Chan
maintainerQuoted 38 lines · Ivan Vecera
Dne 30.8.2016 v 17:46 Michael Chan napsal(a):
Quoted 37 lines · Ivan Vecera
Quoted 28 lines
The recent commit
087d7a8cdisallows to set Rx coalescing time to be 0 as this stops generating interrupts for the incoming packets. I found the zero Tx coalescing time stops generating interrupts similarly for outgoing packets and fires Tx watchdog later. To avoid this, don't allow to set Tx coalescing time to 0.Signed-off-by Ivan Vecera <[email protected]>--- drivers/net/ethernet/broadcom/tg3.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/broadcom/tg3.c +1
-0@@ -14012,6 +14012,7 @@ static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) if ((ec->rx_coalesce_usecs > MAX_RXCOL_TICKS) || (!ec->rx_coalesce_usecs) || (ec->tx_coalesce_usecs > MAX_TXCOL_TICKS) || + (!ec->tx_coalesce_usecs) || (ec->rx_max_coalesced_frames > MAX_RXMAX_FRAMES) || (ec->tx_max_coalesced_frames > MAX_TXMAX_FRAMES) ||Quoted 1 line
(ec->rx_coalesce_usecs_irq > max_rxcoal_tick_int) ||As Rick pointed out last time, we can remove this check which follows the block of code above:
Quoted 8 lines
Quoted 5 lines
/* No tx interrupts will be generated if both are zero */ if ((
ec->tx_coalesce_usecs== 0) &&
(ec->tx_max_coalesced_frames== 0))
return-EINVAL;Michael,
should I add the removal of these checks to v2?
Yes, please remove both the TX and the RX checks. Thanks.
Dne 31.8.2016 v 18:19 Michael Chan napsal(a):
Quoted 44 lines · Ivan Vecera
Quoted 43 lines
Dne 30.8.2016 v 17:46 Michael Chan napsal(a):
Quoted 42 lines · Ivan Vecera
Quoted 28 lines
The recent commit
087d7a8cdisallows to set Rx coalescing time to be 0 as this stops generating interrupts for the incoming packets. I found the zero Tx coalescing time stops generating interrupts similarly for outgoing packets and fires Tx watchdog later. To avoid this, don't allow to set Tx coalescing time to 0.Signed-off-by Ivan Vecera <[email protected]>--- drivers/net/ethernet/broadcom/tg3.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/broadcom/tg3.c +1
-0@@ -14012,6 +14012,7 @@ static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) if ((ec->rx_coalesce_usecs > MAX_RXCOL_TICKS) || (!ec->rx_coalesce_usecs) || (ec->tx_coalesce_usecs > MAX_TXCOL_TICKS) || + (!ec->tx_coalesce_usecs) || (ec->rx_max_coalesced_frames > MAX_RXMAX_FRAMES) || (ec->tx_max_coalesced_frames > MAX_TXMAX_FRAMES) ||Quoted 1 line
(ec->rx_coalesce_usecs_irq > max_rxcoal_tick_int) ||As Rick pointed out last time, we can remove this check which follows the block of code above:
/* No tx interrupts will be generated if both are zero */ if ((
ec->tx_coalesce_usecs== 0) &&
(ec->tx_max_coalesced_frames== 0))
return-EINVAL;
Quoted 5 lines
Quoted 3 lines
Michael,
should I add the removal of these checks to v2?Yes, please remove both the TX and the RX checks. Thanks.
Ok, v2 sent.
I.