Broadcom bge and 802.1Q vlan tags
Gleb Smirnoff
glebius at freebsd.org
Tue Oct 12 13:54:12 PDT 2004
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
More information about the freebsd-current
mailing list