All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] ionic: no link check while resetting queues
@ 2020-06-16  1:14 Shannon Nelson
  2020-06-17 19:41 ` Jonathan Toppins
  2020-06-17 22:08 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Shannon Nelson @ 2020-06-16  1:14 UTC (permalink / raw)
  To: netdev, davem; +Cc: Shannon Nelson

If the driver is busy resetting queues after a change in
MTU or queue parameters, don't bother checking the link,
wait until the next watchdog cycle.

Fixes: 987c0871e8ae ("ionic: check for linkup in watchdog")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
---
 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 9d8c969f21cb..bfadc4934702 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -96,7 +96,8 @@ static void ionic_link_status_check(struct ionic_lif *lif)
 	u16 link_status;
 	bool link_up;
 
-	if (!test_bit(IONIC_LIF_F_LINK_CHECK_REQUESTED, lif->state))
+	if (!test_bit(IONIC_LIF_F_LINK_CHECK_REQUESTED, lif->state) ||
+	    test_bit(IONIC_LIF_F_QUEUE_RESET, lif->state))
 		return;
 
 	link_status = le16_to_cpu(lif->info->status.link_status);
-- 
2.17.1


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

* Re: [PATCH net] ionic: no link check while resetting queues
  2020-06-16  1:14 [PATCH net] ionic: no link check while resetting queues Shannon Nelson
@ 2020-06-17 19:41 ` Jonathan Toppins
  2020-06-17 19:53   ` Shannon Nelson
  2020-06-17 22:08 ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Jonathan Toppins @ 2020-06-17 19:41 UTC (permalink / raw)
  To: Shannon Nelson, netdev, davem

On 6/15/20 9:14 PM, Shannon Nelson wrote:
> If the driver is busy resetting queues after a change in
> MTU or queue parameters, don't bother checking the link,
> wait until the next watchdog cycle.
> 
> Fixes: 987c0871e8ae ("ionic: check for linkup in watchdog")
> Signed-off-by: Shannon Nelson <snelson@pensando.io>
> ---
>  drivers/net/ethernet/pensando/ionic/ionic_lif.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> index 9d8c969f21cb..bfadc4934702 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> @@ -96,7 +96,8 @@ static void ionic_link_status_check(struct ionic_lif *lif)
>  	u16 link_status;
>  	bool link_up;
>  
> -	if (!test_bit(IONIC_LIF_F_LINK_CHECK_REQUESTED, lif->state))
> +	if (!test_bit(IONIC_LIF_F_LINK_CHECK_REQUESTED, lif->state) ||
> +	    test_bit(IONIC_LIF_F_QUEUE_RESET, lif->state))
>  		return;
>  
>  	link_status = le16_to_cpu(lif->info->status.link_status);
> 

Would a firmware reset bit being asserted also cause an issue here
(IONIC_LIF_F_FW_RESET)? Meaning do we need to test for this bit as well?


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

* Re: [PATCH net] ionic: no link check while resetting queues
  2020-06-17 19:41 ` Jonathan Toppins
@ 2020-06-17 19:53   ` Shannon Nelson
  2020-06-17 20:43     ` Jonathan Toppins
  0 siblings, 1 reply; 5+ messages in thread
From: Shannon Nelson @ 2020-06-17 19:53 UTC (permalink / raw)
  To: jtoppins, netdev, davem

On 6/17/20 12:41 PM, Jonathan Toppins wrote:
> On 6/15/20 9:14 PM, Shannon Nelson wrote:
>> If the driver is busy resetting queues after a change in
>> MTU or queue parameters, don't bother checking the link,
>> wait until the next watchdog cycle.
>>
>> Fixes: 987c0871e8ae ("ionic: check for linkup in watchdog")
>> Signed-off-by: Shannon Nelson <snelson@pensando.io>
>> ---
>>   drivers/net/ethernet/pensando/ionic/ionic_lif.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
>> index 9d8c969f21cb..bfadc4934702 100644
>> --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
>> +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
>> @@ -96,7 +96,8 @@ static void ionic_link_status_check(struct ionic_lif *lif)
>>   	u16 link_status;
>>   	bool link_up;
>>   
>> -	if (!test_bit(IONIC_LIF_F_LINK_CHECK_REQUESTED, lif->state))
>> +	if (!test_bit(IONIC_LIF_F_LINK_CHECK_REQUESTED, lif->state) ||
>> +	    test_bit(IONIC_LIF_F_QUEUE_RESET, lif->state))
>>   		return;
>>   
>>   	link_status = le16_to_cpu(lif->info->status.link_status);
>>
> Would a firmware reset bit being asserted also cause an issue here
> (IONIC_LIF_F_FW_RESET)? Meaning do we need to test for this bit as well?
>

No, we actually want the link_status_check during the FW_RESET so that 
we can detect when the FW has come back up and Linked.  During that time 
we just don't want user processes poking at us, which is why the 
netif_device_detach()/netif_device_attach() are used there.

sln


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

* Re: [PATCH net] ionic: no link check while resetting queues
  2020-06-17 19:53   ` Shannon Nelson
@ 2020-06-17 20:43     ` Jonathan Toppins
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Toppins @ 2020-06-17 20:43 UTC (permalink / raw)
  To: Shannon Nelson, netdev, davem

On 6/17/20 3:53 PM, Shannon Nelson wrote:
> On 6/17/20 12:41 PM, Jonathan Toppins wrote:
>> On 6/15/20 9:14 PM, Shannon Nelson wrote:
>>> If the driver is busy resetting queues after a change in
>>> MTU or queue parameters, don't bother checking the link,
>>> wait until the next watchdog cycle.
>>>
>>> Fixes: 987c0871e8ae ("ionic: check for linkup in watchdog")
>>> Signed-off-by: Shannon Nelson <snelson@pensando.io>
>>> ---
>>>   drivers/net/ethernet/pensando/ionic/ionic_lif.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
>>> b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
>>> index 9d8c969f21cb..bfadc4934702 100644
>>> --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
>>> +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
>>> @@ -96,7 +96,8 @@ static void ionic_link_status_check(struct
>>> ionic_lif *lif)
>>>       u16 link_status;
>>>       bool link_up;
>>>   -    if (!test_bit(IONIC_LIF_F_LINK_CHECK_REQUESTED, lif->state))
>>> +    if (!test_bit(IONIC_LIF_F_LINK_CHECK_REQUESTED, lif->state) ||
>>> +        test_bit(IONIC_LIF_F_QUEUE_RESET, lif->state))
>>>           return;
>>>         link_status = le16_to_cpu(lif->info->status.link_status);
>>>
>> Would a firmware reset bit being asserted also cause an issue here
>> (IONIC_LIF_F_FW_RESET)? Meaning do we need to test for this bit as well?
>>
> 
> No, we actually want the link_status_check during the FW_RESET so that
> we can detect when the FW has come back up and Linked.  During that time
> we just don't want user processes poking at us, which is why the
> netif_device_detach()/netif_device_attach() are used there.
> 
> sln
> 

Ah ok, I missed that. Thanks.

Acked-by: Jonathan Toppins <jtoppins@redhat.com>


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

* Re: [PATCH net] ionic: no link check while resetting queues
  2020-06-16  1:14 [PATCH net] ionic: no link check while resetting queues Shannon Nelson
  2020-06-17 19:41 ` Jonathan Toppins
@ 2020-06-17 22:08 ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2020-06-17 22:08 UTC (permalink / raw)
  To: snelson; +Cc: netdev

From: Shannon Nelson <snelson@pensando.io>
Date: Mon, 15 Jun 2020 18:14:59 -0700

> If the driver is busy resetting queues after a change in
> MTU or queue parameters, don't bother checking the link,
> wait until the next watchdog cycle.
> 
> Fixes: 987c0871e8ae ("ionic: check for linkup in watchdog")
> Signed-off-by: Shannon Nelson <snelson@pensando.io>

Applied and queued up for v5.7 -stable, thanks.

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

end of thread, other threads:[~2020-06-17 22:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-16  1:14 [PATCH net] ionic: no link check while resetting queues Shannon Nelson
2020-06-17 19:41 ` Jonathan Toppins
2020-06-17 19:53   ` Shannon Nelson
2020-06-17 20:43     ` Jonathan Toppins
2020-06-17 22:08 ` David Miller

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.