All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] tg3: Fix for disallow tx coalescing time to be 0
@ 2016-08-30 14:38 Ivan Vecera
  2016-08-30 15:46 ` Michael Chan
  2016-08-30 17:52 ` Sergei Shtylyov
  0 siblings, 2 replies; 7+ messages in thread
From: Ivan Vecera @ 2016-08-30 14:38 UTC (permalink / raw)
  To: netdev; +Cc: satish.baddipadige, siva.kallam, michael.chan

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.

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 6592612..07e3beb 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) ||
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net] tg3: Fix for disallow tx coalescing time to be 0
  2016-08-30 14:38 [PATCH net] tg3: Fix for disallow tx coalescing time to be 0 Ivan Vecera
@ 2016-08-30 15:46 ` Michael Chan
  2016-08-31  9:27   ` Ivan Vecera
  2016-08-30 17:52 ` Sergei Shtylyov
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Chan @ 2016-08-30 15:46 UTC (permalink / raw)
  To: Ivan Vecera; +Cc: Netdev, Satish Baddipadige, Siva Reddy Kallam

On Tue, Aug 30, 2016 at 7:38 AM, Ivan Vecera <ivecera@redhat.com> wrote:
> 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.
>
> 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 | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index 6592612..07e3beb 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) ||


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;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net] tg3: Fix for disallow tx coalescing time to be 0
  2016-08-30 14:38 [PATCH net] tg3: Fix for disallow tx coalescing time to be 0 Ivan Vecera
  2016-08-30 15:46 ` Michael Chan
@ 2016-08-30 17:52 ` Sergei Shtylyov
  2016-08-31  9:25   ` Ivan Vecera
  1 sibling, 1 reply; 7+ messages in thread
From: Sergei Shtylyov @ 2016-08-30 17:52 UTC (permalink / raw)
  To: Ivan Vecera, netdev; +Cc: satish.baddipadige, siva.kallam, michael.chan

Hello.

On 08/30/2016 05:38 PM, Ivan Vecera wrote:

> The recent commit 087d7a8c disallows to set Rx coalescing time to be 0

    You should specify both 12-digit SHA1 and the commit summary enclosed in ("").

> 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.
>
> Cc: satish.baddipadige@broadcom.com
> Cc: siva.kallam@broadcom.com
> Cc: michael.chan@broadcom.com
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
[...]

MBR, Sergei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net] tg3: Fix for disallow tx coalescing time to be 0
  2016-08-30 17:52 ` Sergei Shtylyov
@ 2016-08-31  9:25   ` Ivan Vecera
  0 siblings, 0 replies; 7+ messages in thread
From: Ivan Vecera @ 2016-08-31  9:25 UTC (permalink / raw)
  To: Sergei Shtylyov, netdev; +Cc: satish.baddipadige, siva.kallam, michael.chan

Dne 30.8.2016 v 19:52 Sergei Shtylyov napsal(a):
> Hello.
>
> On 08/30/2016 05:38 PM, Ivan Vecera wrote:
>
>> The recent commit 087d7a8c disallows to set Rx coalescing time to be 0
>
>    You should specify both 12-digit SHA1 and the commit summary enclosed in ("").
>
>> 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.
>>
>> Cc: satish.baddipadige@broadcom.com
>> Cc: siva.kallam@broadcom.com
>> Cc: michael.chan@broadcom.com
>> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> [...]
>
> MBR, Sergei
>
No problem, Sergei, will post v2.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net] tg3: Fix for disallow tx coalescing time to be 0
  2016-08-30 15:46 ` Michael Chan
@ 2016-08-31  9:27   ` Ivan Vecera
  2016-08-31 16:19     ` Michael Chan
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Vecera @ 2016-08-31  9:27 UTC (permalink / raw)
  To: Michael Chan; +Cc: Netdev, Satish Baddipadige, Siva Reddy Kallam

Dne 30.8.2016 v 17:46 Michael Chan napsal(a):
> On Tue, Aug 30, 2016 at 7:38 AM, Ivan Vecera <ivecera@redhat.com> wrote:
>> 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.
>>
>> 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 | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
>> index 6592612..07e3beb 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) ||
>
>
> 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;
>
Michael,
should I add the removal of these checks to v2?

Ivan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net] tg3: Fix for disallow tx coalescing time to be 0
  2016-08-31  9:27   ` Ivan Vecera
@ 2016-08-31 16:19     ` Michael Chan
  2016-09-01  9:29       ` Ivan Vecera
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Chan @ 2016-08-31 16:19 UTC (permalink / raw)
  To: Ivan Vecera; +Cc: Netdev, Satish Baddipadige, Siva Reddy Kallam

On Wed, Aug 31, 2016 at 2:27 AM, Ivan Vecera <ivecera@redhat.com> wrote:
> Dne 30.8.2016 v 17:46 Michael Chan napsal(a):
>>
>> On Tue, Aug 30, 2016 at 7:38 AM, Ivan Vecera <ivecera@redhat.com> wrote:
>>>
>>> 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.
>>>
>>> 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 | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/net/ethernet/broadcom/tg3.c
>>> b/drivers/net/ethernet/broadcom/tg3.c
>>> index 6592612..07e3beb 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) ||
>>
>>
>>
>> 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;
>>
> Michael,
> should I add the removal of these checks to v2?
>
Yes, please remove both the TX and the RX checks.  Thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net] tg3: Fix for disallow tx coalescing time to be 0
  2016-08-31 16:19     ` Michael Chan
@ 2016-09-01  9:29       ` Ivan Vecera
  0 siblings, 0 replies; 7+ messages in thread
From: Ivan Vecera @ 2016-09-01  9:29 UTC (permalink / raw)
  To: Michael Chan; +Cc: Netdev, Satish Baddipadige, Siva Reddy Kallam

Dne 31.8.2016 v 18:19 Michael Chan napsal(a):
> On Wed, Aug 31, 2016 at 2:27 AM, Ivan Vecera <ivecera@redhat.com> wrote:
>> Dne 30.8.2016 v 17:46 Michael Chan napsal(a):
>>>
>>> On Tue, Aug 30, 2016 at 7:38 AM, Ivan Vecera <ivecera@redhat.com> wrote:
>>>>
>>>> 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.
>>>>
>>>> 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 | 1 +
>>>>  1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/drivers/net/ethernet/broadcom/tg3.c
>>>> b/drivers/net/ethernet/broadcom/tg3.c
>>>> index 6592612..07e3beb 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) ||
>>>
>>>
>>>
>>> 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;
>>>
>> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-09-01  9:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-30 14:38 [PATCH net] tg3: Fix for disallow tx coalescing time to be 0 Ivan Vecera
2016-08-30 15:46 ` Michael Chan
2016-08-31  9:27   ` Ivan Vecera
2016-08-31 16:19     ` Michael Chan
2016-09-01  9:29       ` Ivan Vecera
2016-08-30 17:52 ` Sergei Shtylyov
2016-08-31  9:25   ` Ivan Vecera

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.