[Bug 298073] Bridge VLAN tagging fails when using bhyve e1000 device emulation
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 31 Aug 2026 11:46:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=298073
Bug ID: 298073
Summary: Bridge VLAN tagging fails when using bhyve e1000
device emulation
Product: Base System
Version: 15.1-RELEASE
Hardware: amd64
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bhyve
Assignee: virtualization@FreeBSD.org
Reporter: d.danch3v@gmail.com
Hello!
This issue is only present when using the e1000 device emulation instead of
virtio-net.
Exact error: e82545: packet too small for writable header
Host machine
danny@freebsd-test:~ $ uname -a
FreeBSD freebsd-test 15.1-RELEASE-p3 FreeBSD 15.1-RELEASE-p3
releng/15.1-n283611-88e7371d9dc2 GENERIC amd64
Virtual machine:
danny@freebsd0:~ $ uname -a
FreeBSD freebsd0 15.1-RELEASE-p3 FreeBSD 15.1-RELEASE-p3
releng/15.1-n283611-88e7371d9dc2 GENERIC amd64
I have a VLAN bridge with several untagged ports (connected to VNET jails) as
well as a tagged tap interface which goes to the virtual machine.
danny@freebsd-test:~ $ ifconfig bridge1
bridge1: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric
0 mtu 1500
options=10<VLAN_HWTAGGING>
ether 58:9c:fc:10:8e:4e
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
bridge flags=1<VLANFILTER>
member: epair0a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
port 9 priority 128 path cost 2000 vlan protocol 802.1q
untagged 10
member: epair5a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
port 20 priority 128 path cost 2000 vlan protocol 802.1q
untagged 250
member: epair1a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
port 11 priority 128 path cost 2000 vlan protocol 802.1q
untagged 110
member: epair3a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
port 15 priority 128 path cost 2000 vlan protocol 802.1q
untagged 110
member: epair2a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
port 13 priority 128 path cost 2000 vlan protocol 802.1q
untagged 110
member: epair4a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
port 7 priority 128 path cost 2000 vlan protocol 802.1q
untagged 210
member: tap1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
port 6 priority 128 path cost 2000000 vlan protocol 802.1q
tagged 10,110,210,250
groups: bridge
nd6 options=9<PERFORMNUD,IFDISABLED>
I use the bhyve_config(5) format to manage my virtual machines.
Here is the output of a working FreeBSD VM config with two tap interfaces using
virtio-net
danny@freebsd-test:~ $ cat /etc/bhyve.conf.d/freebsd0.conf
rtc.use_localtime=false
x86.vmexit_on_hlt=true
x86.vmexit_on_pause=true
x86.strictmsr=false
#
name=freebsd0
cpus=2
cores=2
threads=1
sockets=1
memory.size=2G
memory.wired=true
bootrom=/usr/local/share/uefi-firmware/BHYVE_UEFI.fd
#
pci.0.0.0.device=hostbridge
pci.0.3.0.device=virtio-blk
pci.0.3.0.path=/dev/zvol/zroot/vm/freebsd0
pci.0.5.0.device=virtio-net
pci.0.5.0.backend=tap0
pci.0.6.0.device=virtio-net
pci.0.6.0.backend=tap1
pci.0.31.0.device=lpc
lpc.com1.path=/dev/nmdm1A
Here is the network setup of the virtual machine using virtio-net
danny@freebsd0:~ $ ifconfig
vtnet0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0
mtu 1500
options=880028<VLAN_MTU,JUMBO_MTU,LINKSTATE,HWSTATS>
ether 00:a0:98:3f:19:75
inet 172.19.3.100 netmask 0xffffff00 broadcast 172.19.3.255
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
vtnet1: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0
mtu 1500
options=880028<VLAN_MTU,JUMBO_MTU,LINKSTATE,HWSTATS>
ether 00:a0:98:2d:01:38
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
vtnet1.10: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP>
metric 0 mtu 1500
options=80000<LINKSTATE>
ether 00:a0:98:2d:01:38
inet 10.0.10.1 netmask 0xffffff00 broadcast 10.0.10.255
groups: vlan
vlan: 10 vlanproto: 802.1q vlanpcp: 0 parent interface: vtnet1
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
vtnet1.110: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP>
metric 0 mtu 1500
options=80000<LINKSTATE>
ether 00:a0:98:2d:01:38
inet 10.0.110.1 netmask 0xffffff00 broadcast 10.0.110.255
groups: vlan
vlan: 110 vlanproto: 802.1q vlanpcp: 0 parent interface: vtnet1
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
vtnet1.210: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP>
metric 0 mtu 1500
options=80000<LINKSTATE>
ether 00:a0:98:2d:01:38
inet 10.0.210.1 netmask 0xffffff00 broadcast 10.0.210.255
groups: vlan
vlan: 210 vlanproto: 802.1q vlanpcp: 0 parent interface: vtnet1
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
vtnet1.250: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP>
metric 0 mtu 1500
options=80000<LINKSTATE>
ether 00:a0:98:2d:01:38
inet 10.0.250.1 netmask 0xffffff00 broadcast 10.0.250.255
groups: vlan
vlan: 250 vlanproto: 802.1q vlanpcp: 0 parent interface: vtnet1
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
The above is a fully working setup that allows me to use the FreeBSD VM as a
firewall to filter traffic between the VLANs (different VNET jails) using a
single bridge setup.
However if I were to switch away from virtio-net and change the configuration
to e1000 (only on the tap1 interface which is connected to the VLAN bridge) I
get an error.
danny@freebsd-test:~ $ cat /etc/bhyve.conf.d/freebsd0.conf
rtc.use_localtime=false
x86.vmexit_on_hlt=true
x86.vmexit_on_pause=true
x86.strictmsr=false
#
name=freebsd0
cpus=2
cores=2
threads=1
sockets=1
memory.size=2G
memory.wired=true
bootrom=/usr/local/share/uefi-firmware/BHYVE_UEFI.fd
#
pci.0.0.0.device=hostbridge
pci.0.3.0.device=virtio-blk
pci.0.3.0.path=/dev/zvol/zroot/vm/freebsd0
pci.0.5.0.device=virtio-net
pci.0.5.0.backend=tap0
pci.0.6.0.device=e1000
pci.0.6.0.backend=tap1
pci.0.31.0.device=lpc
lpc.com1.path=/dev/nmdm1A
The error is:
e82545: packet too small for writable header
Network layout inside the VM (adjusted for the new interface names and
rebooted)
danny@freebsd0:~ $ ifconfig
vtnet0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0
mtu 1500
options=880028<VLAN_MTU,JUMBO_MTU,LINKSTATE,HWSTATS>
ether 00:a0:98:3f:19:75
inet 172.19.3.100 netmask 0xffffff00 broadcast 172.19.3.255
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
em0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0
mtu 1500
options=4e504bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,LRO,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6,HWSTATS,MEXTPG>
ether 00:a0:98:2d:01:38
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
em0.10: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0
mtu 1500
options=4600403<RXCSUM,TXCSUM,LRO,RXCSUM_IPV6,TXCSUM_IPV6,MEXTPG>
ether 00:a0:98:2d:01:38
inet 10.0.10.1 netmask 0xffffff00 broadcast 10.0.10.255
groups: vlan
vlan: 10 vlanproto: 802.1q vlanpcp: 0 parent interface: em0
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
em0.110: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric
0 mtu 1500
options=4600403<RXCSUM,TXCSUM,LRO,RXCSUM_IPV6,TXCSUM_IPV6,MEXTPG>
ether 00:a0:98:2d:01:38
inet 10.0.110.1 netmask 0xffffff00 broadcast 10.0.110.255
groups: vlan
vlan: 110 vlanproto: 802.1q vlanpcp: 0 parent interface: em0
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
em0.210: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric
0 mtu 1500
options=4600403<RXCSUM,TXCSUM,LRO,RXCSUM_IPV6,TXCSUM_IPV6,MEXTPG>
ether 00:a0:98:2d:01:38
inet 10.0.210.1 netmask 0xffffff00 broadcast 10.0.210.255
groups: vlan
vlan: 210 vlanproto: 802.1q vlanpcp: 0 parent interface: em0
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
em0.250: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric
0 mtu 1500
options=4600403<RXCSUM,TXCSUM,LRO,RXCSUM_IPV6,TXCSUM_IPV6,MEXTPG>
ether 00:a0:98:2d:01:38
inet 10.0.250.1 netmask 0xffffff00 broadcast 10.0.250.255
groups: vlan
vlan: 250 vlanproto: 802.1q vlanpcp: 0 parent interface: em0
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
The above does not work. Attempting to send packets through the VM on the VLAN
tagged interface does not work and it triggers the "e82545: packet too small
for writable header" error on the host machine.
Please note that I am using UEFI for the virtual machine and that the VLAN
bridge does not have a physical interface connected to it.
--
You are receiving this mail because:
You are the assignee for the bug.