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

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 28 Nov 2021 06:56:07 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260068

--- Comment #2 from Ozkan KIRIK <ozkan.kirik@gmail.com> ---
on HostB, still vlan headers are lost for incoming packets even with no
if_vlans created.

But i hit a strange issue to test this. To receive packages without creating
em1.110 interface, I removed the vlanhwfilter flag as:
- ifconfig em1 -vlanhwfilter

tcpdump can receive tagged frames without netmap app. After starting the netmap
bridge, tcpdump couldnt receive tagged frames. I checked the ifconfig em1 flags
for if the promisc exists and vlanhwfilter not exists. Flags are good: promisc
enabled, and vlanhwfilter not enabled. After running the commands below while
netmap bridge is running:
- ifconfig em1.110 create; ifconfig em1.110 destroy
tcpdump could recevie packages but, vlan tags stripped. 

It's possible to reproduce this issue using jails with single host.
Create a virtual host which has at least 3 e1000 interfaces.
- em0 for managing host
- em1 and em2 should be connected same network

use this commands to reproduce:

Open two ssh terminal.
First terminal:
* 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 -vlanhwfilter up
* ./bridge -i netmap:em1 -i netmap:em1^ 2>/dev/null &
* tcpdump -eni em1

Second terminal:
* jail -c -n host2 persist vnet vnet.interface=em2
* jexec host2 ifconfig em2 up
* jexec host2 ifconfig em2.110 create 10.10.10.2/24 up
* jexec host2 ping 10.10.10.1

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