Message ID | 1421906274.4832.35.camel@edumazet-glaptop2.roam.corp.google.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
On Wed, 2015-01-21 at 21:57 -0800, Eric Dumazet wrote: > This driver doesn't follow the NAPI model correctly. > > Please try following fix : Thanks Eric, I'll plug it in in a bit and poke at it. No news is good news, as good as news gets for unknown repeatability bugs that is ;-) > diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c > index 613037584d08..c531c8ae1be4 100644 > --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c > +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c > @@ -2388,7 +2388,10 @@ static int netxen_nic_poll(struct napi_struct *napi, int budget) > > work_done = netxen_process_rcv_ring(sds_ring, budget); > > - if ((work_done < budget) && tx_complete) { > + if (!tx_complete) > + work_done = budget; > + > + if (work_done < budget) { > napi_complete(&sds_ring->napi); > if (test_bit(__NX_DEV_UP, &adapter->state)) > netxen_nic_enable_int(sds_ring); > > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 2015-01-22 at 07:15 +0100, Mike Galbraith wrote: > On Wed, 2015-01-21 at 21:57 -0800, Eric Dumazet wrote: > > > This driver doesn't follow the NAPI model correctly. > > > > Please try following fix : > > Thanks Eric, I'll plug it in in a bit and poke at it. No news is good > news, as good as news gets for unknown repeatability bugs that is ;-) To trigger the bug, all you had to do was to stress the transmit side. You could reduce MAX_STATUS_HANDLE from 64 to 4 to trigger it even faster. I'll send an official patch tomorrow morning. Thanks ! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 2015-01-21 at 22:52 -0800, Eric Dumazet wrote: > On Thu, 2015-01-22 at 07:15 +0100, Mike Galbraith wrote: > > On Wed, 2015-01-21 at 21:57 -0800, Eric Dumazet wrote: > > > > > This driver doesn't follow the NAPI model correctly. > > > > > > Please try following fix : > > > > Thanks Eric, I'll plug it in in a bit and poke at it. No news is good > > news, as good as news gets for unknown repeatability bugs that is ;-) > > To trigger the bug, all you had to do was to stress the transmit side. Nope, it's easier than that... > You could reduce MAX_STATUS_HANDLE from 64 to 4 to trigger it even > faster. Wow, that made it amazingly easy to verify. With MAX_STATUS_HANDLE=4, without your patch applied box hangs as soon as I bring the network up. Add your patch on top, all is peachy. Fresh boot, or rmmod/modprobe and network restart, doesn't matter, box works with your patch, is dead without it. Here's an ornament for the fix if you think it'll look prettier :) Reported-and-tested-by: Mike Galbraith <umgwanakikbuti@gmail.com> -Mike -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c index 613037584d08..c531c8ae1be4 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c @@ -2388,7 +2388,10 @@ static int netxen_nic_poll(struct napi_struct *napi, int budget) work_done = netxen_process_rcv_ring(sds_ring, budget); - if ((work_done < budget) && tx_complete) { + if (!tx_complete) + work_done = budget; + + if (work_done < budget) { napi_complete(&sds_ring->napi); if (test_bit(__NX_DEV_UP, &adapter->state)) netxen_nic_enable_int(sds_ring);