[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <117A22DB-A4CF-4FFB-AD08-A187E9F6EEB3@fb.com>
Date: Tue, 18 Sep 2018 21:21:54 +0000
From: Song Liu <songliubraving@...com>
To: Eric Dumazet <edumazet@...gle.com>
CC: Alexei Starovoitov <ast@...com>, netdev <netdev@...r.kernel.org>,
"Jeff Kirsher" <jeffrey.t.kirsher@...el.com>,
Alexander Duyck <alexander.h.duyck@...el.com>,
"michael.chan@...adcom.com" <michael.chan@...adcom.com>,
Kernel Team <Kernel-team@...com>
Subject: Re: pegged softirq and NAPI race (?)
> On Sep 18, 2018, at 2:13 PM, Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Tue, Sep 18, 2018 at 1:37 PM Song Liu <songliubraving@...com> wrote:
>>
>
>> Looks like a patch like the following fixes the issue for ixgbe. But I
>> cannot explain it yet.
>>
>> Does this ring a bell?
>
> I dunno, it looks like the NIC is generating an interrupt while it should not,
> and constantly sets NAPI_STATE_MISSED.
>
> Or maybe we need to properly check napi_complete_done() return value.
>
> diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c
> b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
> index d3e72d0f66ef428b08e4bd88508e05b734bc43a4..c4c565c982a98a5891603cedcdcb72dc1c401813
> 100644
> --- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c
> +++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
> @@ -1773,8 +1773,8 @@ ixgb_clean(struct napi_struct *napi, int budget)
> ixgb_clean_rx_irq(adapter, &work_done, budget);
>
> /* If budget not fully consumed, exit the polling mode */
> - if (work_done < budget) {
> - napi_complete_done(napi, work_done);
> + if (work_done < budget &&
> + napi_complete_done(napi, work_done)) {
> if (!test_bit(__IXGB_DOWN, &adapter->flags))
> ixgb_irq_enable(adapter);
> }
Thanks Eric!
I was looking at exactly this part. :) And it seems working!
I will run a bigger test and update shortly.
Best,
Song
Powered by blists - more mailing lists