[PATCH v2 0/2] vhost-user, dhcp: Fix iPXE network boot over vhost-user

Laurent Vivier
2026-04-16T16:21:45Z

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 <<EOF
kernel http://dl-cdn.alpinelinux.org/alpine/v3.23/releases/x86_64/netboot/vmlinuz-lts 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-lts
initrd http://dl-cdn.alpinelinux.org/alpine/v3.23/releases/x86_64/netboot/initramfs-lts
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: 20260416161618.3826904-1-lvivier@redhat.com

v2:
- Added Reviewed-by from David Gibson on both patches
- Rebased on top of v6 TCP series

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