Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2007 12:40:07 +0100
From:      "Bruce M. Simpson" <bms@FreeBSD.org>
To:        Jon Otterholm <jon.otterholm@ide.resurscentrum.se>
Cc:        freebsd-net@freebsd.org, Andrew Thompson <thompsa@FreeBSD.org>
Subject:   Re: QinQ
Message-ID:  <4721D217.2010003@FreeBSD.org>
In-Reply-To: <47210D92.1050403@ide.resurscentrum.se>
References:  <47210D92.1050403@ide.resurscentrum.se>

next in thread | previous in thread | raw e-mail | index | archive | help
Jon,

Thanks for the patch.

Jon Otterholm wrote:
> I was wondering about the possibility of adding support for QinQ
> ("Double tagged frames" / "Nested vlans"). Attached is a patch against
> -STABLE to add this support. I have not tested this but was told it
> should work.
>
> Would it be possible to get this into CURRENT?
>   

In the 7.x train, I made some changes to always decode the VLAN tags and 
embed the information in the mbuf header. I did this to support 802.1p 
quality-of-service in the stack - VLAN 0 frames mean 'the whole subnet, 
not its vlan', and previously the stack just ignored these.

I can't remember off the top of my head if I merged this to 6.x - it 
means the patch herein may not even be needed, unless you need to do 
demux of vlan tags to arbitrary depth, something I think is best left to 
netgraph.

What I can tell you is that if you look at the comments in 
if_ethersubr.c, I left q-in-q as a possible todo item. I don't use it 
myself - however - the same approach might be considered for cards which 
have q-in-q support in their hardware tag/queue processing.

Kip Macy may be able to advise further - I understand the newer 10gbps 
cards are quite programmable in this respect.

However I believe it means we may not need to apply vlan(4)'s notion of 
having to call if_promisc() if the card already knows to supply the 
stack with frames for VLAN 'foo', i.e. if VLAN 'bar' is nested in 'foo'. 
Promiscuous mode is best avoided particularly with high rates of 
packets-per-second.

regards,
BMS



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