From owner-freebsd-current@FreeBSD.ORG Tue Oct 12 20:54:12 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D75616A4CE; Tue, 12 Oct 2004 20:54:11 +0000 (GMT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A8B843D45; Tue, 12 Oct 2004 20:54:11 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id i9CKs3c7033662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 Oct 2004 00:54:04 +0400 (MSD) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id i9CKs3Rb033661; Wed, 13 Oct 2004 00:54:03 +0400 (MSD) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Wed, 13 Oct 2004 00:54:03 +0400 From: Gleb Smirnoff To: Sam Leffler Message-ID: <20041012205403.GC33427@cell.sick.ru> References: <9256D57F598E6C41B288AA7DB94F29C902DFB963@pgnmail1.pgnaplikace.cz> <20041012140205.GD29433@cell.sick.ru> <416BFE30.2090308@errno.com> <20041012185129.GA86935@ip.net.ua> <416C3C77.20406@errno.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <416C3C77.20406@errno.com> User-Agent: Mutt/1.5.6i cc: freebsd-current@freebsd.org Subject: Re: Broadcom bge and 802.1Q vlan tags X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2004 20:54:12 -0000 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