aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-10-09 12:04:50 -0700
committerFlorin Coras <florin.coras@gmail.com>2020-10-14 14:15:59 +0000
commitbabecb41329c68747517b8af576d08d36f42ade3 (patch)
treeb96b68a8b30dd6c1823685129c9d6e534c54b45f
parent2a335465793d77a703a844ddefb19067c1b127a0 (diff)
tcp: fix bt acked_sacked on recovery
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2e2d76661fbb07dd8c6afa3583bb18e01b7a7fb6 (cherry picked from commit 3e2ec42a07ae51aed54e63d05e743a338c666e30)
-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 d67a248b037..e5162515da6 100644
--- a/src/vnet/tcp/tcp_bt.c
+++ b/src/vnet/tcp/tcp_bt.c
@@ -591,11 +591,12 @@ tcp_bt_sample_delivery_rate (tcp_connection_t * tc, tcp_rate_sample_t * rs)
return;
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)