Changes in the network interface queueing handoff model

Robert Watson rwatson at
Mon Jul 31 09:53:51 UTC 2006

On Mon, 31 Jul 2006, Hans Petter Selasky wrote:

> On Sunday 30 July 2006 21:23, Robert Watson wrote:
>> On Sun, 30 Jul 2006, Sam Leffler wrote:
> Just a comment while the iron is hot:
> Maybe you can make the network model safe against detach. Currently I see 
> that the processor can be stuck in routines like "if_start" after that 
> "if_free()" has been called. This can be critical for USB ethernet devices.

This is something to fix in the short or long term, but I think we should not 
try to fix everything at once as there is an awful lot to fix.  There are 
really two stages to fixing the ifnet life cycle, which Brooks has been 
working on for some time.  The first is to make it generally make sense -- he 
moved ifnet out of the softc, has been working to normalize things generally, 
(add dead ifnets), etc.  The second is to add new types of reference and 
tear-down magic.  What Solaris does here, FYI, is basically add a lock around 
entering the device driver via their mac layer in order to prevent it from 
"disappearing" while in use via the ifnet interface.  I'm not sure if we want 
the same solution there or not, but it's worth thinking carefully about.  We 
had (and have) similar problems in a number of other places, where races 
between consumers of an API and a detach of the provider cause problems.

Robert N M Watson
Computer Laboratory
University of Cambridge

More information about the freebsd-arch mailing list