public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v2 0/1] RFC: IOV tail helpers
@ 2024-11-08  4:19 David Gibson
  2024-11-08  4:19 ` [PATCH v2 1/1] iov: iov " David Gibson
  0 siblings, 1 reply; 3+ messages in thread
From: David Gibson @ 2024-11-08  4:19 UTC (permalink / raw)
  To: passt-dev, Stefano Brivio; +Cc: David Gibson

As mentioned here's my draft patch adding a helper to pull headers off
an IOV, checking for contiguity, alignment and so forth.  It's based
around the idea of an "iov tail", that is an iov from which you've
already consumed (in some sense) some data from the beginning.  It
uses an explicit offset to track this, so we don't have to copy an
entire iovec array in order to trim a bit off it.  But, it's built so
that if you pull enough off the front to remove some entire buffers,
it won't repeatedly have to step through them working out later
offsets.

It may be somewhat overengineered, let me know what you think of the
interface.

v2:
 * Substantial changes to comments and names, to make the purpose clearer

David Gibson (1):
  iov: iov tail helpers

 iov.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 iov.h | 76 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 169 insertions(+)

-- 
2.47.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-08  9:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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