From owner-freebsd-current@FreeBSD.ORG Mon Dec 8 09:23:26 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23DC416A4CE; Mon, 8 Dec 2003 09:23:26 -0800 (PST) Received: from gw.celabo.org (gw.celabo.org [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9959143F85; Mon, 8 Dec 2003 09:23:24 -0800 (PST) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.celabo.org (Postfix) with ESMTP id 21FB65482B; Mon, 8 Dec 2003 11:23:24 -0600 (CST) Received: by madman.celabo.org (Postfix, from userid 1001) id A32616D455; Mon, 8 Dec 2003 11:23:23 -0600 (CST) Date: Mon, 8 Dec 2003 11:23:23 -0600 From: "Jacques A. Vidrine" To: Jun Kuriyama Message-ID: <20031208172323.GA47551@madman.celabo.org> Mail-Followup-To: "Jacques A. Vidrine" , Jun Kuriyama , Current , pdeuskar@FreeBSD.org References: <7m8ylp6pn0.wl@black.imgsrc.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7m8ylp6pn0.wl@black.imgsrc.co.jp> User-Agent: Mutt/1.5.4i-ja.1 cc: Current cc: pdeuskar@FreeBSD.org Subject: Re: dev/em: Link is not up until 2 seconds after "ifconfig up" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2003 17:23:26 -0000 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