Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Mar 2007 23:40:06 +0000
From:      Bruce M Simpson <bms@incunabulum.net>
To:        Yar Tikhiy <yar@comp.chem.msu.su>
Cc:        freebsd-net@freebsd.org
Subject:   Re: [PATCH] Ethernet cleanup; 802.1p input and M_PROMISC
Message-ID:  <45EA0756.2000107@incunabulum.net>
In-Reply-To: <20070303215359.GB40430@comp.chem.msu.su>
References:  <45E8B964.2090200@incunabulum.net> <20070303215359.GB40430@comp.chem.msu.su>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45EA0756.2000107>