From owner-svn-src-all@FreeBSD.ORG Fri Mar 12 00:08:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 464F1106566B; Fri, 12 Mar 2010 00:08:05 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-fx0-f209.google.com (mail-fx0-f209.google.com [209.85.220.209]) by mx1.freebsd.org (Postfix) with ESMTP id 358398FC12; Fri, 12 Mar 2010 00:08:03 +0000 (UTC) Received: by fxm1 with SMTP id 1so18515fxm.13 for ; Thu, 11 Mar 2010 16:08:03 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.103.50.13 with SMTP id c13mr2280349muk.63.1268352483242; Thu, 11 Mar 2010 16:08:03 -0800 (PST) In-Reply-To: <9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com> References: <201003111756.o2BHukJu042449@svn.freebsd.org> <9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com> <9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com> From: Juli Mallett Date: Thu, 11 Mar 2010 16:07:43 -0800 X-Google-Sender-Auth: 2e32f1dd685f9141 Message-ID: To: Qing Li Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r205024 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2010 00:08:05 -0000 On Thu, Mar 11, 2010 at 15:39, Qing Li wrote: > I guess it's a good time to clean things up. The if_link_state code has been > around for quite some time, either it be fully utilized or not be there at all. > The inconsistency is the root cause. Sure. There is an increasing amount of stuff that network drivers are expected to do, but they work without doing them. It's easy to think you have a functioning network driver and that you can get by without adding support for media changes and link status reporting, etc. > I will try going through these tonight and hopefully the fix all take a > common approach. If you can think of a way to add some invariants (warn the first time a driver receives a packet without having ever set the link state, make sure the media status callback sets the valid flag in the request, etc) that would probably be very helpful for people who are writing network drivers. If I hadn't been following the threads about your changes, I would have had to spend much longer fixing the Octeon port's Ethernet driver, wondering why suddenly it broke and instrumenting the routing code. A printf would go a long way. Juli.