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=202410 header.b=diV9Z1RT; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 6BDBC5A004C for ; Wed, 16 Oct 2024 03:01:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1729040490; bh=d3ktVdXw4lH0SIY/AKjO1nwDtf2oqdodbWQ0Lyx1tsM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=diV9Z1RTIzTLnyFf2lUe3OZYSC/fGonx3AsVhcKRm4upvb+5LIXNGxDM8nQpg9oLP DoE4Cyn74DL1c2Ep2KzasKce2I5V/G4hAzgj7nERZrHMplYZ9TPagYfQ2ba5VOhQBE LX5oJyDSb4jQTpTw6TVcnRwl4cwlWzlvlYsrNQRxar872M2lIPnxLjE+XX6TysDrFO qvmrBoCUsL89Hq9+gnvmZvSazGmtqdpTYpLQTcJe4KK2dSu9u/IKXx91wV3ol6/wk+ k9fzozkYdaBXkrYC3l9XDApGNXo23L1+uprRwEIyR65stP+CbRoZCEfKrKe7t1UGmn Bqh6du2oHCC/g== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XSt2f6c58z4wnr; Wed, 16 Oct 2024 12:01:30 +1100 (AEDT) Date: Wed, 16 Oct 2024 11:41:34 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v8 7/8] vhost-user: add vhost-user Message-ID: References: <20241010122903.1188992-1-lvivier@redhat.com> <20241010122903.1188992-8-lvivier@redhat.com> <20241015215438.1595b4d7@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jYiBZQvXUxAwyFGI" Content-Disposition: inline In-Reply-To: <20241015215438.1595b4d7@elisabeth> Message-ID-Hash: 7XOTYJ76UTBGNLO7UE76TEQLZCZKFFWE X-Message-ID-Hash: 7XOTYJ76UTBGNLO7UE76TEQLZCZKFFWE 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: Laurent Vivier , 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: --jYiBZQvXUxAwyFGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 15, 2024 at 09:54:38PM +0200, Stefano Brivio wrote: > [Still partial review] [snip] > > + if (peek_offset_cap) > > + already_sent =3D 0; > > + > > + iov_vu[0].iov_base =3D tcp_buf_discard; > > + iov_vu[0].iov_len =3D already_sent; >=20 > I think I had a similar comment to a previous revision. Now, I haven't > tested this (yet) on a kernel with support for SO_PEEK_OFF on TCP, but > I think this should eventually follow the same logic as the (updated) > tcp_buf_data_from_sock(): we should use tcp_buf_discard only if > (!peek_offset_cap). >=20 > It's fine to always initialise VIRTQUEUE_MAX_SIZE iov_vu items, > starting from 1, for simplicity. But I'm not sure if it's safe to pass a > zero iov_len if (peek_offset_cap). > I'll test that (unless you already did) -- if it works, we can fix this > up later as well. I believe I tested it at some point, and I think we're already using it somewhere. --=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 --jYiBZQvXUxAwyFGI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmcPC68ACgkQzQJF27ox 2GfolhAAmkgiSojJAUY+ZZdgxHT+1MzK4oMRRCPsRM/PoGXeXsT6NMrc06vIkZSv TXAbAjYSQPdjIM1F0rB41Y2RLsGSxJJCAKVdnKQaVfXWwCVx7updAYlh12FPTeuT j747IGOPvgOpOv0Ydudq34cLfU3tvgr7yuiHvhplWKoXxPf6DGOE11cwriTSrMoP uB/MqytoGZzwXIwwBazftJM5ZMN3FoN2ZsVMtTJBFma9OkuTSgO3B9IQlpRT32/A ZcyGBXGBwhLw9gyEuOC2lAzcQZ/tMh0L6pcK3EcKxYptBGGfLlVyGLDzC4JEhNsj jqGBIiqvcB6WAsMB94y71N0yNyldH4J/Ubv8YtX5MRmzTHBFOImAnx0MqXNCmX2R IfdVt21tSD7aMi7aVeubZBgvdzYkOPYOe62N1g1Rtg6zsUN7YkHuYQiK4C9tojre 0wTIUIra/00LwoBmDrbeddwtwZ6tT/lLPpdT0z3AgocXLf1OaCoN9LXPvtym5Ymw X5YoJh2gQ8razUmeEFCHUdhZcOUtn7waxtSmKQfN68T8NcyFfKheFwfeXmU9g8/I E0Fd71dTRsJK709YCOvYXkUSRAZf4C3ApTATO83CkGV0KWkQFvcMACWv/HhoJhCk JoJSdzuy1B1A0XgEKsdIL8I1aYwL8G9ZFqaDPCN/rBDlOOnvJaw= =L86I -----END PGP SIGNATURE----- --jYiBZQvXUxAwyFGI--