ndis(4) patch to replace obsolete if_watchdog interface
John Baldwin
jhb at freebsd.org
Fri May 30 16:26:37 UTC 2008
On Thursday 29 May 2008 05:46:05 pm Andrew Thompson wrote:
> On Thu, May 29, 2008 at 04:41:32PM -0400, Coleman Kane wrote:
> > Hi,
> >
> > I just replaced the obsoleted if_watchdog interface in ndis(4) with a
> > local implementation. This should remove the obnoxious warning message
> > on device init. Anyone using -CURRENT with an ndis card, could you send
> > me success/fails?
> >
> > The patch is here:
> > * http://people.freebsd.org/~cokane/patches/if_ndis-new_wd.patch
>
>
> This works different to the rest of the network drivers. The existing
> drivers use a callout tick that runs while the driver is up and an
> integer counter.
>
> if (x && --x == 0)
> ...timeout...
>
> You arm the callout and stop it after each Tx, does this have any
> perfornace impact?
Hmm, I'm not sure, but I'm doing the simple method myself in the various
drivers I'm currently updating. I would err on the side of simplicity unless
it is proven that a more complex solution (i.e. having a separate timer that
gets maintained) is needed. Another thing to consider is that you now have
the overhead of running the callout periodically in the complex case whereas
in normal operation it would always be cancelled and never run in the simple
case (timeouts are rare).
Probably best is to do some actual measurements both ways though. In general,
simpler, more intuitive alogrithms are better than more complex ones unless
there is a real performance benefit from the complexity.
--
John Baldwin
More information about the freebsd-current
mailing list