[PATCH] Ethernet cleanup; 802.1p input and M_PROMISC
Bruce M Simpson
bms at incunabulum.net
Sat Mar 3 23:40:09 UTC 2007
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
More information about the freebsd-net
mailing list