From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v2 1/1] iov: iov tail helpers
Date: Fri, 8 Nov 2024 10:23:44 +0100 [thread overview]
Message-ID: <20241108102344.7f83b589@elisabeth> (raw)
In-Reply-To: <20241108041930.3191345-2-david@gibson.dropbear.id.au>
On Fri, 8 Nov 2024 15:19:30 +1100
David Gibson <david@gibson.dropbear.id.au> wrote:
> In the vhost-user code we have a number of places where we need to locate
> a particular header within the guest-supplied IO vector. We need to work
> out which buffer the header is in, and verify that it's contiguous and
> aligned as we need. At the moment this is open-coded, but introduce a
> helper to make this more straightforward.
>
> We add a new datatype 'struct iov_tail' representing an IO vector from
> which we've logically consumed some number of headers. The IOV_PULL_HEADER
> macro consumes a new header from the vector, returning a pointer and
> updating the iov_tail.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> iov.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> iov.h | 76 ++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 169 insertions(+)
This looks good to me now. Should I apply this, or wait until it's
actually used?
--
Stefano
prev parent reply other threads:[~2024-11-08 9:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 4:19 [PATCH v2 0/1] RFC: IOV tail helpers David Gibson
2024-11-08 4:19 ` [PATCH v2 1/1] iov: iov " David Gibson
2024-11-08 9:23 ` Stefano Brivio [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=20241108102344.7f83b589@elisabeth \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--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).