From owner-freebsd-net@FreeBSD.ORG Mon Mar 29 00:12:51 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BBA916A4CE for ; Mon, 29 Mar 2004 00:12:51 -0800 (PST) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E852F43D41 for ; Mon, 29 Mar 2004 00:12:49 -0800 (PST) (envelope-from ru@ip.net.ua) 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 i2T8FjSs090714 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 29 Mar 2004 11:15:47 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.12.11/8.12.11) id i2T8CODr070793; Mon, 29 Mar 2004 11:12:24 +0300 (EEST) (envelope-from ru) Date: Mon, 29 Mar 2004 11:12:24 +0300 From: Ruslan Ermilov To: "Jacob S. Barrett" Message-ID: <20040329081224.GC70021@ip.net.ua> References: <200403251118.40718.jbarrett@amduat.net> <20040327074205.GA32984@ip.net.ua> <200403270753.53476.jbarrett@amduat.net> <200403270848.37996.jbarrett@amduat.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i7F3eY7HS/tUJxUd" Content-Disposition: inline In-Reply-To: <200403270848.37996.jbarrett@amduat.net> User-Agent: Mutt/1.5.6i X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-net@FreeBSD.org Subject: Re: Disabling VLAN_HWTAGGING X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2004 08:12:51 -0000 --i7F3eY7HS/tUJxUd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 27, 2004 at 08:48:37AM -0800, Jacob S. Barrett wrote: > On Saturday 27 March 2004 07:53 am, Jacob S. Barrett wrote: > > Well with a new "correct" MAC that pings go back and forth just fine no= w.=20 > > I will back out all my changes and see if they still work with the hard= ware > > tagging/detagging enabled. >=20 > OK, with the hardware support re-enabled the frame now enters the driver.= It=20 > is detected as VLAN frame and sent to VLAN_INPUT_TAG. The frame is then= =20 > delivered via lower hook to the ng_vlan where it doesn't match the vlan t= ag=20 > so it goes out the nomatch hook. I guess with the VLAN tag stripped from= the=20 > frame that ng_vlan can't match it. Is this the expected behavior with=20 > ng_vlan? I can just comment out the VLAN stripping line in the driver if= it=20 > is the expected behavior. That isn't a big deal really. >=20 No, this is not of course expected. Can you add some debug printfs in the ng_vlan.c:ng_vlan_rcvdata() and see if it ever receives the VLAN tag, and if so, print its value (perhaps the tag is entered by a driver in a network byte order). > I haven't done a whole lot with the network interface drivers other than = a few=20 > minor fixes here and there, but would it be hard to add some sort of flag= to=20 > enable/disable the tag stripping via ifconfig? I was thinking that could= be=20 > down through a "linkx" flag right? If the driver got the say "link1" it= =20 > would down the interface, set clear the stripping config bits, and then r= e-up=20 > the interface. Or would this be better handled by a sysctl option? Does= =20 > that sound safe and do-able? >=20 Well, for IP/TCP/UDP checksumming, it's possible to switch the corresponding bit in the interface's enabled capabilities field. OTOH, switching VLAN stripping on/off requires reprogramming of the hardware. Generally, if the hardware supports IP/TCP/UDP checksumming and or VLAN tag removal/insertion, it's better to use it. We'd better find the root of the problem and fix it. ;) Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --i7F3eY7HS/tUJxUd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAZ9poUkv4P6juNwoRAoh/AJ9cjaW4Kw8N0rx0OaZOSl7z1cYNMACfQM7C VNQoigAaEV7HB4JWaR/PCuU= =E3Ey -----END PGP SIGNATURE----- --i7F3eY7HS/tUJxUd--