aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/stge
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2026-09-23 13:21:00 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2026-09-24 22:16:33 +0000
commit6429199a21136cad3c82b43618a6ca2958b90bbf (patch)
tree79bc85c0f372d0a74f348c5c7982f2a011ed3f4e /sys/dev/stge
parente40c72c823c6502906d4024933f0c119b5ca17cf (diff)
llan: byte swap the receive queue entriesHEADmain
The receive queue of a PAPR logical LAN is filled in by the hypervisor, so its fields are big endian, but llan_intr() read the offset and the length of each frame natively. On a little endian kernel the length of a 134 byte frame reads as 0x86000000, and ether_input() discards the mbuf because m_len is not even large enough for an ethernet header. No frame is ever received. Reproduced on a POWER9 pseries guest with a spapr-vlan interface. Before: llan0: discard frame w/o leading ethernet header (len -2046820352 pkt len -2046820352) llan0 1500 <Link#1> 52:54:00:12:34:56 123 118 0 5838733312 7 0 that is 118 input errors out of 123 packets, dhclient(8) never completes and ping(8) loses every packet, although transmit works because the transmit path passes the lengths in hcall registers rather than through memory. Afterwards the interface gets a DHCP lease and ping reports no loss. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D59926 Approved by: jhibbits
Diffstat (limited to 'sys/dev/stge')
0 files changed, 0 insertions, 0 deletions