Date: Mon, 8 Dec 2003 11:23:23 -0600 From: "Jacques A. Vidrine" <nectar@FreeBSD.org> To: Jun Kuriyama <kuriyama@imgsrc.co.jp> Cc: pdeuskar@FreeBSD.org Subject: Re: dev/em: Link is not up until 2 seconds after "ifconfig up" Message-ID: <20031208172323.GA47551@madman.celabo.org> In-Reply-To: <7m8ylp6pn0.wl@black.imgsrc.co.jp> References: <7m8ylp6pn0.wl@black.imgsrc.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 07, 2003 at 04:41:39PM +0900, Jun Kuriyama wrote:
>
> My experimental 1U box which has em0 and em1 shows following result.
> Doing "ifconfig em1 up" after "ifconfig em1 down", link is down 1 or
> more seconds.
A co-worker of mine noticed this same issue, but when adding alias IP
addresses, e.g. `ifconfig em0 ... alias' causes a 1-2 second delay
each time it is invoked. The workaround he used here was to make the
code match the comment in in_ifinit():
671 /*
672 * Give the interface a chance to initialize
673 * if this is its first address,
674 * and to validate the address if necessary.
675 */
676 if (ifp->if_ioctl &&
677 (error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia))) {
(e.g. add a IFF_RUNNING check to this condition.) Ultimately this
just avoids calling the driver's if_init routine every time `ifconfig
... alias' is run. But, I don't think this workaround will work for
you, since you actually *are* bringing the interface up and down.
I suspect there is something amiss in the driver, but I haven't been
able to figure out the real issue myself, and I haven't gotten a
response from pdeuskar@ (I reported the issue several months back).
Cheers,
--
Jacques Vidrine NTT/Verio SME FreeBSD UNIX Heimdal
nectar@celabo.org jvidrine@verio.net nectar@freebsd.org nectar@kth.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031208172323.GA47551>
