From owner-freebsd-current Sun Dec 22 3:38:38 2002 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 A466337B401; Sun, 22 Dec 2002 03:38:26 -0800 (PST) Received: from smtp.kolej.mff.cuni.cz (smtp.kolej.mff.cuni.cz [195.113.25.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8AD743ED8; Sun, 22 Dec 2002 03:38:24 -0800 (PST) (envelope-from dan@obluda.cz) X-Envelope-From: dan@obluda.cz Received: from obluda.cz (dan.kolej.mff.cuni.cz [195.113.21.110]) by smtp.kolej.mff.cuni.cz (8.11.6/8.11.6) with ESMTP id gBMBcKr32369; Sun, 22 Dec 2002 12:38:20 +0100 (CET) (envelope-from dan@obluda.cz) Message-ID: <3E05A429.7080506@obluda.cz> Date: Sun, 22 Dec 2002 12:38:17 +0100 From: Dan Lukes User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2b) Gecko/20021106 X-Accept-Language: cs MIME-Version: 1.0 To: Hiten Pandya Cc: freebsd-current@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, dcs@newsguy.com Subject: Re: VLAN v.s. NIC with VLAN hardware support bug. References: <3E038A1A.6070203@obluda.cz> <3E03A86C.6D15F650@newsguy.com> <3E03C706.5060508@obluda.cz> <20021221233424.GA23657@unixdaemons.com> In-Reply-To: <3E038A1A.6070203@obluda.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hiten Pandya wrote: > On Sat, Dec 21, 2002 at 02:42:30AM +0100, Dan Lukes wrote the words in > effect of: > > Dan, I believe you submitted a PR about this [1], what does patch try to > solve, regarding VLAN hardware support? > > [1] http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/46405 Hi. May be, I'm doesn't understand fully what you are asked for - my english isn't as good as should be. The problem: NIC with hardware VLAN support pass whole TAG to vlan_input(_tag). The TAG has the following structure: TAG & 0x8000 -> CFI (TAG & 0x7000)>>13 -> priority TAG & 0x0FFF -> VLAN ID The vlan_input(_tag) doesn't extract the VLAN ID from tag, it tried match the whole tag to configured VLAN's. It work - unless CFI or an priority bit has nonzero value. An example: you have configured VLAN 256 on your FreeBSD. The arrived packed has TAG 0x0100 (=256). For this packet it works, as TAG matched configured VLAN. Lets another packet has TAG 0x4100 (=16640). It's dropped because there are no configured vlan with ID 16640 - but should not be dropped, as it IS packed for VLAN 256 with priority 4. In short - vlan_input(_tag) doesn't extract the correct bits from TAG, so it drop packets that shouldn't be dropped. It's the bug fixed by my patches. I tested it on 4.7. The patch for CURRENT isn't tested, but it's simple to analyse that there are the same problem. It's the sufficient answer to your question ? Please note (it's mentioned in my PR also), the vlan code doesn't correctly handle the VLAN ID of "zero" which has special meaning . My patches doesn't solve it. Dan -- Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206 root of FIONet, KolejNET, webmaster of www.freebsd.cz AKA: dan@obluda.cz, dan@freebsd.cz, dan@kolej.mff.cuni.cz To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message