aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-03-22 16:12:53 -0700
committerDave Barach <vpp@barachs.net>2024-03-26 17:24:07 +0000
commite8ea6be8dfb626b5bb4ff3355ce8037724ce1d83 (patch)
tree9bfdc93044413cf90c818959ff1a4ee98dcdaa60 /src/vnet/tcp
parent4941afb4f96a20df7dc8b6688f7921a3d713b77d (diff)
tcp: avoid fr segments less than mss if possible
Type: improvement Change-Id: I958e059384db3c13a29f64be96877f57617bbae2 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp')
-rw-r--r--src/vnet/tcp/tcp_output.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index e232ed43b69..78148cd5695 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -1810,7 +1810,11 @@ tcp_retransmit_sack (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
break;
}
- max_bytes = clib_min (hole->end - sb->high_rxt, snd_space);
+ max_bytes = hole->end - sb->high_rxt;
+ /* Avoid retransmitting segment less than mss if possible */
+ if (snd_space < tc->snd_mss && max_bytes > snd_space)
+ break;
+ max_bytes = clib_min (max_bytes, snd_space);
max_bytes = snd_limited ? clib_min (max_bytes, tc->snd_mss) : max_bytes;
if (max_bytes == 0)
break;