ether_input question

Kip Macy kip.macy at gmail.com
Sun Mar 18 00:28:04 UTC 2007


> The reason the drivers drop their locks is
> that the network stack frequently holds locks over calls to driver output
> routines.  As a result, driver locks tend to follow network stack locks in the
> lock order--at least, for drivers that have a single lock covering both send
> and receive paths (quite common).  As a result, the driver must drop the
> driver lock before calling into the stack to avoid a lock order reversal.

Just to further clarify the corollary to this statement - drivers that
separately lock their softc, tx, and rx queues don't need to drop the
lock across if_input as there is no possibility of lock order reversal
between the input and the output path.

            -Kip


More information about the freebsd-net mailing list