public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: Laurent Vivier <lvivier@redhat.com>, passt-dev@passt.top
Subject: Re: [PATCH v3 0/3] Decouple iovec management from virtqueue elements
Date: Sat, 21 Mar 2026 18:40:14 +1100	[thread overview]
Message-ID: <ab5LXqGqElNalkYP@zatzit> (raw)
In-Reply-To: <20260320215816.052d2be8@elisabeth>

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

On Fri, Mar 20, 2026 at 09:58:17PM +0100, Stefano Brivio wrote:
> On Wed, 18 Mar 2026 10:19:38 +0100
> Laurent Vivier <lvivier@redhat.com> wrote:
> 
> > This series prepares the vhost-user path for multi-buffer support,
> > where a single virtqueue element can use more than one iovec entry.
> > 
> > Currently, iovec arrays are tightly coupled to virtqueue elements:
> > callers must pre-initialize each element's in_sg/out_sg pointers
> > before calling vu_queue_pop(), and each element is assumed to own
> > exactly one iovec slot. This makes it impossible for a single element
> > to span multiple iovec entries, which is needed for UDP multi-buffer
> > reception.
> > 
> > The series decouples iovec storage from elements in three patches:
> > 
> > - Patch 1 passes iovec arrays as separate parameters to vu_queue_pop()
> >   and vu_queue_map_desc(), so the caller controls where descriptors
> >   are mapped rather than reading them from pre-initialized element
> >   fields.
> > 
> > - Patch 2 passes the actual remaining out_sg capacity to
> >   vu_queue_pop() in vu_handle_tx() instead of a fixed per-element
> >   constant, enabling dynamic iovec allocation.
> > 
> > - Patch 3 moves iovec pool management into vu_collect(), which now
> >   accepts the iovec array and tracks consumed entries across elements
> >   with a running counter. This removes vu_set_element() and
> >   vu_init_elem() entirely. Callers that still assume one iovec per
> >   element assert this invariant explicitly until they are updated for
> >   multi-buffer.
> > 
> > The follow-up udp-iov_vu series builds on this to implement actual
> > multi-buffer support in the UDP vhost-user path.
> > 
> > v3:
> >   - rebase and add David's R-b
> >   - fix coding style (if)
> >   - rename in_num to in_total
> 
> Applied. I took the liberty to add David's Reviewed-by: back on 3/3 as
> the only change in 3/3 v3 compared to v2 was actually something he
> suggested.

Oh, sorry, I thought I'd already R-b'ed all of v3.

-- 
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-03-21  7:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18  9:19 Laurent Vivier
2026-03-18  9:19 ` [PATCH v3 1/3] virtio: Pass iovec arrays as separate parameters to vu_queue_pop() Laurent Vivier
2026-03-18  9:19 ` [PATCH v3 2/3] vu_handle_tx: Pass actual remaining out_sg capacity " Laurent Vivier
2026-03-18  9:19 ` [PATCH v3 3/3] vu_common: Move iovec management into vu_collect() Laurent Vivier
2026-03-20 20:58 ` [PATCH v3 0/3] Decouple iovec management from virtqueue elements Stefano Brivio
2026-03-21  7:40   ` David Gibson [this message]

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=ab5LXqGqElNalkYP@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=lvivier@redhat.com \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /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).