summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-03-12 15:50:57 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-13 10:39:40 +0000
commitb0a568a376822f97c4c8a17c546124695473b5d1 (patch)
tree9a3856c43d08d2a6a3b3b5030e522f20537ba237
parent8c6b575634d42be734a1c47abf9cecfc59f6a429 (diff)
tcp: count dupacks with no sacks
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia2e29b4776c0f8df666da39a14c5ef2fa1693c21 (cherry picked from commit 7fd59cc79c9fb0cccd0cb5c0b4579d0f0a004f6b)
-rwxr-xr-xsrc/vnet/tcp/tcp_input.c3
-rw-r--r--src/vnet/tcp/tcp_output.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index 5596c7ed1eb..a177dbc15c8 100755
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -1991,7 +1991,8 @@ tcp_segment_rcv (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
* retransmissions since we may not have any data to send */
if (seq_leq (vnet_buffer (b)->tcp.seq_end, tc->rcv_nxt))
{
- tcp_program_ack (tc);
+ tcp_program_dupack (tc);
+ tc->errors.below_data_wnd++;
error = TCP_ERROR_SEGMENT_OLD;
goto done;
}
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index 05ed7c5911e..9eba05eb71e 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -2124,6 +2124,7 @@ tcp_send_acks (tcp_connection_t * tc, u32 max_burst_size)
if (!vec_len (tc->snd_sacks))
{
tcp_send_ack (tc);
+ tc->dupacks_out += 1;
tc->pending_dupacks = 0;
return 1;
}