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.

This would be broken with busy polling anyway, before my patch.

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)


Reply via email to