Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Feb 2007 19:21:48 +1300
From:      Andrew Thompson <thompsa@freebsd.org>
To:        "Bruce M. Simpson" <bms@FreeBSD.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: [PATCH] Part 2 of low level 802.1p priority support
Message-ID:  <20070211062148.GA33021@heff.fud.org.nz>
In-Reply-To: <45CE0ED9.1010905@FreeBSD.org>
References:  <45CDFA18.3030102@incunabulum.net> <45CE0ED9.1010905@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070211062148.GA33021>