summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/tcp')
-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)