From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DIIqsHml; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 6B8625A004E for ; Fri, 27 Feb 2026 15:03:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772201016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cJrKbVQZsNik+ndofdfQzh/JwuV0x4XEMQ7jtFA23tA=; b=DIIqsHmlRWlx3j+zJisezGWCGMXvkZLGx1a7v4zwcpOgKtpL+5La6M8QnGIkehmiNVEA6M JhUlNumLVE4RfipU7HFPVYe10iARuhqts1TX++IuryT50/J0dXsWTL+4jfWROWeoVRGyPG 5NG9JqKntHehkP2Mf8S/Oi220L6V+78= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-439-UQg1BiCyNPubxhehRH-hMg-1; Fri, 27 Feb 2026 09:03:34 -0500 X-MC-Unique: UQg1BiCyNPubxhehRH-hMg-1 X-Mimecast-MFC-AGG-ID: UQg1BiCyNPubxhehRH-hMg_1772201013 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 78E1319560B3 for ; Fri, 27 Feb 2026 14:03:33 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.45.225.86]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 82B1830001B9; Fri, 27 Feb 2026 14:03:32 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH 00/12] vhost-user,udp: Handle multiple iovec entries per virtqueue element Date: Fri, 27 Feb 2026 15:03:18 +0100 Message-ID: <20260227140330.2216753-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Qff0Fg09E4fwbG4152ZX9zL7jr4feLuJfB4dlcMi7eM_1772201013 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: XKXFN2Q27MCYQM6L65PLSGQSGPWADIWO X-Message-ID-Hash: XKXFN2Q27MCYQM6L65PLSGQSGPWADIWO X-MailFrom: lvivier@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Laurent Vivier X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Some virtio-net drivers (notably iPXE) provide descriptors where the=0D vnet header and the frame payload are in separate buffers, resulting in=0D two iovec entries per virtqueue element. Currently, the RX (host to=0D guest) path assumes a single iovec per element, which triggers:=0D =0D ASSERTION FAILED in virtqueue_map_desc (virtio.c:403):=0D num_sg < max_num_sg=0D =0D This series reworks the UDP vhost-user receive path to support multiple=0D iovec entries per element, fixing the iPXE crash.=0D =0D This series only addresses the UDP path. TCP vhost-user will be=0D updated to use multi-iov elements in a subsequent series.=0D =0D Laurent Vivier (12):=0D iov: Add iov_tail_truncate() and iov_tail_zero_end()=0D vhost-user: Use ARRAY_SIZE(elem) instead of VIRTQUEUE_MAX_SIZE=0D udp_vu: Use iov_tail to manage virtqueue buffers=0D udp_vu: Move virtqueue management from udp_vu_sock_recv() to its=0D caller=0D iov: Add IOV_PUT_HEADER() to write header data back to iov_tail=0D udp: Pass iov_tail to udp_update_hdr4()/udp_update_hdr6()=0D udp_vu: Use iov_tail in udp_vu_prepare()=0D vu_common: Pass iov_tail to vu_set_vnethdr()=0D vu_common: Accept explicit iovec counts in vu_set_element()=0D vu_common: Accept explicit iovec count per element in vu_init_elem()=0D vu_common: Prepare to use multibuffer with guest RX=0D vhost-user,udp: Use 2 iovec entries per element=0D =0D iov.c | 58 +++++++++++++++=0D iov.h | 16 +++-=0D tcp_vu.c | 18 +++--=0D udp.c | 65 ++++++++---------=0D udp_internal.h | 10 ++-=0D udp_vu.c | 194 +++++++++++++++++++++++++------------------------=0D vu_common.c | 82 +++++++++++++--------=0D vu_common.h | 20 +++--=0D 8 files changed, 282 insertions(+), 181 deletions(-)=0D =0D --=20=0D 2.53.0=0D =0D