* [PATCH net v2] tg3: Fix for disallow tx coalescing time to be 0
@ 2016-09-01 9:28 Ivan Vecera
2016-09-01 14:39 ` Michael Chan
2016-09-01 16:58 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Ivan Vecera @ 2016-09-01 9:28 UTC (permalink / raw)
To: netdev; +Cc: satish.baddipadige, siva.kallam, michael.chan
The recent commit 087d7a8c9174 "tg3: Fix for diasllow rx coalescing
time to be 0" disallow 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 for outgoing packets
as well and fires Tx watchdog later. To avoid this, don't allow to set
Tx coalescing time to 0 and also remove subsequent checks that become
senseless.
Cc: satish.baddipadige@broadcom.com
Cc: siva.kallam@broadcom.com
Cc: michael.chan@broadcom.com
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
drivers/net/ethernet/broadcom/tg3.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 6592612..a2551bc 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -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) ||
@@ -14022,16 +14023,6 @@ static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec)
(ec->stats_block_coalesce_usecs < min_stat_coal_ticks))
return -EINVAL;
- /* No rx interrupts will be generated if both are zero */
- if ((ec->rx_coalesce_usecs == 0) &&
- (ec->rx_max_coalesced_frames == 0))
- return -EINVAL;
-
- /* No tx interrupts will be generated if both are zero */
- if ((ec->tx_coalesce_usecs == 0) &&
- (ec->tx_max_coalesced_frames == 0))
- return -EINVAL;
-
/* Only copy relevant parameters, ignore all others. */
tp->coal.rx_coalesce_usecs = ec->rx_coalesce_usecs;
tp->coal.tx_coalesce_usecs = ec->tx_coalesce_usecs;
--
2.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net v2] tg3: Fix for disallow tx coalescing time to be 0
2016-09-01 9:28 [PATCH net v2] tg3: Fix for disallow tx coalescing time to be 0 Ivan Vecera
@ 2016-09-01 14:39 ` Michael Chan
2016-09-01 16:58 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: Michael Chan @ 2016-09-01 14:39 UTC (permalink / raw)
To: Ivan Vecera; +Cc: Netdev, Satish Baddipadige, Siva Reddy Kallam
On Thu, Sep 1, 2016 at 2:28 AM, Ivan Vecera <ivecera@redhat.com> wrote:
> The recent commit 087d7a8c9174 "tg3: Fix for diasllow rx coalescing
> time to be 0" disallow 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 for outgoing packets
> as well and fires Tx watchdog later. To avoid this, don't allow to set
> Tx coalescing time to 0 and also remove subsequent checks that become
> senseless.
>
> Cc: satish.baddipadige@broadcom.com
> Cc: siva.kallam@broadcom.com
> Cc: michael.chan@broadcom.com
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Acked-by: Michael Chan <michael.chan@broadcom.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v2] tg3: Fix for disallow tx coalescing time to be 0
2016-09-01 9:28 [PATCH net v2] tg3: Fix for disallow tx coalescing time to be 0 Ivan Vecera
2016-09-01 14:39 ` Michael Chan
@ 2016-09-01 16:58 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2016-09-01 16:58 UTC (permalink / raw)
To: ivecera; +Cc: netdev, satish.baddipadige, siva.kallam, michael.chan
From: Ivan Vecera <ivecera@redhat.com>
Date: Thu, 1 Sep 2016 11:28:59 +0200
> The recent commit 087d7a8c9174 "tg3: Fix for diasllow rx coalescing
> time to be 0" disallow 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 for outgoing packets
> as well and fires Tx watchdog later. To avoid this, don't allow to set
> Tx coalescing time to 0 and also remove subsequent checks that become
> senseless.
>
> Cc: satish.baddipadige@broadcom.com
> Cc: siva.kallam@broadcom.com
> Cc: michael.chan@broadcom.com
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v2] tg3: Fix for disallow tx coalescing time to be 0
@ 2016-09-01 9:38 Siva Reddy Kallam
0 siblings, 0 replies; 4+ messages in thread
From: Siva Reddy Kallam @ 2016-09-01 9:38 UTC (permalink / raw)
To: Ivan Vecera; +Cc: Linux Netdev List, Satish Baddipadige, Michael Chan
On Thu, Sep 1, 2016 at 2:58 PM, Ivan Vecera <ivecera@redhat.com> wrote:
> The recent commit 087d7a8c9174 "tg3: Fix for diasllow rx coalescing
> time to be 0" disallow 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 for outgoing packets
> as well and fires Tx watchdog later. To avoid this, don't allow to set
> Tx coalescing time to 0 and also remove subsequent checks that become
> senseless.
>
> Cc: satish.baddipadige@broadcom.com
> Cc: siva.kallam@broadcom.com
> Cc: michael.chan@broadcom.com
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Acked-by: Siva Reddy Kallam <siva.kallam@broadcom.com>
> ---
> drivers/net/ethernet/broadcom/tg3.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index 6592612..a2551bc 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -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) ||
> @@ -14022,16 +14023,6 @@ static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec)
> (ec->stats_block_coalesce_usecs < min_stat_coal_ticks))
> return -EINVAL;
>
> - /* No rx interrupts will be generated if both are zero */
> - if ((ec->rx_coalesce_usecs == 0) &&
> - (ec->rx_max_coalesced_frames == 0))
> - return -EINVAL;
> -
> - /* No tx interrupts will be generated if both are zero */
> - if ((ec->tx_coalesce_usecs == 0) &&
> - (ec->tx_max_coalesced_frames == 0))
> - return -EINVAL;
> -
> /* Only copy relevant parameters, ignore all others. */
> tp->coal.rx_coalesce_usecs = ec->rx_coalesce_usecs;
> tp->coal.tx_coalesce_usecs = ec->tx_coalesce_usecs;
> --
> 2.7.3
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-01 20:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01 9:28 [PATCH net v2] tg3: Fix for disallow tx coalescing time to be 0 Ivan Vecera
2016-09-01 14:39 ` Michael Chan
2016-09-01 16:58 ` David Miller
2016-09-01 9:38 Siva Reddy Kallam
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.