public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: "Eugenio Pérez" <eperezma@redhat.com>,
	passt-dev@passt.top, jasowang@redhat.com
Subject: Re: [RFC v2 07/11] tap: support tx through vhost
Date: Fri, 25 Jul 2025 10:23:21 +1000	[thread overview]
Message-ID: <aILOeceMDj9tXPwH@zatzit> (raw)
In-Reply-To: <20250724163050.170c18c4@elisabeth>

[-- Attachment #1: Type: text/plain, Size: 2332 bytes --]

On Thu, Jul 24, 2025 at 04:30:50PM +0200, Stefano Brivio wrote:
> Silly comments only:
> 
> On Thu, 24 Jul 2025 10:24:39 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> > On Wed, Jul 09, 2025 at 07:47:44PM +0200, Eugenio Pérez wrote:
> > > No users enable vhost right now, just defining the functions.
> > > 
> > > The use of virtqueue is similar than in rx case.  fills the descriptor
> > > table with packet data it wants to send to the namespace.  Each
> > > descriptor points to a buffer in memory, with an address and a length.
> > > The number of descriptors is again defined by VHOST_NDESCS.  
> > 
> > Does the number of descriptors have to be equal for the Tx and Rx
> > queues?  For Rx, the number of descriptors is basically determined by
> > how many frames we can fit in pkt_buf.  That doesn't really apply to
> > the Tx path though, it would be more natural to define the number of
> > Tx descriptors independently.
> > 
> > > Afterwards it writes the descriptor index into the avail->ring[] array,
> > > then increments avail->idx to make it visible to the kernel, then kicks
> > > the virtqueue 1 event fd.
> > > 
> > > When the kernel does not need the buffer anymore it writes its id into
> > > the used_ring->ring[], and increments used_ring->idx.  Normally, the
> > > kernel also notifies pasta through call eventfd of the virtqueue 1.
> > > But we don't monitor the eventfd.  Instead, we check if we can reuse the
> > > buffers or not just when we produce, making the code simpler and more
> > > performant.  
> > 
> > Oh, that's pretty neat.
> > 
> > Nit: s/performant/performent/
> 
> Actually, "performent" (which I had never heard before) seems to be an
> archaic term for "performance":
> 
>   https://www.oed.com/dictionary/performent_n
> 
> whereas "performant":
> 
>   https://en.wiktionary.org/wiki/performant

Oops, you're right.  Embarrassing.  "performant" looked wrong to
me... now they both do.

> seems to be fitting here (as much as I'd favour "efficient" instead,
> because it actually sounds like a real word ;)).

Yeah, agreed.

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-07-25  0:23 UTC|newest]

Thread overview: 26+ 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-23  6:56   ` David Gibson
2025-07-09 17:47 ` [RFC v2 02/11] tap: add die() on vhost error Eugenio Pérez
2025-07-23  6:58   ` David Gibson
2025-07-09 17:47 ` [RFC v2 03/11] tap: replace tx tap hdr with virtio_nethdr_mrg_rxbuf Eugenio Pérez
2025-07-24  0:17   ` David Gibson
2025-07-09 17:47 ` [RFC v2 04/11] tcp: export memory regions to vhost Eugenio Pérez
2025-07-23  7:06   ` David Gibson
2025-07-09 17:47 ` [RFC v2 05/11] virtio: Fill .next in tx queue Eugenio Pérez
2025-07-23  7:07   ` David Gibson
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-23  7:09   ` David Gibson
2025-07-09 17:47 ` [RFC v2 07/11] tap: support tx through vhost Eugenio Pérez
2025-07-24  0:24   ` David Gibson
2025-07-24 14:30     ` Stefano Brivio
2025-07-25  0:23       ` David Gibson [this message]
2025-07-09 17:47 ` [RFC v2 08/11] tap: add tap_free_old_xmit Eugenio Pérez
2025-07-24  0:32   ` David Gibson
2025-07-09 17:47 ` [RFC v2 09/11] tcp: start conversion to circular buffer Eugenio Pérez
2025-07-24  1:03   ` David Gibson
2025-07-09 17:47 ` [RFC v2 10/11] tap: add poll(2) to used_idx Eugenio Pérez
2025-07-24  1:20   ` David Gibson
2025-07-09 17:47 ` [RFC v2 11/11] tcp_buf: adding TCP tx circular buffer Eugenio Pérez
2025-07-24  1:33   ` David Gibson
2025-07-10  9:46 ` [RFC v2 00/11] Add vhost-net kernel support Eugenio Perez Martin

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=aILOeceMDj9tXPwH@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /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).