From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id CBD535A061D; Thu, 04 Dec 2025 08:45:42 +0100 (CET) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 4/8] tcp: Acknowledge everything if sending buffer is less than SNDBUF_BIG Date: Thu, 4 Dec 2025 08:45:37 +0100 Message-ID: <20251204074542.2156548-5-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251204074542.2156548-1-sbrivio@redhat.com> References: <20251204074542.2156548-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: NXXCMBEAZC6D4LCYGQP6U563TLHC7BPM X-Message-ID-Hash: NXXCMBEAZC6D4LCYGQP6U563TLHC7BPM X-MailFrom: sbrivio@passt.top 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: Max Chernoff , David Gibson 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: ...instead of checking if it's less than SNDBUF_SMALL, because this isn't simply an optimisation to coalesce ACK segments: we rely on having enough data at once from the sender to make the buffer grow by means of TCP buffer size tuning implemented in the Linux kernel. Use SNDBUF_BIG: above that, we don't need auto-tuning (even though it might happen). SNDBUF_SMALL is too... small. Signed-off-by: Stefano Brivio --- tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp.c b/tcp.c index e4c5a5b..fbf97a0 100644 --- a/tcp.c +++ b/tcp.c @@ -1079,7 +1079,7 @@ int tcp_update_seqack_wnd(const struct ctx *c, struct tcp_tap_conn *conn, if (bytes_acked_cap && !force_seq && !CONN_IS_CLOSING(conn) && !(conn->flags & LOCAL) && !tcp_rtt_dst_low(conn) && - (unsigned)SNDBUF_GET(conn) >= SNDBUF_SMALL) { + (unsigned)SNDBUF_GET(conn) >= SNDBUF_BIG) { if (!tinfo) { tinfo = &tinfo_new; if (getsockopt(s, SOL_TCP, TCP_INFO, tinfo, &sl)) -- 2.43.0