From owner-freebsd-current@FreeBSD.ORG Wed Oct 13 06:42:46 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 9CB6C16A4CE; Wed, 13 Oct 2004 06:42:46 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9302C43D41; Wed, 13 Oct 2004 06:42:45 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i9D6gddV070706; Wed, 13 Oct 2004 09:42:39 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 48052-14; Wed, 13 Oct 2004 09:42:38 +0300 (EEST) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i9D6gctv070703; Wed, 13 Oct 2004 09:42:38 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id i9D6gRAa001704; Wed, 13 Oct 2004 09:42:27 +0300 (EEST) (envelope-from ru) Date: Wed, 13 Oct 2004 09:42:27 +0300 From: Ruslan Ermilov To: Sam Leffler Message-ID: <20041013064227.GA1338@ip.net.ua> 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: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline In-Reply-To: <416C3C77.20406@errno.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: Gleb Smirnoff 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: Wed, 13 Oct 2004 06:42:46 -0000 --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Sam, On Tue, Oct 12, 2004 at 01:20:07PM -0700, Sam Leffler wrote: > >>This pessimizes normal traffic. > > > >m_tag_locate() doesn't look like a very expensive function. And > >with the "normal traffic", I don't expect to be more than one tag, > >no? Also, if if_nvlans > 0, this is already "pessimized". > > > > > >>We should look for a solution in the=20 > >>driver(s) to avoid sending packets up with tags when no vlans are=20 > >>configured. > >> > > > >I'd be opposed to such a change in behavior. The VLAN consumer can > >be not only vlan(4), it can equally be the ng_vlan(4) node, etc. >=20 > I'm not sure what you are opposed to or why. The issue I have is that=20 > m_tag_locate can be expensive if many packets have tags. The check for= =20 > the existence of vlans configured on the interface short-circuits this=20 > work. That vlan-tagged packets may be generated when no vlans are=20 > configured seems wrong to me and breaks the assumption used to write the= =20 > code. Changing the driver to drop the frame if ifp->if_nvlans is zero=20 > seems straightforward and could probably be hidden in the existing macro. >=20 Please take a moment and re-read what I've already said: vlan(4) is not the only consumer of VLAN frames: ng_vlan(4) is another such one, and I have a proprietary Netgraph node here that demultiplexes VLANs. If you start dropping VLAN frames in drivers when if_nvlans =3D=3D 0, this will be a problem for me. Is that clear now? Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBbM5TqRfpzJluFF4RAs/rAJ0TaG8jQ8lVGUqvwLiUpI0m3yY2zQCfVKKj YiNhXCaIeIcD7zxw6yACH14= =QS3p -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--