[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c6ed2749-a9c7-70b0-c2ab-989a7268d432@amd.com>
Date: Thu, 9 Mar 2017 17:24:46 -0600
From: Tom Lendacky <thomas.lendacky@....com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: Jeremy Linton <jeremy.linton@....com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: xgbe unbalanced enable for IRQ XX in 4.11-rc1
On 3/9/2017 5:06 PM, Eric Dumazet wrote:
> On Thu, 2017-03-09 at 16:35 -0600, Tom Lendacky wrote:
>> On 3/9/2017 4:17 PM, Jeremy Linton wrote:
>>> Hi,
>>>
>>> On 03/09/2017 03:39 PM, Tom Lendacky wrote:
>>>> On 3/9/2017 3:26 PM, Jeremy Linton wrote:
>>>>> Hi,
>>>>
>>>> Hi Jeremy,
>>>>
>>>> I'll have a look at it. Can you send me your kernel config just in
>>>> case?
>>>
>>> Sure, i will send it to you off list to avoid spamming everyone with a
>>> 43k gziped file.
>>>
>>
>> I'm able to recreate the problem with my current config. If I revert
>> patch 39e6c8208d7b ("net: solve a NAPI race"), then the problem goes
>> away.
>>
>> Eric, any thoughts on this? I'm guessing the driver should check that
>> napi_complete_done returns true before enabling IRQs...
>>
>> Thanks,
>> Tom
>
> Yes, it seems this driver has a conditional disable_irq_nosync()
> following the napi_schedule_prep()
>
> So it probably needs the same for the enable_irq() side.
I verified that the issue goes away when the return value for
napi_complete_done() is checked. I'll prepare a patch for
both calls in the driver.
>
> This would be broken with busy polling anyway, before my patch.
Yes, I see that busy polling went into 4.10 so I'll submit it back
to 4.10 stable as well.
Thanks,
Tom
>
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> index 248f60d171a5a0ce76744a95e2d59039939e6538..c47a3a93f034ab608286d1ae343e9b7778063df8 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> @@ -2272,9 +2272,8 @@ static int xgbe_one_poll(struct napi_struct *napi, int budget)
> processed = xgbe_rx_poll(channel, budget);
>
> /* If we processed everything, we are done */
> - if (processed < budget) {
> - /* Turn off polling */
> - napi_complete_done(napi, processed);
> + if (processed < budget &&
> + napi_complete_done(napi, processed)) {
>
> /* Enable Tx and Rx interrupts */
> if (pdata->channel_irq_mode)
>
>
Powered by blists - more mailing lists