From owner-freebsd-net@FreeBSD.ORG Thu Jan 24 16:36:41 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C0BB16A418; Thu, 24 Jan 2008 16:36:41 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (cl-162.ewr-01.us.sixxs.net [IPv6:2001:4830:1200:a1::2]) by mx1.freebsd.org (Postfix) with ESMTP id C5CB413C469; Thu, 24 Jan 2008 16:36:40 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.1/8.13.8) with ESMTP id m0OGaYtJ025427; Thu, 24 Jan 2008 10:36:34 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.1/8.13.8/Submit) id m0OGaY4A025426; Thu, 24 Jan 2008 10:36:34 -0600 (CST) (envelope-from brooks) Date: Thu, 24 Jan 2008 10:36:34 -0600 From: Brooks Davis To: Yousif Hassan Message-ID: <20080124163634.GA25331@lor.one-eyed-alien.net> References: <1201125022.2106.67.camel@localhost> <20080123222047.GA14264@lor.one-eyed-alien.net> <1201190313.2591.7.camel@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline In-Reply-To: <1201190313.2591.7.camel@localhost> User-Agent: Mutt/1.5.16 (2007-06-09) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Thu, 24 Jan 2008 10:36:34 -0600 (CST) Cc: freebsd-net@freebsd.org, Brooks Davis , "Bruce M. Simpson" Subject: Re: network interface monitoring? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jan 2008 16:36:41 -0000 --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 24, 2008 at 10:58:33AM -0500, Yousif Hassan wrote: > Thank you to all who responded. >=20 > The suggestion was made to use devd or ifstated. Both sound like > excellent tools, but I'm currently being tripped up by a core problem - > both tools rely on the kernel to notify userland of link state changes > (which makes complete sense!). This is all well and good - but the > current issue I'm seeing is that the link state doesn't get updated > without running "ifconfig" again - is this by design? A known "issue?" >=20 > An example: > 1. Unplug network cable from bfe0 > 2. I run ifconfig > 3. I see that interface bfe0's status is "no carrier". Good. > 4. I plug the cable into bfe0 > 5. Wait... wait... look in /var/log/messages... wait more.. NO STATE > CHANGE - the longest I've waited was 2 minutes, which is already too > long > 6. run "ifconfig" again > 7. Link state immediately changes, logs to /var/log/messages, devd > scripts run >=20 > Is this a known behavior? It seems like the link state changes should > happen automatically, without something to "trigger" them. Isn't there > some kind of poll or interrupt sequence? I'm on 6.3 RC2 (will upgrade > to 6.3-RELEASE imminently) but can't imagine this code changed? Does > this work differently/better in 7.0? It's known but not well understood and is a driver bug. -- Brooks --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFHmL6RXY6L6fI4GtQRAniAAJ412B+KsDqaoAA9lQDbBQH9FCbTnACeJH9b rdAlvAK0c40kOwvIPKwXo7Y= =thqW -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD--