Re: Broadcom bge and 802.1Q vlan tags

From: Gleb Smirnoff <glebius_at_freebsd.org>
Date: Wed, 13 Oct 2004 00:54:03 +0400
On Tue, Oct 12, 2004 at 01:20:07PM -0700, Sam Leffler wrote:
S> I'm not sure what you are opposed to or why.  The issue I have is that 
S> m_tag_locate can be expensive if many packets have tags.  The check for 
S> the existence of vlans configured on the interface short-circuits this 
S> work.  That vlan-tagged packets may be generated when no vlans are 
S> configured seems wrong to me and breaks the assumption used to write the 
S> code.  Changing the driver to drop the frame if ifp->if_nvlans is zero 
S> seems straightforward and could probably be hidden in the existing macro.

Ruslan means that no vlan(4)s can be configured on interface, but
VLANs can be supported via ng_vlan(4). This problem has already been
raised by Ruslan and Yar in cvs-all.

Just an idea (probably not best one): create another interface flag,
which is set by ng_ether when its "lower" hook is connected, smth like
IFF_WRAPPED.

And your macro is going to be like:

#define	NOVLANS(ifp)	(ifp->if_nvlans == 0 && !(ifp-if_flags & IFF_WRAPPED))

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
Received on Tue Oct 12 2004 - 18:54:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:17 UTC