cvs commit: src/sys/net if.c

Scott Long scottl at samsco.org
Thu Nov 30 10:12:23 PST 2006


Ruslan Ermilov wrote:

> On Thu, Nov 30, 2006 at 08:48:49AM -0800, Sam Leffler wrote:
> 
>>Gleb Smirnoff wrote:
>>
>>>glebius     2006-11-30 15:02:01 UTC
>>>
>>>  FreeBSD src repository
>>>
>>>  Modified files:
>>>    sys/net              if.c 
>>>  Log:
>>>  The recent issues with em(4) interface has shown that the old 4.4BSD
>>>  if_watchdog/if_timer interface doesn't fit modern SMP network
>>>  stack design.
>>>  
>>>  Device drivers that need watchdog to monitor their hardware should
>>>  implement it theirselves.
>>>  
>>>  Eventually the if_watchdog/if_timer API will be removed. For now,
>>>  warn that driver uses it.
>>>  
>>>  Reviewed by:    scottl
>>
>>Did I miss a headsup on this?  Seems like something you should
>>coordinate with folks so people can convert drivers beforehand.  I
>>understand the problem and I see this is just a printf but now we're
>>going to have people asking what's going on.
>>
> 
> Yeah, with only two drivers in the tree using a new approach (if I'm
> not mistaken based on what Gleb told me today) calling it "obsolete"
> was I think (ahem) a bit premature.  However, calling it "dangerous"
> would be accurate and more threatening!
> 

There are actually three drivers, and they are the more popular ones.

> That way, I hope Sam's concern will be addressed as well, as it IS
> dangerous, and there's no reason to hide the truth waiting for most
> drivers to be converted.
> 
> BTW, is if_{watchdog|timer} also dangerous for !MPSAFE drivers?
> 

It's not dangerous unless you have a driver like em was doing dangerous
things in response to the watchdog (i.e. locking problems specific to
the driver).  For the average driver, the existing watchdog mechanism
just risks advertising that a timeout happened when really it did not.
And for most drivers, the consequence of this is an unneeded chip reset
and possibly some dropped packets.  So, it's an annoyance and it's 
incorrect, but it's not dangerous; it does not cause a risk of data 
corruption, permanent loss of data, or a system panic (modulo bugs 
unique to a given driver).

Scott



More information about the cvs-src mailing list