From owner-svn-src-head@FreeBSD.ORG Fri Mar 12 18:56:44 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 6C105106566B; Fri, 12 Mar 2010 18:56:44 +0000 (UTC) (envelope-from tomelite82@gmail.com) Received: from mail-qy0-f194.google.com (mail-qy0-f194.google.com [209.85.221.194]) by mx1.freebsd.org (Postfix) with ESMTP id AC6478FC1C; Fri, 12 Mar 2010 18:56:43 +0000 (UTC) Received: by qyk32 with SMTP id 32so1503512qyk.28 for ; Fri, 12 Mar 2010 10:56:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=5i8U6J5JfFHA2Be0iBwSNTfQ7cuMdo1PMUSfMNQkgWo=; b=ClpRlBuy/Pt8/TDw3ByXzD77pOOL+4rOYTzu+gF7XIEU9S8Y+C3M2BdyfrSmfEHkd+ T1hECyIjzS4zWr/rOpP2o68QZk00haSK7lPK6tx+OvUgaYhWTZ4SvJmaPaklDBhBd/qo mX7k1uwxHT33Wub7XuTHJbhsq8vh5sYG46T7A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=agi8dq8QwRTUVNhe/ANJKzAvRP/7Sm5Tbgy3JldlTfJscTvvLNxJjYR133oDQHkFSW WLeBJEibyw5c7oadD3+Ahzdz+UhE1lzMZL3mUXFoVOIkYKv3nQP+R+m8pJT5VPJQcffI Ess7eZspPHru1Wl0Ba+w1YcMKoWDqtiqG26nM= MIME-Version: 1.0 Sender: tomelite82@gmail.com Received: by 10.220.127.96 with SMTP id f32mr1496302vcs.32.1268420199145; Fri, 12 Mar 2010 10:56:39 -0800 (PST) In-Reply-To: <20100312151931.GS37184@FreeBSD.org> References: <201003111756.o2BHukJu042449@svn.freebsd.org> <9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com> <9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com> <4B99EA09.80108@elischer.org> <20100312151931.GS37184@FreeBSD.org> Date: Fri, 12 Mar 2010 10:56:39 -0800 X-Google-Sender-Auth: f52491a3395c146f Message-ID: <9ace436c1003121056q1ebc90f6gf9f87c54dd187a20@mail.gmail.com> From: Qing Li To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: src-committers@freebsd.org, Juli Mallett , svn-src-all@freebsd.org, Robert Watson , Julian Elischer , svn-src-head@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 18:56:44 -0000 > > We've got LINK_STATE_UNKNOWN, we can just initialize if_link_state to > this value in ether_ifattach(). And Qing should treat this value as > LINK_STATE_UP in routing decision until better times. > Thanks everyone for your input. I generally try to avoid overloading a variable to have more than 1 meaning. For example, the if_tun interface is in LINK_STATE_UNKNOWN until it's opened, then the link can be one of the other two states. Also, some of the pseudo drivers such as if_tun do not call ether_ifattach(). Right now I like to implement Robert's suggestion of using if_capabilities field. I'd like to create a new flag, IFCAP_LINKSTATE_NOTIFY flag. The routing decision will check against the if_link_state if this bit is set. Only a handful of drivers have this capability. So updating those drivers is a small task. Do we agree on this approach? -- Qing