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=202608 header.b=NZn32fE2; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id D800F5A026E for ; Mon, 03 Aug 2026 05:46:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202608; t=1785728795; bh=Er6/gZKmPDikXn+PvvzwLt0Ul9PG7/Mgo9RBcEn7XK8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NZn32fE22qwI3xbiPnQPf/eqmN2TFt583FxvMCA0HHrFkCTgljh6IZRAtV8kaL4mZ fcJtyS2slhjZ3njF5NYOiv/84N6A7UjFX1lrfPr0QRQCpemzTjAtPtP267kmb1qvZr 8rwLs5zYDMfAWc/IlVMKaNMhsbJU6XbtpNn5FxD8vNVho6BvDLzb9TO0Q4ZFYlAIIC Dce3MX8xmDTy9nyInvpKXujSLSc7ZC0GjIH3PsqO/5hmZLOa0NOTWv8t9Asjy2BsaP UXkm+pbCwKAUT8FgYEmQQ758FqIZM71QBKzaWKO9MY4clJJ1pMS2HP/avfLk3US0+d dHUM4iuNvYbjg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4hD2fM1c55z4wFN; Mon, 03 Aug 2026 13:46:35 +1000 (AEST) Date: Mon, 3 Aug 2026 13:17:44 +1000 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH v6 06/12] tcp: Pass queue pair explicitly through TCP send path Message-ID: References: <20260731161617.3550626-1-lvivier@redhat.com> <20260731161617.3550626-7-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+JeDVh4tOcPuQP97" Content-Disposition: inline In-Reply-To: <20260731161617.3550626-7-lvivier@redhat.com> Message-ID-Hash: WHIFO6HYTQNUSBESR5S2JTBBBZCBIBGN X-Message-ID-Hash: WHIFO6HYTQNUSBESR5S2JTBBBZCBIBGN 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: passt-dev@passt.top 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: --+JeDVh4tOcPuQP97 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 31, 2026 at 06:16:11PM +0200, Laurent Vivier wrote: > Thread a qpair parameter from the entry points (tcp_sock_handler, > tcp_timer_handler, tcp_tap_handler, tcp_defer_handler) through every > intermediate function down to the vhost-user send functions, so callers > explicitly select the target RX virtqueue instead of hardcoding > QPAIR_DEFAULT. >=20 > Add a qpair parameter to tcp_send_flag(), tcp_data_from_sock(), > tcp_rst_do() and its tcp_rst() macro, tcp_rewind_seq(), > tcp_data_from_tap(), tcp_conn_from_sock_finish(), tcp_connect_finish(), > tcp_tap_window_update(), tcp_conn_from_tap(), tcp_rst_no_conn(), > tcp_keepalive(), and tcp_inactivity(). >=20 > tcp_vu_send_flag() and tcp_vu_data_from_sock() now use the passed > qpair to select the RX virtqueue instead of always using > QPAIR_DEFAULT. >=20 > The buffer-based path (tcp_buf.c) does not thread qpair since it is > only used in non-vhost-user mode. >=20 > No functional change. >=20 > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson =2E. with one minor concern about comment clarity: [snip] > @@ -1862,13 +1869,14 @@ static int tcp_sock_consume(const struct tcp_tap_= conn *conn, uint32_t ack_seq) > * @c: Execution context > * @conn: Connection pointer > * @now: Current timestamp > + * @qpair: Queue pair to process IIUC, for tcp_data_from_sock() and other socket initiated entry points, the qpair number will eventually be derived from which epoll set the event arrived on, yes? I'm not sure "Queue pair to process" really conveys that. --=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 --+JeDVh4tOcPuQP97 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmpwCE0ACgkQzQJF27ox 2GcV+w/+L5hN47QLSXb3UwDOum47hdX3olqjZcr0acFJPgrbkev9cVgItXCFjRiG OMhTskokRc7cs7dYB191fX6GuDToIqSMRe0Relf/dfDOLFSYdwiw2QqQPHD0ijoJ sleK3T8aoEIXQkdU1xDIyVpTsTbKLHd70MFmKexf4slnSfUq/3UnASREBxhyvaqW ujD1cLnMQjA7bdBE4XiAWclZ+ySW7gg3tKLm6mve8Tlo6mMwJMXy27jBmVyHEpqT FQdO84A9ItDesMeT5RwETIRy1TpU5xLJhEctIwoUJ72L1vlPI6QLMS65bYL+JzR/ iwqNAFu5UKbuvtM45cER3OU5ByR5/GZT073AfkonXkj65J2H9eKMH3bk67tn360I IkBWR4LO4xZSD7POTJ96Sw6lq11asE3LfeZ/RcRxHgNLnTF4YnBUm7yXafsAAL6y RxbVmCpmwAYKx6TYIBJbuJqhnTtLROYU8WRhoph1u5Mi50lrXaoszK1na+QcR4/I iqFDqeANKg7tNNQhTf708MV74n61+LcUMH5tKScpi52fJqCvTt3C6juayPjLZ9FD u1Tapf39wbaWZ55+w0TIvkh1paHGyfC5+Gel+e3jeRKm2V8n2Dm/+iZleA2D0an2 OcmqhuuRlBGDoVfcMro1sDhP0es7hk+lw1KQF1vDUezhfSwahVA= =23Wr -----END PGP SIGNATURE----- --+JeDVh4tOcPuQP97--