public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v2 0/7] Allow more use of iovecs in pcap and tap interfaces
@ 2024-02-28  1:51 David Gibson
  2024-02-28  1:52 ` [PATCH v2 1/7] iov: add some functions to manage iovec David Gibson
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: David Gibson @ 2024-02-28  1:51 UTC (permalink / raw)
  To: Laurent Vivier, passt-dev, Stefano Brivio; +Cc: David Gibson

While working on other stuff I stumbled across some patches I wrote
quite a while back (part of a larger series on indefinite hiatus).
These make it easier to use the pcap and tap functions with frames
that aren't in a single contiguous buffer.

This overlaps with some of the work in Laurent's vhost-user series, so
I've included the first of his patches and integrated it with my
changes.  There will

The first two patches have some overlap with the preliminary iovec
patches in the vhost-user series (and will certainly conflict).  I do
think the pcap interface here is slightly better than the one in the
vhost-user series, although I did ack that.

Stefano, if you've already applied / run tests for Laurent's series
then go ahead with it; I'll rework this on top of those.

Changes since v1:
 * Stefano correctly pointed out that my iov_offset() function was
   unclear in its naming and description.  Rename it to
   iov_skip_bytes() and change the wording around it to improve this.
 * Incorporate Laurent's iov helper patch, and also use
   iov_skip_bytes() to slightly simplify its functions.
 * Fix commit message for write_remainder() so that it correctly
   describes handling "short writes", not "sort writes", whatever that
   might mean.
 * Adjust parameter names and descriptions for pcap_multiple() for clarity.

David Gibson (6):
  iov: Add helper to find skip over first n bytes of an io vector
  pcap: Update pcap_frame() to take an iovec and offset
  util: Add write_remainder() helper
  pcap: Handle short writes in pcap_frame()
  pcap: Allow pcap_frame() and pcap_multiple() to take multi-buffer
    frames
  tap: Use write_remainder() in tap_send_frames_passt()

Laurent Vivier (1):
  iov: add some functions to manage iovec

 Makefile |   8 +--
 iov.c    | 198 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 iov.h    |  31 +++++++++
 pcap.c   |  56 ++++++++--------
 pcap.h   |   3 +-
 tap.c    |  41 +++---------
 util.c   |  33 ++++++++++
 util.h   |   1 +
 8 files changed, 307 insertions(+), 64 deletions(-)
 create mode 100644 iov.c
 create mode 100644 iov.h

-- 
2.43.2


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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28  1:51 [PATCH v2 0/7] Allow more use of iovecs in pcap and tap interfaces David Gibson
2024-02-28  1:52 ` [PATCH v2 1/7] iov: add some functions to manage iovec David Gibson
2024-02-29  8:09   ` Stefano Brivio
2024-02-28  1:52 ` [PATCH v2 2/7] iov: Add helper to find skip over first n bytes of an io vector David Gibson
2024-02-29  8:10   ` Stefano Brivio
2024-02-29 23:05     ` David Gibson
2024-02-28  1:52 ` [PATCH v2 3/7] pcap: Update pcap_frame() to take an iovec and offset David Gibson
2024-02-28  1:52 ` [PATCH v2 4/7] util: Add write_remainder() helper David Gibson
2024-02-28  1:52 ` [PATCH v2 5/7] pcap: Handle short writes in pcap_frame() David Gibson
2024-02-28  1:52 ` [PATCH v2 6/7] pcap: Allow pcap_frame() and pcap_multiple() to take multi-buffer frames David Gibson
2024-02-28  1:52 ` [PATCH v2 7/7] tap: Use write_remainder() in tap_send_frames_passt() David Gibson
2024-02-29  8:11 ` [PATCH v2 0/7] Allow more use of iovecs in pcap and tap interfaces 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).