diff options
author | Florin Coras <fcoras@cisco.com> | 2022-03-14 14:23:39 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2022-03-15 16:27:02 +0000 |
commit | c6a2f1f76f79b0a6a9bc0597e0e15c0e0429343b (patch) | |
tree | 3cc8259494387b67f893768881c76aa6b2abdbe0 /src | |
parent | 3a3668201734fddb614cba025fafc4578ddf5482 (diff) |
tcp: update persist timer if data acked
Update persist timer if data sent during snd_wnd < snd_mss was acked.
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5c75ff8ddc0e49750b2088237d32afa4eda99e7f
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/tcp/tcp_input.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index 64b9334cbea..c15c328667b 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -629,11 +629,15 @@ tcp_update_snd_wnd (tcp_connection_t * tc, u32 seq, u32 ack, u32 snd_wnd) if (PREDICT_FALSE (tc->snd_wnd < tc->snd_mss)) { - /* Set persist timer if not set and we just got 0 wnd */ - if (!tcp_timer_is_active (tc, TCP_TIMER_PERSIST) - && !tcp_timer_is_active (tc, TCP_TIMER_RETRANSMIT)) + if (!tcp_timer_is_active (tc, TCP_TIMER_RETRANSMIT)) { tcp_worker_ctx_t *wrk = tcp_get_worker (tc->c_thread_index); + + /* Set persist timer if we just got 0 wnd. If already set, + * update it because some data sent with snd_wnd < snd_mss was + * acked. */ + if (tcp_timer_is_active (tc, TCP_TIMER_PERSIST)) + tcp_persist_timer_reset (&wrk->timer_wheel, tc); tcp_persist_timer_set (&wrk->timer_wheel, tc); } } |