* New NAPI interface: netif_rx_reschedule not working
@ 2007-08-23 16:21 Jan-Bernd Themann
0 siblings, 0 replies; only message in thread
From: Jan-Bernd Themann @ 2007-08-23 16:21 UTC (permalink / raw)
To: David.Miller; +Cc: netdev, Christoph Raisch, Thomas Klein
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-08-23 16:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-23 16:21 New NAPI interface: netif_rx_reschedule not working Jan-Bernd Themann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).