From owner-svn-src-head@FreeBSD.ORG Fri Mar 12 08:00:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB802106564A; Fri, 12 Mar 2010 08:00:15 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 91DA58FC13; Fri, 12 Mar 2010 08:00:15 +0000 (UTC) Received: from [192.168.2.102] (host86-180-59-125.range86-180.btcentralplus.com [86.180.59.125]) by cyrus.watson.org (Postfix) with ESMTPSA id 660FD46B65; Fri, 12 Mar 2010 03:00:14 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com> Date: Fri, 12 Mar 2010 08:00:12 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201003111756.o2BHukJu042449@svn.freebsd.org> <9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com> <5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org> <9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com> To: Qing Li X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205024 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2010 08:00:15 -0000 On Mar 12, 2010, at 7:52 AM, Qing Li wrote: >> Is there any way we can pick up via an assertion that an interface = driver has failed to implement this functionality? This has never been a = historic requirement, so I suspect there are a lot of drivers floating = around that fail to meet the requirement. Also, is this for IFT_ETHER = only, or also other link types? >=20 > Not sure if I get the assertion suggestion. How would an assertion = help here ? I think my proposal is similar to what Juli is suggesting: - Define a new interface capability for link state detection. - If a packet is sent or received on the interface, the capability is = set, but the link state hasn't been set, panic. - If a packet is sent received on the interface, the capability isn't = set, and the link state has been set, panic. That way the system blows up nicely and immediately, rather than = dhclient simply never working, etc. Also, that way, testing for link = state support is done at a point when we know the interface is live (a = packet is sent or received). Finally, it means that code interested in link state isn't testing for = one of (n) IFT_ types it thinks should have link state, but instead = testing specifically whether the driver declares link state support. Of = course, then you have to decide how to behave if a configured interface = ECMP is running on doesn't support link state: the answer there is = probably to assume it is always up, which would make this work for all = those drivers that current fail to implement it. And if the hardware = can't support link state, which some historic (and perhaps future) link = types can't, things still work. Robert=