Re: dhclient cause up/down cycle after 239356 ?

From: YongHyeon PYUN <pyunyh_at_gmail.com>
Date: Thu, 23 Aug 2012 13:50:43 -0700
On Thu, Aug 23, 2012 at 11:35:34AM +1000, Peter Jeremy wrote:
> On 2012-Aug-22 15:35:01 -0400, John Baldwin <jhb_at_freebsd.org> wrote:
> >Hmm.  Perhaps we could use a debouncer to ignore "short" link flaps?  Kind of
> >gross (and OpenBSD doesn't do this).  For now this change basically ignores
> >link up events if they occur with 5 seconds of the link down event.  The 5 is
> >hardcoded which is kind of yuck.
> 
> I'm also a bit concerned about this for similar reasons to adrian_at_.
> We need to distinguish between short link outages caused by (eg) a
> switch admin reconfiguring the switch (which needs the lease to be
> re-checked) and those caused by broken NICs which report link status
> changes when they are touched.  Maybe an alternative is to just ignore
> link flaps when they occur within a few seconds of a script_go().
> (And/or make the ignore timeout configurable).
> 
> Apart from fxp(4), does anyone know how many NICs are similarly
> broken?

FreeBSD used to blindly call driver's if_init() in ether_ioctl()
whenever an IP address is assigned to interface.  This results in
calling foo_init in a driver such that controller/link reset
happens after IP address assignment.  I tried to fix many ethernet
drivers in tree to ignore redundant foo_init() call by checking
whether this foo_init() call is the very first time initialization
of interface. Both NetBSD/OpenBSD seems to not call if_init() if
the driver is already running. Because some controllers(e.g.
fxp(4)) may require full controller reset to make multicast work,
I couldn't follow their approach. I still don't know what other
drivers except fxp(4) require full controller reset.  There are too
many old ethernet drivers I don't have access.
Another reason why fxp(4) requires redundant controller reset is
flow control support of the driver. Due to hardware limitation, MAC
configuration for negotiated link's flow control parameters also
requires controller reset.

> 
> Does anyone know why this issue doesn't bite OpenBSD?  Does it have

I guess OpenBSD's fxp(4) has to reset controller to update
multicast filter but it does not support flow control for fxp(4)
yet so OpenBSD may see less number of link flips than that of
FreeBSD.

> a work-around to avoid resetting the link, not report link status
> changes or just no-one has noticed the issue?
> 
> BTW to jhb: Can you check your mailer's list configuration.  You
> appear to be adding <freebsd-current_at_freebsd.org> and leaving
> <current_at_freebsd.org> in the Cc list.
> 
> -- 
> Peter Jeremy
Received on Thu Aug 23 2012 - 02:50:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:29 UTC