Re: Getting 802.1Q VLAN ID from tagged packets with hardwareacceleration on

From: Garry Dolley
Date: Sun Mar 22 2009 - 16:56:35 EST


On Sun, Mar 22, 2009 at 09:55:15AM -0400, Jeremy Jackson wrote:
> On Sun, 2009-03-22 at 06:26 -0700, Garry Dolley wrote:
> > Dear linux-net,
> >
> > I'm running the stock kernel of Ubuntu Hardy:
> > 2.6.27-7-generic #1 SMP Tue Nov 4 19:33:06 UTC 2008 x86_64 GNU/Linux
> >
> > My eth0 is:
> > driver: e1000e
> > version: 0.3.3.3-k6
> > firmware-version: 2.1-12
> > bus-info: 0000:04:00.0
> >
> > If have several VLANs configured on eth0, such as:
> >
> > eth0.105
> > eth0.106
> > eth0.107
> >
> > When I run tcpdump on each, I can see the traffic for the respective VLAN.
> > When I tcpdump eth0, I can see the traffic for *all* the VLANs.
> >
> > So far so good.
> >
> > Except, when I look at the traffic for all the VLANs, the VLAN ID is not
> > present. Many hours of googling, looking at the e1000e driver code and VLAN
> > code, and picking other ppl's brains, has led me to believe that VLAN
> > hardware acceleration is stripping the tag from the frame, so I can't actually
> > see the VLAN ID.
> >
> > So my question is, is it possible to turn hwaccel off for this card without
> > hacking and recompiling the driver? Or can I get the VLAN ID using some other
> > method that I don't know about?
>
> ethtool -K--offload ethX [rx on|off] [tx on|off] [sg on|off] [tso on|
> off] [ufo on|off] [gso on|off]

Looking at the ethtool man page for all the those options doesn't
reveal anything about any of them being for hw accelerated VLAN
encoding/decoding. Yet, I'll play around with some and see if it
helps.

> > Also, some of code and commit messages I've read seem to indicate even if
> > tcpdump could show me the VLAN ID, I wouldn't necessarily get any of this
> > traffic unless eth0 is in promisc mode.
> >
> > My main goal here is to be able to bridge eth0 to another device and ensure
> > that that device can see all the tagged traffic that comes in eth0. eth0 is
> > plugged into a Cisco switch and is a trunk port.
>
> Bridging + vlans has some limitations (being worked on at present IIRC) in Linux kernel. FYI

Thanks for the info.

--
Garry Dolley
ARP Networks, Inc. http://www.arpnetworks.com
Data center, VPS, and IP transit solutions (818) 206-0181
Member Los Angeles County REACT, Unit 336 WQGK336
Blog http://scie.nti.st

--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html