From owner-freebsd-net@FreeBSD.ORG Sat Mar 3 23:40:09 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81C6016A403 for ; Sat, 3 Mar 2007 23:40:09 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by mx1.freebsd.org (Postfix) with ESMTP id 5AA7413C471 for ; Sat, 3 Mar 2007 23:40:09 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id 2D95F1F4246; Sat, 3 Mar 2007 18:40:09 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by out1.internal (MEProxy); Sat, 03 Mar 2007 18:40:09 -0500 X-Sasl-enc: 960qFYlYnpOtgTHW4x87idybWh7Kn2IAFqS442MV9f6F 1172965209 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id 7DAD82AE19; Sat, 3 Mar 2007 18:40:08 -0500 (EST) Message-ID: <45EA0756.2000107@incunabulum.net> Date: Sat, 03 Mar 2007 23:40:06 +0000 From: Bruce M Simpson User-Agent: Thunderbird 1.5.0.9 (X11/20070125) MIME-Version: 1.0 To: Yar Tikhiy References: <45E8B964.2090200@incunabulum.net> <20070303215359.GB40430@comp.chem.msu.su> In-Reply-To: <20070303215359.GB40430@comp.chem.msu.su> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: [PATCH] Ethernet cleanup; 802.1p input and M_PROMISC 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: Sat, 03 Mar 2007 23:40:09 -0000 Yar Tikhiy wrote: > > In fact, there two independent flags indicating interface's readiness: > IFF_UP and IFF_DRV_RUNNING. The former is controlled by the admin > and the latter, by the driver. E.g., an interface can be UP but > not really ready to operate due to h/w reasons, or vice versa. > Perhaps we should check both flags to see if the interface is, so > to say, up and running. if_vlan.c has an obvious macro for that, > and it can go to if_var.h to avoid code duplication if we decide it's > the right way to take. > Thanks for looking at this. The purpose of the IFF_UP check is to immediately drop frames destined for an interface which is administratively configured down. Surely if ether_input() is called from the driver, there should be no need to check IFF_DRV_RUNNING? Indeed if the hardware flips to a state where it is not running but its internal queues or descriptor rings are draining, this might cause frames to be lost? Regards, BMS