public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [RFC v2 00/11] Add vhost-net kernel support
@ 2025-07-09 17:47 Eugenio Pérez
  2025-07-09 17:47 ` [RFC v2 01/11] tap: implement vhost_call_cb Eugenio Pérez
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Eugenio Pérez @ 2025-07-09 17:47 UTC (permalink / raw)
  To: passt-dev; +Cc: jasowang

vhost-net is a kernel device that allows to read packets from a tap
device using virtio queues instead of regular read(2) and write(2).
This enables a more eficient packet processing, as the memory can
be written directly by the kernel to the userspace and back, instead
of wasting bandwith on copies, and it enables to batch many packets
in a single notification (through eventfds) both tx and rx.

Namespace tx performance improves from ~26.3Gbit/s to ~36.9Gbit/s.

Namespace rx performance improves from ~16BGbit/s to ~17.26Gbit/s.

RFC: At this moment only these are supported:
* Receive l2 packets from the vhost kernel to pasta
* Send l4 tcp socket received data through vhost-kernel to namespace.

TODO: Add vhost zerocopy in the tests, and compare with veth.
TODO: Implement at least UDP tx.  Or maybe we want UDP to be write(2) because
of latency?
TODO: Check style for variable declarations in for loops and use of curly
brackets as long as they wrap more than a line.
TODO: kerneldoc style function header comments

--
v2: Add TCP tx, and integrated some comments from the previous series. Please
    check each patch message for details.

Eugenio Pérez (11):
  tap: implement vhost_call_cb
  tap: add die() on vhost error
  Replace tx tap hdr with virtio_nethdr_mrg_rxbuf
  tcp: export memory regions to vhost
  virtio: Fill .next in tx queue
  tap: move static iov_sock to tcp_buf_data_from_sock
  tap: support tx through vhost
  tap: add tap_free_old_xmit
  tcp: start conversion to circular buffer
  Add poll(2) to used_idx
  tcp_buf: adding TCP tx circular buffer

 arp.c        |   2 +-
 epoll_type.h |   4 +
 passt.c      |  12 +-
 passt.h      |  11 +-
 tap.c        | 489 +++++++++++++++++++++++++++++++++++++++++++++++++--
 tap.h        |  13 +-
 tcp.c        |   2 +-
 tcp_buf.c    | 179 +++++++++++++++----
 tcp_buf.h    |  19 ++
 udp.c        |   2 +-
 10 files changed, 675 insertions(+), 58 deletions(-)

-- 
2.50.0


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

end of thread, other threads:[~2025-07-10  9:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-09 17:47 [RFC v2 00/11] Add vhost-net kernel support Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 01/11] tap: implement vhost_call_cb Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 02/11] tap: add die() on vhost error Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 03/11] tap: replace tx tap hdr with virtio_nethdr_mrg_rxbuf Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 04/11] tcp: export memory regions to vhost Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 05/11] virtio: Fill .next in tx queue Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 06/11] tap: move static iov_sock to tcp_buf_data_from_sock Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 07/11] tap: support tx through vhost Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 08/11] tap: add tap_free_old_xmit Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 09/11] tcp: start conversion to circular buffer Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 10/11] tap: add poll(2) to used_idx Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 11/11] tcp_buf: adding TCP tx circular buffer Eugenio Pérez
2025-07-10  9:46 ` [RFC v2 00/11] Add vhost-net kernel support Eugenio Perez Martin

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