public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH 0/2] vhost-user, dhcp: Fix iPXE network boot over vhost-user
@ 2026-04-03  8:02 Laurent Vivier
  2026-04-03  8:02 ` [PATCH 1/2] vhost_user: Offer VIRTIO_NET_F_GUEST_CSUM Laurent Vivier
  2026-04-03  8:02 ` [PATCH 2/2] dhcp: Add --dhcp-boot option to set boot filename in DHCP replies Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: Laurent Vivier @ 2026-04-03  8:02 UTC (permalink / raw)
  To: passt-dev; +Cc: Laurent Vivier

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: 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-03  8:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-03  8:02 [PATCH 0/2] vhost-user, dhcp: Fix iPXE network boot over vhost-user Laurent Vivier
2026-04-03  8:02 ` [PATCH 1/2] vhost_user: Offer VIRTIO_NET_F_GUEST_CSUM Laurent Vivier
2026-04-03  8:02 ` [PATCH 2/2] dhcp: Add --dhcp-boot option to set boot filename in DHCP replies Laurent Vivier

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).