From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id A7ADB5A026F for ; Tue, 5 Dec 2023 01:46:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1701737176; bh=e9VFnBJHNSFxZTSHXlLXqPCMDU/8F+CKSj2WBH1E04E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KNMJXMpGwNV0UTpl5PnOj0kwtnqCbdhf7sDE6I5ukFRuSLhhlCJe3PYos/jD7mCjd RbvksRqecr/czGrFGL21ubLzczXfX6gUd9nFmcYZ84Dhe0IVmFhrh44g4MEa3N0IUF HlcyopwyzaJ/UftX1yN6lhLUFbhGHaZrh9IpHRfSEopuTz+mi9Z1n/jmGXEBvhCigz UTwx8qy8uwCd2bfRVFxckFMnMcQ0C50flnUxR1ceTmsCYFiaw6S1IR2whnFTu0dXgb uamIBLNfq/IrPtN7VA7FK1FOeHCAMIiIJXGbgmH8kgWV0K6BGpmQXM0yaoufrWYUjX OGIw4rXKt5ZLA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Skhfw6qn7z4x5n; Tue, 5 Dec 2023 11:46:16 +1100 (AEDT) Date: Tue, 5 Dec 2023 11:46:10 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH] tcp: make tcp_sock_set_bufsize() static (again) Message-ID: References: <20231204142311.1960715-1-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OhsBKRlCFzTHRsAe" Content-Disposition: inline In-Reply-To: <20231204142311.1960715-1-lvivier@redhat.com> Message-ID-Hash: YSVPF24VAEJ2MDCKPJYOSUR2RZZ2ASMX X-Message-ID-Hash: YSVPF24VAEJ2MDCKPJYOSUR2RZZ2ASMX 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: --OhsBKRlCFzTHRsAe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 04, 2023 at 03:23:11PM +0100, Laurent Vivier wrote: > e5eefe77435a ("tcp: Refactor to use events instead of states, split out > spliced implementation") has exported tcp_sock_set_bufsize() to > be able to use it in tcp_splice.c, but 6ccab72d9b40 has removed its use > in tcp_splice.c, so we can set it static again. >=20 > Fixes: 6ccab72d9b40 ("tcp: Improve handling of fallback if socket pool is= empty on new splice") > Cc: david@gibson.dropbear.id.au > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Of course, it might get obsoleted if I get around to removing the socket buffer setting entirely. > --- > tcp.c | 2 +- > tcp.h | 1 - > 2 files changed, 1 insertion(+), 2 deletions(-) >=20 > diff --git a/tcp.c b/tcp.c > index f506cfdd3bc7..1680b516b5b9 100644 > --- a/tcp.c > +++ b/tcp.c > @@ -929,7 +929,7 @@ static void tcp_get_sndbuf(struct tcp_tap_conn *conn) > * tcp_sock_set_bufsize() - Set SO_RCVBUF and SO_SNDBUF to maximum values > * @s: Socket, can be -1 to avoid check in the caller > */ > -void tcp_sock_set_bufsize(const struct ctx *c, int s) > +static void tcp_sock_set_bufsize(const struct ctx *c, int s) > { > int v =3D INT_MAX / 2; /* Kernel clamps and rounds, no need to check */ > =20 > diff --git a/tcp.h b/tcp.h > index 27b11668f258..87a6bf9f0ee8 100644 > --- a/tcp.h > +++ b/tcp.h > @@ -23,7 +23,6 @@ int tcp_init(struct ctx *c); > void tcp_timer(struct ctx *c, const struct timespec *ts); > void tcp_defer_handler(struct ctx *c); > =20 > -void tcp_sock_set_bufsize(const struct ctx *c, int s); > void tcp_update_l2_buf(const unsigned char *eth_d, const unsigned char *= eth_s); > =20 > /** --=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 --OhsBKRlCFzTHRsAe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmVucr8ACgkQzQJF27ox 2GcfvA/6A5XLchlSlRrcTigJfB4WX2KzOpUseuES24ON0w9MPMNQaF6urzRNqk99 75GuGyF2WgZz9+/TZUuBxbDK2oJ+odOGGeXgbHOXuiyDyNiDswhUu51QmGkcsXCQ fdKRqzsbxm6zYkRmYH/b55JPISyQTn/l9MU0QudJZ9AfZrEA6MjGWrMayPvlvf/8 INF4Plp96Z2n3TpTt3mOcnig0vvyT/ONFA+mOJvFahGFG4lwoTpxAE7wJA5NAuqM 6IrsKSal9F65TNPGaw4uAtTGB7bUeWKL4u9j6jcVceBVZ8jRNhGRl7PDr/f5iqnj jBmbEPJsGvvFBtdvhuflOSDvcIvrlgqFre5/RLGwQFgjZejESl8V9jfv1kCx+pUt ViOQoSDsOz+DaNXpCor0snwRVLO+VjTfKcHyNyRnN+jUIaPViPL1Z+/51CqOC5jj Vb536O4okonn2Qa4lNNPeGqHEzwtHh4tC9a3YdK65XJoZA0zBhWGDPPGEEeIoUIG aLJmv2v4Nd7g7Qp+fkzICw6lsZOgM+4aqcA8Po3jcKIsoquOtYPti7pqUu4wpg6b imt4nxVdetgAz++h1nVXkLX3UgfH3VL3YmFN75D/3i5k4TDzFqtgYQjcPrjRxFls Xmn/zDdS85nRbyFZ4O0/692ZaCh3Ta+WXJTXTY4M5A7tQGa5Ppo= =PRqt -----END PGP SIGNATURE----- --OhsBKRlCFzTHRsAe--