aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-10-09 12:04:50 -0700
committerDave Barach <openvpp@barachs.net>2020-10-13 17:38:10 +0000
commit3e2ec42a07ae51aed54e63d05e743a338c666e30 (patch)
tree0c78abb18527c5580529c885e68d892ecf8aada9
parent91413ace3e9c341da414a2a3892f9378fb977b24 (diff)
tcp: fix bt acked_sacked on recovery
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2e2d76661fbb07dd8c6afa3583bb18e01b7a7fb6
-rw-r--r--src/vnet/tcp/tcp_bt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/tcp/tcp_bt.c b/src/vnet/tcp/tcp_bt.c
index 9c255fa0dc9..de2e7ad7f8e 100644
--- a/src/vnet/tcp/tcp_bt.c
+++ b/src/vnet/tcp/tcp_bt.c
@@ -599,11 +599,12 @@ tcp_bt_sample_delivery_rate (tcp_connection_t * tc, tcp_rate_sample_t * rs)
tc->lost += tc->sack_sb.last_lost_bytes;
delivered = tc->bytes_acked + tc->sack_sb.last_sacked_bytes;
+ /* Do not count bytes that were previously sacked again */
+ delivered -= tc->sack_sb.last_bytes_delivered;
if (!delivered || tc->bt->head == TCP_BTS_INVALID_INDEX)
return;
- /* Do not count bytes that were previously sacked again */
- tc->delivered += delivered - tc->sack_sb.last_bytes_delivered;
+ tc->delivered += delivered;
tc->delivered_time = tcp_time_now_us (tc->c_thread_index);
if (tc->app_limited && tc->delivered > tc->app_limited)