From owner-freebsd-net@FreeBSD.ORG Fri Jan 25 20:57:05 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 3DAB316A41B for ; Fri, 25 Jan 2008 20:57:05 +0000 (UTC) (envelope-from redchin@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.184]) by mx1.freebsd.org (Postfix) with ESMTP id AE39313C468 for ; Fri, 25 Jan 2008 20:57:04 +0000 (UTC) (envelope-from redchin@gmail.com) Received: by fk-out-0910.google.com with SMTP id b27so880660fka.11 for ; Fri, 25 Jan 2008 12:57:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=T3aUwWb9VSJiKNYDdn/mQpGsTeUv1lkaPznsLeTP8NA=; b=OJAD2Fv6/g7IyUt8MdVNYtMg0ry8Re06/fDz1QaNh8HRBNwa4iU2aGCJvCVo5QXUs1A6+RccI4Kv89AWLPDuw9l6wAv6KU98bTfOqNULs975BlsuVstpq4IN37X6gPHiZE60X9uMxsCyRq9kLc64bIgr4mXvPdndx7c9ooOd4as= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=aOzkkVZoBIbLstUX2y/Yx89uA37G3a5E55RrMcqLfSRo9T8HMqbrLl67OlqVy6YQAsLqirEDC6yZEKsuGDa34pTLyJMxmdYvMeBATm7+ADFkUWmuZE/twV445XxqU4CUEJBjUz0WhqbC17CYtq/GFzliju50koiQ8hygQGjgb+c= Received: by 10.82.124.10 with SMTP id w10mr4330822buc.33.1201292906279; Fri, 25 Jan 2008 12:28:26 -0800 (PST) Received: by 10.82.180.4 with HTTP; Fri, 25 Jan 2008 12:28:26 -0800 (PST) Message-ID: <1d3ed48c0801251228t3f9e69a0x54bae7b261f2cbf3@mail.gmail.com> Date: Fri, 25 Jan 2008 12:28:26 -0800 From: "Kevin Downey" To: "Yousif Hassan" In-Reply-To: <1201275694.1537.13.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1201125022.2106.67.camel@localhost> <20080123222047.GA14264@lor.one-eyed-alien.net> <1201190313.2591.7.camel@localhost> <20080124163634.GA25331@lor.one-eyed-alien.net> <1201198042.19736.5.camel@localhost> <20080125051059.GA22410@cdnetworks.co.kr> <1201275694.1537.13.camel@localhost> Cc: freebsd-net@freebsd.org 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: Fri, 25 Jan 2008 20:57:05 -0000 On Jan 25, 2008 7:41 AM, Yousif Hassan wrote: > Hi Pyun YongHyeon, > > First, I'd like to say thank you for sending this and trying to resolve > my (and others') problems with bfe driver. > > First the good news - your patch appears to solve nearly all of the > issues I've discovered and/or reported. After installing the kernel > with your patch, under normal circumstances, link up and down events are > detected automatically by the kernel now, and passed to userland. I > tested this with some customd devd scripts to make sure the devd > notification from if_net.c was ok, and it was. This is greatly improved > behavior! > > A couple minor nits - > > First: The first hunk out of the first file in the patch didn't apply > cleanly for me but it could be because I'm on a different file revision? > I'll attach the .rej file. It's no big deal, because it was trivial to > adjust it by hand, then I was able to compile. > > Second: There's one last remaining issue. If I set the bfe0_enable > parameter in rc.conf to "DHCP NOAUTO" (so that it doesn't try to do > anything on boot, because it can slow the process down while it's > negotiating an address), then the link state changes get queued up (as > before) until I manually run ifconfig once. After that one time, > everything from that point on is fine (meaning your changes are > working). For all I know, this might be unrelated to your driver patch, > but it was interesting. Setting the bfe0_enable to "DHCP" meant > everything worked fine from the start. Setting it to "UP" also was fine > in terms of your link state changes working (although in this > case /etc/rc.d/dhclient script won't work because the interface needs to > be configured in rc.conf to use DHCP; I must run "/sbin/dhclient bfe0" > manually in that case). > > In all cases, THANK YOU - this is much much much better than before and > I can live with using bfe0_enable="DHCP" instead of "DHCP NOAUTO". Feel > free to ask me for more testing if you want to try and investigate the > one remaining queue issue. > the rc.conf manpage has a few options regarding the function of dhcp including: synchronous_dhclient (is currently in beta test. Set to ``bool'') to start dhclient(8) only in response to interface events and not syn- chronously at startup. This behavior can be overridden on a per-interface basis by replacing the ``DHCP'' keyword in the ifconfig_ variable with ``SYNCDHCP'' or ``NOSYNCDHCP''. and background_dhclient (bool) Set to ``YES'' to start the DHCP client in background. This can cause trouble with applications depending on a work- ing network, but it will provide a faster startup in many cases. -- The Mafia way is that we pursue larger goals under the guise of personal relationships. Fisheye