From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202602 header.b=OhQ19xFX; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 7FC4F5A026D for ; Wed, 20 May 2026 03:18:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1779239878; bh=+otTK7lbPnwiNyw6zbMzch+RU6IbU93xYok1ChPXCt4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OhQ19xFX5xuf2Epx15tvOaQxlQtbe1K25SzN9rV5VlR3DbYuSB61bSGJn+5BXSm8p zCBhGUHpZsh9aGinTXLE301X5GBNFHwV3cw7RlBlnDAmlCmCmp3SnTQzLM1IjsIpXu 6BD51EThk57t/WyCYb8ejFgcNbNCiuBzw8o2blnnmZ3Swm66bJfE0HM3d9nGk9tbmW EP6kxT8qBrEC6aXTuFKjh9b+F7GNTtx/oDPW4Ili5FPPRprRJarC19Q+dctAYAmsR7 4js1KtDjWCL0d2wLvoJVCWmw90wcxWotCCDUjfrdBI/HiVRxo5DlOJHDdYUwD8YByQ wnalUURZnZ7wA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gKtvV5RCRz58mt; Wed, 20 May 2026 11:17:58 +1000 (AEST) Date: Wed, 20 May 2026 11:07:50 +1000 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH v9 3/3] udp: Pass iov_tail to udp_update_hdr4()/udp_update_hdr6() Message-ID: References: <20260518122625.2290034-1-lvivier@redhat.com> <20260518122625.2290034-4-lvivier@redhat.com> <933734ef-5d4c-40dd-9fee-bb8f182f0921@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3b3cn+2EJtE9/jl7" Content-Disposition: inline In-Reply-To: <933734ef-5d4c-40dd-9fee-bb8f182f0921@redhat.com> Message-ID-Hash: LR7X7VNN2MJW6QFFGN5O54OQVNZJM46W X-Message-ID-Hash: LR7X7VNN2MJW6QFFGN5O54OQVNZJM46W X-MailFrom: dgibson@gandalf.ozlabs.org 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: passt-dev@passt.top 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: --3b3cn+2EJtE9/jl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 19, 2026 at 10:03:39AM +0200, Laurent Vivier wrote: > On 5/19/26 07:08, David Gibson wrote: > > On Mon, May 18, 2026 at 02:26:25PM +0200, Laurent Vivier wrote: > > > Change udp_update_hdr4() and udp_update_hdr6() to take an iov_tail > > > pointing at the UDP frame instead of a contiguous udp_payload_t buffer > > > and explicit data length. This lets vhost-user pass scatter-gather > > > virtqueue buffers directly without an intermediate copy. > > >=20 > > > The UDP header is built into a local struct udphdr and written back w= ith > > > IOV_PUSH_HEADER(). On the tap side, udp_tap_prepare() wraps the > > > existing udp_payload_t in a two-element iov to match the new interfac= e. > > >=20 > > > Signed-off-by: Laurent Vivier > >=20 > > Alas, this still has a potentially aliased memcpy(), see below. >=20 > Did you see I updated patch 2 to avoid the memcpy() if the header is > already in place? > (I think I should have removed your R-b...) I saw the note in the changelog, but I didn't spot the place in the code specifically - I think I skipped patch 2 because of the R-b and assumed the change was in patch 3. Unfortunately the one in this patch is still there. --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --3b3cn+2EJtE9/jl7 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmoNCWYACgkQzQJF27ox 2Gd4dA//YGuZ9i+DhjuDs+poZWd/wiE0HFjuCTSHfCl0cQFqqtPWj+zx+M/OG8Se ermd9BBoRXW57hgXrLIcNij57nT/mfIUsLbnoz5XG51d+ieqCWafEab7NxEOXJth o5dnqW0KzeLH/6tDfHZ1RzM/bIxHp6xAHeibGbESuIg7nvS1xYamaoC1wnOcI55a Mp15m3c3AI2+S9n+SWzFh0SEBEskGmq0h06FVN5Wowcwg3JC8CCZ3H1tZ3wg0bbZ A3ZCykCjeHvzZNz6m+V2OAZ0vl/fxJ0+b8amG4nIvp0uPgcDGNzdR2qoSykfARmB WmT6sMBNfMzGePPGh+Ts09FH3bGG6qUMLCledNiOr9SzD/IOWmEzD8mpezUigDIG 6y7F6G8mg7se0KGr9j9wgJkRr0lgkZmdv25/nHIELXLhAdtb3qGnP57ePNIsAT9+ wTeXuZTdOCCpcEILGz8yUcxs2eqA/sPME6SZDwgNZTHEfTdHcGVkJuWolQePJLhU LIICrPdLJjtXXDz+jMlu1ubRr+EZ92aLpE+ZmugLqE9+/eC7uSBJ2+wL9pNltRIn crMNWWTMrgXmJcOmbc4SK08qX54XQmMmhasXvNuURq2oYgrTxPqtIg0yTHXVFVfL FklICkkeBxVYuPpI6bBdoxRAT6CImgKRTWmpi/9k7o8DlWW1cLI= =h1CL -----END PGP SIGNATURE----- --3b3cn+2EJtE9/jl7--