public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v9 3/3] udp: Pass iov_tail to udp_update_hdr4()/udp_update_hdr6()
Date: Wed, 20 May 2026 11:07:50 +1000	[thread overview]
Message-ID: <ag0JZuRSCWqRdB1l@zatzit> (raw)
In-Reply-To: <933734ef-5d4c-40dd-9fee-bb8f182f0921@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1419 bytes --]

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.
> > > 
> > > The UDP header is built into a local struct udphdr and written back with
> > > 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 interface.
> > > 
> > > Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> > 
> > Alas, this still has a potentially aliased memcpy(), see below.
> 
> 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.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-05-20  1:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18 12:26 [PATCH v9 0/3] vhost-user,udp: Handle multiple iovec entries per virtqueue element Laurent Vivier
2026-05-18 12:26 ` [PATCH v9 1/3] udp_vu: Allow virtqueue elements with multiple iovec entries Laurent Vivier
2026-05-18 12:26 ` [PATCH v9 2/3] iov: Introduce IOV_PUSH_HEADER() macro Laurent Vivier
2026-05-18 12:26 ` [PATCH v9 3/3] udp: Pass iov_tail to udp_update_hdr4()/udp_update_hdr6() Laurent Vivier
2026-05-19  5:08   ` David Gibson
2026-05-19  8:03     ` Laurent Vivier
2026-05-20  1:07       ` David Gibson [this message]
2026-05-20  1:17         ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ag0JZuRSCWqRdB1l@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=lvivier@redhat.com \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).