Can someone help me understand how it is safe to process network packets from 
within a driver's interrupt context?
It looks to me like the network drivers (bce in particular) violate the rules 
laid out in locking (9).

In FreeBSD 7.3 the bce driver's RX interrupt can call up into the network stack 
(bce_intr -> bce_rx_intr -> if_input) which will grab INP_INFO_WLOCK (rw_wlock) 
when it hits the TCP layer.

pfslowtimo also acquires INP_INFO_LOCK.

Is this safe?  locking (9) says that acquiring a rw_wlock is not allowed in 
interrupt context and rw_wlock can "sleep" via mi_switch in the turnstile code.

Is this a locking order type rule?  and if so, is the rule being ignored 
because network stack is guaranteed to return in a finite amount of time?  Or 
is the bce interrupt a different type of interrupt than referred to in locking 
(9) ?

Thanks,

John Giacomoni



_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to