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=07m8D84n; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 22AEB5A0280 for ; Wed, 23 Jul 2025 09:21:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202506; t=1753255150; bh=gbMaGMy9MKx1iRyrN6VED3gDBdpdOnLFC1IZe2NB4Js=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=07m8D84nAsnUsanDVeLD69nThYOIqzRgx+AXpKQztTJ+SPeI5kAOzii7dT18+432l NfJ0gqRzLXNPYKgp71GXAtzESmg3MvLCdeU48HjoXIWo04r9eVoU/G0AG/dyx/Ys9i CMtzPe2HyUbLf7kgqoRGnnUzsy5l8n2UKqRZUtMNNi2xL+hcRqv8CNVbJ2ogALpVRV b8uIw263N3H3aGDQ0rM4++J59u+EU27a/Wshnajzn2rEFfXVDxY29lDkkWCatuEkVA LEU8WdbkZKNAzwPmVqFxFFV0J52oDrs4kqq/FDsWJVGZK0Vm1APfMLAZXLrrh2CRYf sba+5m/xnk0dg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4bn59B0Qv1z4xLy; Wed, 23 Jul 2025 17:19:10 +1000 (AEST) Date: Wed, 23 Jul 2025 17:09:55 +1000 From: David Gibson To: Eugenio =?iso-8859-1?Q?P=E9rez?= Subject: Re: [RFC v2 06/11] tap: move static iov_sock to tcp_buf_data_from_sock Message-ID: References: <20250709174748.3514693-1-eperezma@redhat.com> <20250709174748.3514693-7-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/raBmjo36FZXMq3D" Content-Disposition: inline In-Reply-To: <20250709174748.3514693-7-eperezma@redhat.com> Message-ID-Hash: QRJ67GU44DJTKVH4IXAWHQEILVS5QNGR X-Message-ID-Hash: QRJ67GU44DJTKVH4IXAWHQEILVS5QNGR 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, 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: --/raBmjo36FZXMq3D Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 09, 2025 at 07:47:43PM +0200, Eugenio P=E9rez wrote: > As it is the only function using it. I'm always confusing it with > tcp_l2_iov, moving it here avoids it. >=20 > Signed-off-by: Eugenio P=E9rez I like making it local, I'd question whether it even needs to remain 'stati= c'. > --- > tcp_buf.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >=20 > diff --git a/tcp_buf.c b/tcp_buf.c > index c999d2e..6d79d67 100644 > --- a/tcp_buf.c > +++ b/tcp_buf.c > @@ -55,9 +55,6 @@ static_assert(MSS6 <=3D sizeof(tcp_payload[0].data), "M= SS6 is greater than 65516") > static struct tcp_tap_conn *tcp_frame_conns[TCP_FRAMES_MEM]; > static unsigned int tcp_payload_used; > =20 > -/* recvmsg()/sendmsg() data for tap */ > -static struct iovec iov_sock [TCP_FRAMES_MEM + 1]; > - > static struct iovec tcp_l2_iov[TCP_FRAMES_MEM][TCP_NUM_IOVS]; > =20 > /** > @@ -292,6 +289,8 @@ static void tcp_data_to_tap(const struct ctx *c, stru= ct tcp_tap_conn *conn, > */ > int tcp_buf_data_from_sock(const struct ctx *c, struct tcp_tap_conn *con= n) > { > + static struct iovec iov_sock[TCP_FRAMES_MEM + 1]; > + > uint32_t wnd_scaled =3D conn->wnd_from_tap << conn->ws_from_tap; > int fill_bufs, send_bufs =3D 0, last_len, iov_rem =3D 0; > int len, dlen, i, s =3D conn->sock; --=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 --/raBmjo36FZXMq3D Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmiAisIACgkQzQJF27ox 2GfZZA//eXwxHuUdc9C3x0xILXJWfXuB+Bai/xzm18AfyLj6xz4Ly/Q1nOVjJykn TyUvjM7F/JVhQohyZK1KXc+twQ3s0LFx4HoGk/vxkvBxnoc8IHxBlcAxjH8IJVSk CtrUOQoBR3TRlgbXRfkKqgjZe5t6ZwU5N0NB2zFD2CBM9/3t6Y3AtWXnE8QfOESz HdETUsI5UY0Q//OBewjGG5JPvMwFrYcQCVJxaI74Gg6zpLzMA1fDNbgZJ7+k3FOC QzEeAz5cRArX9sCBcu0h3NVqwgZDaJMJLjscFZMHzXoqYpIEDJE9QZ1TnD9SSpr4 KVFeQqvJGxCrekFV2NIAQyFGBuzOzKUJSMIJYdVlBiT9B+jTcqs3dQMx3WAkMXjt CK4dLzCiF/AWPfqjW+Z+5YPLTz1mVZ4cj0IpV6+gkvFICwrXaB5cC4gyW9CH9Duv w8xo8fw79xze+E9EWryUzAKu92ht4igzvXKGq4QZRdNNCEZ0bKyvaizwByt0TwaQ nPYmaMS8JiveKGBtUxqF2kgYRHOgYCd3SQpG3DKDjS7G+1N/FsL/G2IdzVi1JTSU FwssqQvYjA7OFt+ZK8y7JDPyKUb3GLpsnT2A6uSklbkXKG1jABbJXJHIn/OvELl6 KPvsIBy0UQFTCQLOchFxrdIqKoHAOGP/OrINoN4vLZ3DDjXVrfw= =fibQ -----END PGP SIGNATURE----- --/raBmjo36FZXMq3D--