On Mon, Dec 08, 2025 at 08:20:15AM +0100, Stefano Brivio wrote: > Now that we have a new clamped_scale() function, which makes it simple > to specify a precise usage factor, change the amount of sending buffer > we want to use at and above 4 MiB: 75% looks perfectly safe. > > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > tcp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tcp.c b/tcp.c > index 026546a..37aceed 100644 > --- a/tcp.c > +++ b/tcp.c > @@ -773,7 +773,7 @@ static void tcp_rtt_dst_check(const struct tcp_tap_conn *conn, > } > > /** > - * tcp_get_sndbuf() - Get, scale SO_SNDBUF between thresholds (1 to 0.5 usage) > + * tcp_get_sndbuf() - Get, scale SO_SNDBUF between thresholds (1 to 0.75 usage) > * @conn: Connection pointer > */ > static void tcp_get_sndbuf(struct tcp_tap_conn *conn) > @@ -788,7 +788,7 @@ static void tcp_get_sndbuf(struct tcp_tap_conn *conn) > return; > } > > - v = clamped_scale(sndbuf, sndbuf, SNDBUF_SMALL, SNDBUF_BIG, 50); > + v = clamped_scale(sndbuf, sndbuf, SNDBUF_SMALL, SNDBUF_BIG, 75); > > SNDBUF_SET(conn, MIN(INT_MAX, v)); > } > -- > 2.43.0 > -- 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