public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH 0/1] RFC: IOV tail helpers
@ 2024-11-05  2:32 David Gibson
  2024-11-05  2:32 ` [PATCH 1/1] iov: iov " David Gibson
  0 siblings, 1 reply; 6+ messages in thread
From: David Gibson @ 2024-11-05  2:32 UTC (permalink / raw)
  To: Stefano Brivio, passt-dev; +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.

David Gibson (1):
  iov: iov tail helpers

 iov.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 iov.h | 24 +++++++++++++++++
 2 files changed, 107 insertions(+)

-- 
2.47.0


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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-05  2:32 [PATCH 0/1] RFC: IOV tail helpers David Gibson
2024-11-05  2:32 ` [PATCH 1/1] iov: iov " David Gibson
2024-11-06  0:56   ` Stefano Brivio
2024-11-06  2:38     ` David Gibson
2024-11-06 10:06       ` Stefano Brivio
2024-11-08  4:18         ` David Gibson

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