From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by passt.top (Postfix) with ESMTPS id 465985A026D for ; Mon, 4 Dec 2023 15:23:25 +0100 (CET) Received: from lenovo-t14s.redhat.com ([82.142.8.70]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MHGTI-1r5k0X3fRQ-00DFRC; Mon, 04 Dec 2023 15:23:14 +0100 From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH] tcp: make tcp_sock_set_bufsize() static (again) Date: Mon, 4 Dec 2023 15:23:11 +0100 Message-ID: <20231204142311.1960715-1-lvivier@redhat.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:fWMi9zWSh76rV1BxdOv83eaoz2XZe8/8Nq6YQakfW1gleE13EeM V/Sl6GEvjOmbOGApSPQaJlUd8V+eiQNcnlBcK2QFWTXhkfyvpYVVHvgOcdmV2eygYTGepZn ibcJLoWoqX6TqTProhTBmMFfIqiiX1VMXY90hvYkzIjQNkiWw8Ezu+v8AIlBWFh/xHkrCuc WE9xLoC+nSqy31QMeuBKQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ICZwB/V2Rjw=;aTLIjLvjmdhSnby9G1x9+GhpIeJ e0dlJEzO61zcxAKVbpLu0Vs8dFe8VK1isvQoizH/LvsVlBaN7FLlVBj6yhEShrvilZtQcbNR1 aX2VpemEOcx1KKO95Wj+zLV5D9AKQIoW05onUZNr2PTUMd83W4ZzzrCcpzH8IRSgVbnicVVco wdUMIEZmg5AK3JSbCL+ExYrl/YPndmheiMFf221cVXP6CrIlbJIIpXvID3RUROe1ieoY+3rVx uJrfKPX/hCZ1yDKpeqAzo8gRAu/B66GVbjDN+RrvrlAntCkmmZyeq4rDTsHXSTvxyWlcw6itm uEDsT39avrHJw5ZdGvN/kzYAXi8X9iU24Evtfww5HuT8DGhsipK0bDnhbrLk4Ula2JZKQ93Tn XuZ8BD6Cm0IfUsvEWejcHTYupzLw0eaPlM8Q//94RRjg6241gsfAektzjMltAxwX/y14BMHx1 plFuv/k9mGOHAUL1hbX5CIpHnvPpty9nIB3oYRkr42DdAKtfBVsQWpkD1bG0MDaJ4lJ4B0k78 XBjetQ/WmKyadTgWoNBxrufLUiZSvlfZhCgaPvzpC2IofH9ombQCbMEQhfAs4SMC4KE7AmoYk Dq44J4tpR+TwHOu26QQPNJsTxsY17RfE9E/4HHqC35NoZcuD2e367FpAUiiz1bLNo8UZ9KjNl d7A6cHN/MqJGn730Jkm3Orm3aGsNebaOrspbYrc/tt90RALhwwVEizpFe9vTqavl3XchBtJcx 3dM1oy0DXQdZe0d2gAkrik/VsXJXIwXR4dhVjuXnd0Hi9gkEILpthbk1YoDop35/lybsIWuHw wkUnzbza9g+FsKuQfXatGrdtPUu/IrM+aX+Q+MwNO3iOhEmZ2hVwd4GJPPSO9X/rEopmIeosK HDupnqjxOcXD6ew== Message-ID-Hash: ZTHNYYO7THDAGKU6JLOGLK6KDTUIZP3B X-Message-ID-Hash: ZTHNYYO7THDAGKU6JLOGLK6KDTUIZP3B X-MailFrom: lvivier@redhat.com 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 , david@gibson.dropbear.id.au 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: 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. 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 --- tcp.c | 2 +- tcp.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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 = INT_MAX / 2; /* Kernel clamps and rounds, no need to check */ 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); -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); /** -- 2.42.0