[LEDE-DEV] Bug - spinlock loop in cns3xxx_eth.c

Koen Vandeputte koen.vandeputte at ncentric.com
Mon Jun 13 09:12:39 PDT 2016


Hi All,

There seems to be a bug in the function eth_poll() in this driver

When the RX ring gets full once, the re-schedule is called forever, even 
when the ring is empty afterwards.


     if (!received) {
         napi_complete(napi);
         enable_irq(sw->rx_irq);
         budget = 0;

         /* if rx descriptors are full schedule another poll */
         if (rx_ring->desc[(i-1) & (RX_DESCS-1)].cown)
         {
             eth_schedule_poll(sw);    <----  Gets called on each 
function entry
         }
     }


This causes SoftIRQ to fully load a core forever.


I didn't fix it yet, but should I be the first, i'll supply a patch ..


Used hardware:
- Gateworks Laguna GW2388-4

Seen on branches:
- Lede master (4.4.13 kernel)
- Gateworks 16.02 (4.4.0 kernel)


Reproducing (100%):
- Iperf to an external server (Issue not seen - cpu is fast enough to 
avoid the RX ring from reaching 'Full')
- Route an iperf stream from a second device via wlan through eth to an 
external server (RX ring gets full after a minute .. spinlock loop 
forever occurs)


Kind Regards,

Koen Vandeputte
nCentric Europe



More information about the Lede-dev mailing list