From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202506 header.b=wCWJX5rd; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 3FD2D5A0278 for ; Fri, 25 Jul 2025 02:23:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202506; t=1753402838; bh=m4IubFdRFKheghSOvw7aK+S9H0Ba1T9qFKIRgpEVFqI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wCWJX5rdQe4FHw5z+q1YQhAMC4MaJWvZ67iPNHd+AXwxiC1h0eIwnUpOFv0DPHari WGGirCGXrMTmwFu8VxmajTMxxk6S2g41fBojban9NPSuUs5e4sXOgRpQJWFfdPnFkM lZJvMXW42Five9chFauAaWp1U9jm0tqUwfGT3LMvfum2VMLylWp0G1HCZxCGNB12Vs Zq5BKZ/dGpunosm4Boq3jKP00AnLvvOt1M45e0oGat9InN01+hZ3BfB5QK/tKx+whz klXcWfHvmMvp9OwkYEN9bG99g6nBo9J0b+T2JvMkfsUoxKDaAKu5kRZaQ0bmx/jL0O iRZJNmrLAe8CQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4bp7nL63R2z4xcW; Fri, 25 Jul 2025 10:20:38 +1000 (AEST) Date: Fri, 25 Jul 2025 10:23:21 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [RFC v2 07/11] tap: support tx through vhost Message-ID: References: <20250709174748.3514693-1-eperezma@redhat.com> <20250709174748.3514693-8-eperezma@redhat.com> <20250724163050.170c18c4@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nQFsSXfFWAYgI3p1" Content-Disposition: inline In-Reply-To: <20250724163050.170c18c4@elisabeth> Message-ID-Hash: XLOTM7X7UQKCD772BPZWXNGT2OGVRDMC X-Message-ID-Hash: XLOTM7X7UQKCD772BPZWXNGT2OGVRDMC X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Eugenio =?iso-8859-1?Q?P=E9rez?= , passt-dev@passt.top, jasowang@redhat.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --nQFsSXfFWAYgI3p1 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 24, 2025 at 04:30:50PM +0200, Stefano Brivio wrote: > Silly comments only: >=20 > On Thu, 24 Jul 2025 10:24:39 +1000 > David Gibson wrote: >=20 > > On Wed, Jul 09, 2025 at 07:47:44PM +0200, Eugenio P=E9rez wrote: > > > No users enable vhost right now, just defining the functions. > > >=20 > > > 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. =20 > >=20 > > 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. > >=20 > > > Afterwards it writes the descriptor index into the avail->ring[] arra= y, > > > then increments avail->idx to make it visible to the kernel, then kic= ks > > > the virtqueue 1 event fd. > > >=20 > > > 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. =20 > >=20 > > Oh, that's pretty neat. > >=20 > > Nit: s/performant/performent/ >=20 > Actually, "performent" (which I had never heard before) seems to be an > archaic term for "performance": >=20 > https://www.oed.com/dictionary/performent_n >=20 > whereas "performant": >=20 > 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. --=20 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 --nQFsSXfFWAYgI3p1 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmiCzngACgkQzQJF27ox 2GfHXw/9Etgr1HgiyzUWV9JAzsrBzlcCVhrjjhzzjVnvMnkxB0vsx4VEnK0V5t8f GPU3bhKR82YTIO8zEzd6CJFLkRdoVyy2th5Zau2saaJyZcRA7duE7QzsKthLMG1T hIkewDIiAOBb1Wdr+V//0bh/mWXv4X8EXTS+335eYZbDJOuVBzhp2obBOCFFFHfz tgWhPQjG1UGSXeXXVA3/7MZ7k2mpE20g2yH29aFY35nYgloUtmQnu2XOw6Udij/P hlsoYhy4gOB56CA8NAADV86R9qEkGlDHD1g8fMDJjoszIHETprvVJh5S7T/LIs0C ZwAzSqa2fO8+Oi2HA1kT+DVkasvYUEsAARVHGx3WrggwHQpV/osJA+8AUaWm8cH7 hedUTpL8TOlpsG4C5KJz0WFq/wO8zQ2vvMMOz+ItLNsv3OYzY/sZ/Sq5TVqaUCkJ k1lZxtt4tcnc+ZI5kzRDXW0gSnEJHW6v+riKbvOIoY3nu99zYA/Dhb3NXwlMRERM 9dh2UmqUkpwY6OvpcuLG3TSopb0S99D1zeB4gI4s7tg17knPcLJ9/4v1qbA33Cd4 LFtbIvlXjvqWXQMsvYTGJ1p/fFC9V0LxbMaWRRQmdusQqzf0xMbyfJSQ2HZ35plN X/HW2cNJ5ZaxH/jSitYoE7RnJEPoUECqSlAsG355gz7zWrEDRI0= =2LMd -----END PGP SIGNATURE----- --nQFsSXfFWAYgI3p1--