Hi David,

when trying to get our driver working with the new interface, 
I found the following issue where I'm not sure how to solve it best:

netif_rx_reschedule() does not work when called after netif_rx_complete().
The problem is that netif_rx_reschedule currently adds the napi struct once 
more to the poll list. However, net_rx_action will add it to the poll list
as well (NAPI_STATE_SCHED set), so the device is scheduled twice. 
Next time netif_rx_complete is called for the second schedule, 
it will result in BUG() because NAPI_STATE_SCHED
is not set anymore (cleared by first netif_rx_complete()).

Modifying netif_rx_reschedule to only set NAPI_STATE_SCHED flag again
and not adding the device to the poll_list will not solve the problem entirely.

After netif_rx_complete() the driver activates the IRQs again. If
an IRQ is caught on a different CPU before netif_rx_reschedule is called,
we will have the napi device scheduled twice again... because
net_rx_action will schedule it and netif_rx_schedule as well
(add it to poll_list).

I think this is an issue that can even occur if you don't use
netif_rx_reschedule. Do I understand this correctly?

Thanks,
Jan-Bernd

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to