public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Eugenio Perez Martin <eperezma@redhat.com>
To: passt-dev@passt.top
Cc: jasowang@redhat.com
Subject: Re: [RFC v2 00/11] Add vhost-net kernel support
Date: Thu, 10 Jul 2025 11:46:21 +0200	[thread overview]
Message-ID: <CAJaqyWdqDYOi7zLaVST57awCuiOc+DiB0QChV5B6krVraWAhrw@mail.gmail.com> (raw)
In-Reply-To: <20250709174748.3514693-1-eperezma@redhat.com>

On Wed, Jul 9, 2025 at 7:48 PM Eugenio Pérez <eperezma@redhat.com> wrote:
>
> 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.
>

For reference, iperf without namespaces and veth both reaches
~47.8Gbit/s in both directions.

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


      parent reply	other threads:[~2025-07-10  9:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Eugenio Perez Martin [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=CAJaqyWdqDYOi7zLaVST57awCuiOc+DiB0QChV5B6krVraWAhrw@mail.gmail.com \
    --to=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --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).