tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: struct ifnet and ifaddr handling [was: Re: Making global variables of if.c MPSAFE]

On Thu, Nov 20, 2014 at 11:38 AM, Ryota Ozaki <> wrote:
> Actually FreeBSD seems to have a callout for each interface. Even more
> they killed the common if_watchdog facility and each driver has its own.

What happens if many (e.g. 1,000) virtual ifs are present?

> Anyway here is a patch:
> (it's on top of -current HEAD).

        if (ifp->if_timer != 0 && --ifp->if_timer != 0)

If I read correctly, if_watchdog needs to be called only when if_timer
becomes 1 -> 0.  So this should be:

        if (ifp->if_timer != 0 && --ifp->if_timer == 0)

Home | Main Index | Thread Index | Old Index