A question about the softirq implementation in DDE Linux26

Da Zheng zhengda1936 at gmail.com
Fri Feb 26 10:51:55 CET 2010


After I ported DDE Linux26 to the Hurd, I test it with a NIC driver: pcnet32,
and see a problem: device interrupt of the NIC device is sometimes masked but
cannot be unmasked.

Whenever pcnet32 driver receives an interrupt, it masks device interrupts and
calls __netif_rx_schedule() and let softirq to handle the interrupt.
__netif_rx_schedule() should set NET_RX_SOFTIRQ, but it can only do that when
the local "irq" is disabled (by calling local_irq_save macro). Linux disables
irq with cli instruction. Obviously DDE cannot do that, but the implementation
of local_irq_save in DDE is quite strange. It seems that it eventually calls
raw_local_irq_disable(), which is implemented in
linux26/lib/src/arch/l4/cli_sti.c. How can increasing _refcnt has anything to do
with disabling irq?

Without disabling irq, there is a race condition in the interrupt handler and
softirq handler. When I run pcnet32 with my ported DDE Linux26 for a long time,
I sometimes see softirq fails to be scheduled after the driver receives a hard IRQ.

I don't know how the Linux drivers can work with DDE Linux in L4.
raw_local_irq_disable() apparently has problems if I read the right code.

Best regards,
Zheng Da

More information about the l4-hackers mailing list