tcp: update snd_congestion only during congestion 42/34842/3
authorFlorin Coras <fcoras@cisco.com>
Thu, 6 Jan 2022 19:58:24 +0000 (11:58 -0800)
committerFlorin Coras <fcoras@cisco.com>
Fri, 7 Jan 2022 00:38:24 +0000 (16:38 -0800)
commitc8144356338995a277593bc08315d3b1ddcc8cb3
tree4eed6c04bf1e924e9d7312efe20af34db429c88b
parented5be47009aca45008ba9d44e76ac51ec1f7f156
tcp: update snd_congestion only during congestion

If running without sacks, if snd_una does not cover snd_congestion fast
recovery can be missed but the two heuristics from RFC6582 should avoid
that.

Also snd_congestion was used as a means of inferring if the connection
recently exited congestion while setting the persist timer but that does
not always work correctly if not congested.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I94d4ac738cdd4f7f23f62e97dd63059de1cd4af9
src/vnet/tcp/tcp.c
src/vnet/tcp/tcp_input.c
src/vnet/tcp/tcp_timer.h