[Bug 260068] e1000 & igb in netmap mode removes VLAN headers

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 26 Nov 2021 18:19:56 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260068

            Bug ID: 260068
           Summary: e1000 & igb in netmap mode removes VLAN headers
           Product: Base System
           Version: 12.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: ozkan.kirik@gmail.com

Hello,

I'm using stable/12 (aba2dc46dfa5, Oct 24 2021). I'm hitting some
problems with if_vlan + parent interface netmap. It was working before the
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258258 was fixed. Maybe
something missing for netmap implementation.

The way to reproduce:
[HostA] <----> [HostB]

HostA
- ifconfig em1.110 create 10.10.10.2/24 up
- ping 10.10.10.1
- tcpdump -eni em1
17:05:11.393411 00:50:56:26:69:ea > 00:0c:29:84:5d:88, ethertype
802.1Q (0x8100), length 102: vlan 110, p 0, ethertype IPv4, 10.10.10.1
> 10.10.10.2: ICMP echo reply, id 32844, seq 53, length 64

HostB
- ifconfig em1.110 create 10.10.10.1/24 up
- ifconfig em1 promisc -tso -lro -rxcsum -txcsum -tso6 -rxcsum -txcsum
-tso6 -rxcsum6 -txcsum6 -vlanhwtag -vlanhwcsum -vlanhwtso
- ./bridge -i em1 -i em1^ &
# tcpdump -eni em1
17:05:11.391215 00:0c:29:84:5d:88 > 00:50:56:26:69:ea, ethertype IPv4
(0x0800), length 98: 10.10.10.2 > 10.10.10.1: ICMP echo request, id
32844, seq 53, length 64

Pinging from HostA to HostB through if_vlan. When netmap bridge is
closed, everything is okey, we can see the original packet on tcpdump.
But when netmap bridge is started, packet's vlan header was lost as
you can see above. The netmap bridge app is the original
tools/tools/netmap/bridge.c application.
HostA and HostB connected back to back directly with a patch cable.
There is no switch between them.

I tried this test on real hardware em, igb and vmware e1000 (em) nics.
Problem is easy to reproduce.
But there is no such problem on ix and ixl cards.

Is it possible to check and fix?
Best Regards,
Özkan KIRIK

-- 
You are receiving this mail because:
You are the assignee for the bug.