[Bug 298073] Bridge VLAN tagging fails when using bhyve e1000 device emulation
Date: Wed, 30 Sep 2026 17:03:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=298073
S.Haupt <freebsd@m-eng.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |freebsd@m-eng.net
--- Comment #1 from S.Haupt <freebsd@m-eng.net> ---
The error message "e82545: packet too small for writable header" can be found
in usr.sbin/bhyve/pci_e82545.c line 1311:
if (pktlen < hdrlen + vlen) {
WPRINTF("packet too small for writable header");
goto done;
}
This code is part of:
static int
e82545_transmit(struct e82545_softc *sc, uint16_t head, uint16_t tail,
uint16_t dsize, uint16_t *rhead, int *tdwb)
where hdrlen and vlan are defined as:
hdrlen = ETHER_ADDR_LEN*2;
vlen = ETHER_VLAN_ENCAP_LEN;
That are just the defaults. hdrlen is being set in lines 1228, 1233, 1225,
1239, 1242 depending if tso is true or false. So maybe we must have a closer
look at this later.
The macros ETHER_ADDR_LEN and ETHER_VLAN_ENCAP_LEN are defined as:
/sys/net/ethernet.h:
#define ETHER_ADDR_LEN 6 /* length of an Ethernet address */
#define ETHER_VLAN_ENCAP_LEN 4 /* len of 802.1Q VLAN encapsulation */
So, 2*ETHER_ADDR_LEN seam to stand for the source and destination MAC
addresses.
ETHER_VLAN_ENCAP_LEN is the length of a VLAN tag.
So it translates to:
hdrlen + vlen =
ETHER_ADDR_LEN*2 + ETHER_VLAN_ENCAP_LEN =
6*2 + 4 =
16
if (pktlen < 16) {
WPRINTF("packet too small for writable header");
goto done;
}
So, it seams that a package with less than 16 bytes (128 bits) shall be sent
and that triggers this error message. Be aware that those 16 bytes may differ
depending on the actual value of hdrlen.
Can you dig down which packages trigger this error message?
Maybe by using tcpdump?
--
You are receiving this mail because:
You are the assignee for the bug.