diff options
| author | Stefano Brivio <sbrivio@redhat.com> | 2025-12-08 08:02:01 +0100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-12-08 08:02:01 +0100 |
| commit | f423e12e98b4ad30e14f7b1ab259f36d75cb1c04 (patch) | |
| tree | cf8284a866b0b551833982f167b649c76ca645dd | |
| parent | 6305b6ceec518c4f8cca4a8e9cc7624e376f84c9 (diff) | |
| download | passt-f423e12e98b4ad30e14f7b1ab259f36d75cb1c04.tar passt-f423e12e98b4ad30e14f7b1ab259f36d75cb1c04.tar.gz passt-f423e12e98b4ad30e14f7b1ab259f36d75cb1c04.tar.bz2 passt-f423e12e98b4ad30e14f7b1ab259f36d75cb1c04.tar.lz passt-f423e12e98b4ad30e14f7b1ab259f36d75cb1c04.tar.xz passt-f423e12e98b4ad30e14f7b1ab259f36d75cb1c04.tar.zst passt-f423e12e98b4ad30e14f7b1ab259f36d75cb1c04.zip | |
tcp: Change usage factor of sending buffer in tcp_get_sndbuf() to 75%
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 <sbrivio@redhat.com>
| -rw-r--r-- | tcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)); } |
