From owner-freebsd-net@FreeBSD.ORG Sun Feb 11 06:21:50 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C23C16A401; Sun, 11 Feb 2007 06:21:50 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from heff.fud.org.nz (203-109-251-39.static.bliink.ihug.co.nz [203.109.251.39]) by mx1.freebsd.org (Postfix) with ESMTP id 19C5313C47E; Sun, 11 Feb 2007 06:21:50 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: by heff.fud.org.nz (Postfix, from userid 1001) id A2E061CC51; Sun, 11 Feb 2007 19:21:48 +1300 (NZDT) Date: Sun, 11 Feb 2007 19:21:48 +1300 From: Andrew Thompson To: "Bruce M. Simpson" Message-ID: <20070211062148.GA33021@heff.fud.org.nz> References: <45CDFA18.3030102@incunabulum.net> <45CE0ED9.1010905@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45CE0ED9.1010905@FreeBSD.org> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-net@freebsd.org Subject: Re: [PATCH] Part 2 of low level 802.1p priority support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Feb 2007 06:21:50 -0000 On Sat, Feb 10, 2007 at 06:28:41PM +0000, Bruce M. Simpson wrote: > This updated patch moves VLAN tag decapsulation into if_ethersubr.c and > always uses M_VLANTAG, which is also passed to the upper layer. > > Tests with ping: > fxp (no VLAN_HWTAGGING support) OK > msk (VLAN_HWTAGGING enabled) OK > msk (VLAN_HWTAGGING disanabled) FAIL > > I am concerned that this may need review and testing to support > situations where we do nested VLANs or with bridge(4) before it can be > committed. This is great for the bridge, it has needed to take the vlan tag into account when deciding to forward or not. Having m_pkthdr.ether_vtag always set makes this much easier to implement. > Index: if_vlan.c > =================================================================== > RCS file: /home/ncvs/src/sys/net/if_vlan.c,v > > - if (m->m_flags & M_VLANTAG) { > - /* > - * Packet is tagged, but m contains a normal > - * Ethernet frame; the tag is stored out-of-band. > - */ > - tag = EVL_VLANOFTAG(m->m_pkthdr.ether_vtag); > - m->m_flags &= ~M_VLANTAG; ^^^^^^^^^^^^^^^^^^^^^^^^ > - } else { ... > + tag = EVL_VLANOFTAG(m->m_pkthdr.ether_vtag); In the deleted code M_VLANTAG is cleared but is not done anymore, is this right? Andrew