Date: Wed, 13 Oct 2004 00:54:03 +0400 From: Gleb Smirnoff <glebius@freebsd.org> To: Sam Leffler <sam@errno.com> Cc: freebsd-current@freebsd.org Subject: Re: Broadcom bge and 802.1Q vlan tags Message-ID: <20041012205403.GC33427@cell.sick.ru> In-Reply-To: <416C3C77.20406@errno.com> References: <9256D57F598E6C41B288AA7DB94F29C902DFB963@pgnmail1.pgnaplikace.cz> <20041012140205.GD29433@cell.sick.ru> <416BFE30.2090308@errno.com> <20041012185129.GA86935@ip.net.ua> <416C3C77.20406@errno.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041012205403.GC33427>