From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 1127F5A0082 for ; Thu, 5 Jan 2023 06:45:46 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Nnb6Z1Hwdz4y0f; Thu, 5 Jan 2023 16:45:42 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1672897542; bh=7UT1Yei0TwI+/xpQT5dnwWN441+YtJQFjuFal/G7nzw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B4dL30Cy4dbzKM+zToWqrTmrpv+lF77C+ejyV9cTmRawdMtiihFu2oHTm311Ata6m G7a3hChiYnWmZk+tuazFiGSCBaGE+YEvuKe7twlvyQ0IC9MkRZ5Zh+hfW/YreTUOwS j/DS1USl86p4xzsUJa58h6QAKoBarTpWa6fEDdeg= Date: Thu, 5 Jan 2023 15:53:01 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v2 05/18] tcp: Improve interface to tcp_l2_buf_flush() Message-ID: References: <20221209054228.4085990-1-david@gibson.dropbear.id.au> <20221209054228.4085990-6-david@gibson.dropbear.id.au> <20230104184516.30e10877@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e30vOho3EUGmONVn" Content-Disposition: inline In-Reply-To: <20230104184516.30e10877@elisabeth> Message-ID-Hash: LLQT7J6TW2FGIRHDFISBDQVYADZMZQ2D X-Message-ID-Hash: LLQT7J6TW2FGIRHDFISBDQVYADZMZQ2D 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.3 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: --e30vOho3EUGmONVn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 04, 2023 at 06:45:16PM +0100, Stefano Brivio wrote: > On Fri, 9 Dec 2022 16:42:15 +1100 > David Gibson wrote: >=20 > > Currently this takes a msghdr, but the only thing we actually care about > > in there in is the io vector. Make it take an io vector directly. We = also >=20 > s/in is/is/, if you re-spin. Fixed. > > have a weird side effect of zeroing @buf_used. Just pass this by value > > and zero it in the caller instead. >=20 > That was done on purpose: call a "flush" function, and that will set the > right value for @buf_used. Hm, I guess. It seemed odd to me because most of the rest of the management of the buf_used variables is open coded in the caller. > On the other hand, after 3/18, I think both options are equally > readable, and if you found it weird, so be it. More to the point I think the old way obstructed the changes I make later in the series. --=20 David Gibson | 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 --e30vOho3EUGmONVn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoULxWu4/Ws0dB+XtgypY4gEwYSIFAmO2V6YACgkQgypY4gEw YSKxNxAAoDMNr6y5rCFp2yM40jjbUnF+3+3vCZkjMEX5/D28LLZP7TquAgLBzTj7 OBfRa6Tq488RkQZVt8N3awRDc0Gndi9oFaC1qNzBplsEhxXIBYUC1dxIdP6TXwDO N/CBPFkOxKtCyuDVQkF2SYgLnuG2GKEjqJ10+57eJqysfomwiWcuJgXFoA39O2jc 2w9qeMQBR5ckF7BmokEhVS7oTv7WiuMm7Vg8SrLTawYxkZw2OgIySoCgC036xzbX XJYsCU7UGRaLtigQUli0Ywkwfpy4F8UV2cP279WAliVW1e3wJz10u9CmZpJSUh0s lvfM44YZU2IRO7ZL2E8ApxViC+ne93NyMJy0DlKjO+gksfv5/yuqUAuGwiEQkRln fhu1gwgYvHiqOEP3U0uy7VtFrhVB/5mbA47DkUnWB1G7c/gJLC8aUqjxP50+1FqD UfKS4iim+Ze037xzcYVf+w1tsEJ8bemTatm2iBkKywKINb89u2/XWDsW1b3UbmQv 9Pil+8NxoTKxR2TqFueUIsgcZQRuE8bce355xz1llCv8N9GAr/KWohxNeBEmsOJ7 k5NiAxVEmoZ5Z0uJhw5ZpRfn49qSJ3tpoBWFyycSDlU42wNRCRPXoMwW+hHs2NGz QpFkLrSXXI2OnsD2VGiUvmLL1jC+d0DhCU7Kth9Rver1942A6Ao= =WGKv -----END PGP SIGNATURE----- --e30vOho3EUGmONVn--