iPXE network boot over vhost-user was broken because passt
unconditionally skipped TCP/UDP checksum computation, relying on
VIRTIO_NET_HDR_F_DATA_VALID to tell the guest the checksums were
valid. Linux guests happened to work because their virtio-net driver
honours DATA_VALID regardless of feature negotiation, but iPXE
verifies checksums strictly and never negotiates VIRTIO_NET_F_GUEST_CSUM.
This series handles correctly VIRTIO_NET_F_GUEST_CSUM feature to fix that
and adds a minimal --dhcp-boot option that populates the BOOTP/DHCP 'file'
field, providing just enough for testing iPXE UDP and TCP support.
This can be tested as following:
- Create an ipxe file configuration
cat > boot-alpine.ipxe <http://dl-cdn.alpinelinux.org/alpine/v3.23/releases/x86_64/netboot/vmlinuz-l... console=ttyS0,115200 alpine_repo=http://dl-cdn.alpinelinux.org/alpine/v3.23/main modloop=http://dl-cdn.alpinelinux.org/alpine/v3.23/releases/x86_64/netboot/modloop-l...
initrd http://dl-cdn.alpinelinux.org/alpine/v3.23/releases/x86_64/netboot/initramfs...
boot
EOF
- Start a web server in the same directory as boot-alpine.ipxe
python -m http.server 8080
- Start passt:
./passt -f --dhcp-boot http://<host ip address>:8080/boot-alpine.ipxe --vhost-user
- Start QEMU without boot disk but with passt as networking backend
Based-on: 20260401215508.2149752-1-lvivier@redhat.com
Laurent Vivier (2):
vhost_user: Offer VIRTIO_NET_F_GUEST_CSUM
dhcp: Add --dhcp-boot option to set boot filename in DHCP replies
conf.c | 10 ++++++++++
dhcp.c | 5 ++++-
passt.1 | 6 ++++++
passt.h | 1 +
tcp_vu.c | 8 ++++++--
udp_vu.c | 7 ++++---
vhost_user.c | 1 +
7 files changed, 32 insertions(+), 6 deletions(-)
--
2.53.0