* [PATCH net] bnxt: do not busy-poll when link is down
@ 2016-11-22 18:14 Andy Gospodarek
2016-11-22 18:38 ` Eric Dumazet
2016-11-24 20:40 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Andy Gospodarek @ 2016-11-22 18:14 UTC (permalink / raw)
To: netdev; +Cc: Andy Gospodarek, Michael Chan
When busy polling while a link is down (during a link-flap test), TX
timeouts were observed as well as the following messages in the ring
buffer:
bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51
bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free tx failed. rc:-1
bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51
bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free rx failed. rc:-1
These were resolved by checking for link status and returning if link
was not up.
Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Tested-by: Rob Miller <rob.miller@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index e18635b..013e373 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -1811,6 +1811,9 @@ static int bnxt_busy_poll(struct napi_struct *napi)
if (atomic_read(&bp->intr_sem) != 0)
return LL_FLUSH_FAILED;
+ if (!bp->link_info.link_up)
+ return LL_FLUSH_FAILED;
+
if (!bnxt_lock_poll(bnapi))
return LL_FLUSH_BUSY;
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] bnxt: do not busy-poll when link is down
2016-11-22 18:14 [PATCH net] bnxt: do not busy-poll when link is down Andy Gospodarek
@ 2016-11-22 18:38 ` Eric Dumazet
2016-11-22 18:55 ` Michael Chan
2016-11-24 20:40 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2016-11-22 18:38 UTC (permalink / raw)
To: Andy Gospodarek; +Cc: netdev, Michael Chan
On Tue, 2016-11-22 at 13:14 -0500, Andy Gospodarek wrote:
> When busy polling while a link is down (during a link-flap test), TX
> timeouts were observed as well as the following messages in the ring
> buffer:
>
> bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51
> bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free tx failed. rc:-1
> bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51
> bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free rx failed. rc:-1
>
> These were resolved by checking for link status and returning if link
> was not up.
>
> Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>
> Tested-by: Rob Miller <rob.miller@broadcom.com>
> ---
> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index e18635b..013e373 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -1811,6 +1811,9 @@ static int bnxt_busy_poll(struct napi_struct *napi)
> if (atomic_read(&bp->intr_sem) != 0)
> return LL_FLUSH_FAILED;
>
> + if (!bp->link_info.link_up)
> + return LL_FLUSH_FAILED;
> +
> if (!bnxt_lock_poll(bnapi))
> return LL_FLUSH_BUSY;
>
Any plans removing this busy polling stuff, now it is done in core
networking stack ?
This would remove bnxt_lock_napi() extra overhead in normal path ( napi
poll )
I could do this but I do not have the hardware to do the tests.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] bnxt: do not busy-poll when link is down
2016-11-22 18:38 ` Eric Dumazet
@ 2016-11-22 18:55 ` Michael Chan
2016-11-22 19:06 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: Michael Chan @ 2016-11-22 18:55 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Andy Gospodarek, Netdev
On Tue, Nov 22, 2016 at 10:38 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Tue, 2016-11-22 at 13:14 -0500, Andy Gospodarek wrote:
>> When busy polling while a link is down (during a link-flap test), TX
>> timeouts were observed as well as the following messages in the ring
>> buffer:
>>
>> bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51
>> bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free tx failed. rc:-1
>> bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51
>> bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free rx failed. rc:-1
>>
>> These were resolved by checking for link status and returning if link
>> was not up.
>>
>> Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
>> Signed-off-by: Michael Chan <michael.chan@broadcom.com>
>> Tested-by: Rob Miller <rob.miller@broadcom.com>
>> ---
>> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
>> index e18635b..013e373 100644
>> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
>> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
>> @@ -1811,6 +1811,9 @@ static int bnxt_busy_poll(struct napi_struct *napi)
>> if (atomic_read(&bp->intr_sem) != 0)
>> return LL_FLUSH_FAILED;
>>
>> + if (!bp->link_info.link_up)
>> + return LL_FLUSH_FAILED;
>> +
>> if (!bnxt_lock_poll(bnapi))
>> return LL_FLUSH_BUSY;
>>
>
>
> Any plans removing this busy polling stuff, now it is done in core
> networking stack ?
>
> This would remove bnxt_lock_napi() extra overhead in normal path ( napi
> poll )
>
> I could do this but I do not have the hardware to do the tests.
>
It's on my list of many TODO things. Probably in the next few weeks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] bnxt: do not busy-poll when link is down
2016-11-22 18:55 ` Michael Chan
@ 2016-11-22 19:06 ` Eric Dumazet
0 siblings, 0 replies; 5+ messages in thread
From: Eric Dumazet @ 2016-11-22 19:06 UTC (permalink / raw)
To: Michael Chan; +Cc: Andy Gospodarek, Netdev
On Tue, 2016-11-22 at 10:55 -0800, Michael Chan wrote:
> On Tue, Nov 22, 2016 at 10:38 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> >
> > Any plans removing this busy polling stuff, now it is done in core
> > networking stack ?
> >
> > This would remove bnxt_lock_napi() extra overhead in normal path ( napi
> > poll )
> >
> > I could do this but I do not have the hardware to do the tests.
> >
> It's on my list of many TODO things. Probably in the next few weeks.
Awesome, thanks !
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] bnxt: do not busy-poll when link is down
2016-11-22 18:14 [PATCH net] bnxt: do not busy-poll when link is down Andy Gospodarek
2016-11-22 18:38 ` Eric Dumazet
@ 2016-11-24 20:40 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2016-11-24 20:40 UTC (permalink / raw)
To: gospo; +Cc: netdev, michael.chan
From: Andy Gospodarek <gospo@broadcom.com>
Date: Tue, 22 Nov 2016 13:14:08 -0500
> When busy polling while a link is down (during a link-flap test), TX
> timeouts were observed as well as the following messages in the ring
> buffer:
>
> bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51
> bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free tx failed. rc:-1
> bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51
> bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free rx failed. rc:-1
>
> These were resolved by checking for link status and returning if link
> was not up.
>
> Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>
> Tested-by: Rob Miller <rob.miller@broadcom.com>
Applied.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-24 20:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-22 18:14 [PATCH net] bnxt: do not busy-poll when link is down Andy Gospodarek
2016-11-22 18:38 ` Eric Dumazet
2016-11-22 18:55 ` Michael Chan
2016-11-22 19:06 ` Eric Dumazet
2016-11-24 20:40 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox