Ben Greear wrote:This reminded me of something:
Patrick McHardy wrote:
Put another way, once you enable VLAN header stripping, youMAC-VLAN could gather this information based on it's parent
won't see the headers for *any* VLAN, not only for those you're
actually running locally. This is also a problem for devices
like macvlan, where it would be desirable to make use of
hardware VLAN accerlation. I was thinking about storing the
information somewhere in the packets meta-data on both RX and
TX paths, that would also allow tcpdump to properly display
packets.
device (ie, if parent-dev has VID 7, then add VID 7 to the meta
data. There would be no need for any driver changes I think.
Its actually more a problem on the RX path. VLAN acceleration
works (at least with some drivers) by enabling HW header striping
and using the VLAN ID for an immediate lookup in the VLAN devices
configured on that device. So if the VLAN is not configured on the
real device but something like macvlan, it will get the packet
without a header and without any indication that this was a VLAN
packet. This is also what causes the tcpdump problem.
I have planned to look into this when I find some time.I think a better method would be to allow disabling VLAN HW accel for a
Your suggestion of disabling VLAN acceleration in promiscous
mode sounds like a reasonable solution until then ..
NIC with
ethtool. Then, the packets will be received by the software stack with
the vlan
header intact. Something sniffing on the physical dev will
automatically get the
VLAN header.
That would also be fine. But considering that the TX path is
problematic too, a clean solution for all of this would be
to store the VLAN id in the skb. And we do have some holes
to plug currently :)