diff options
author | Florin Coras <fcoras@cisco.com> | 2022-01-05 08:47:11 -0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2022-01-06 20:18:53 +0000 |
commit | 0f8b91f5d8e4bc2f9a0166440abaf00b2bda29bb (patch) | |
tree | ff5c4e458895bdd96a7ee20f285e9035df203e44 /src/vnet/tcp/tcp_input.c | |
parent | 273968cf2d0343b2f4e3217f25c0752f20cf03c5 (diff) |
tcp: use bytes delivered to compute cwnd
Should estimated cwnd better with loss
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idd75d40dbab212ac0a5d533009c5540b1a58f4c4
Diffstat (limited to 'src/vnet/tcp/tcp_input.c')
-rw-r--r-- | src/vnet/tcp/tcp_input.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index 30d57a3bb3e..5f165c01b4c 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -866,8 +866,7 @@ tcp_cc_handle_event (tcp_connection_t * tc, tcp_rate_sample_t * rs, tcp_fastrecovery_first_on (tc); tc->rxt_delivered += tc->sack_sb.rxt_sacked; - tc->prr_delivered += tc->bytes_acked + tc->sack_sb.last_sacked_bytes - - tc->sack_sb.last_bytes_delivered; + tc->prr_delivered += rs->delivered; } else { @@ -1042,6 +1041,9 @@ process_ack: if (tc->cfg_flags & TCP_CFG_F_RATE_SAMPLE) tcp_bt_sample_delivery_rate (tc, &rs); + else + rs.delivered = tc->bytes_acked + tc->sack_sb.last_sacked_bytes - + tc->sack_sb.last_bytes_delivered; if (tc->bytes_acked + tc->sack_sb.last_sacked_bytes) { |