diff options
author | Richard Scheffenegger <rscheff@FreeBSD.org> | 2024-11-14 08:19:34 +0000 |
---|---|---|
committer | Richard Scheffenegger <rscheff@FreeBSD.org> | 2024-11-14 08:19:49 +0000 |
commit | 8f5a2e216f4cb955150c8f88ab21eaecc5adc8b9 (patch) | |
tree | b04da87a5f076f8cbf86960df0c9e0fc5f99209d | |
parent | c9047eb7b30d8f88fd90b62fbb40d90e046bd1d7 (diff) |
tcp: fix cwnd recalculation during limited transmit
Properly calculate the expected flight size (cwnd) during
limited transmit. Exclude the SACK scoreboard from
consideration when still in limited transmit.
PR: 282605
Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D47541
-rw-r--r-- | sys/netinet/tcp_input.c | 2 | ||||
-rw-r--r-- | sys/netinet/tcp_output.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 3dfdb13994a5..7ef480d949e4 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2813,7 +2813,7 @@ enter_recovery: tcp_sack_adjust(tp); tp->snd_cwnd += (tp->t_dupacks - tp->snd_limited) * - maxseg; + maxseg - tcp_sack_adjust(tp); /* * Only call tcp_output when there * is new data available to be sent diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 38ce2e3f3145..854cce2a0cc1 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -292,7 +292,8 @@ again: len = 0; p = NULL; if ((tp->t_flags & TF_SACK_PERMIT) && - (IN_FASTRECOVERY(tp->t_flags) || SEQ_LT(tp->snd_nxt, tp->snd_max)) && + (IN_FASTRECOVERY(tp->t_flags) || + (SEQ_LT(tp->snd_nxt, tp->snd_max) && (tp->t_dupacks >= tcprexmtthresh))) && (p = tcp_sack_output(tp, &sack_bytes_rxmt))) { int32_t cwin; |