summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-08-16 10:33:49 -0700
committerJohn Lo <loj@cisco.com>2019-09-20 21:35:19 +0000
commit82df1eb9002cf0d9e06474626e864ae2ce8a34b6 (patch)
treed1509aab793c73524acfa19c32e284d3df738e6c /src/vnet/tcp/tcp.c
parentbda2844c47d6cd363735f03d0ce1711bdee11557 (diff)
tcp: allow cc algos to set pacing rate
Type: feature Change-Id: Ie7f0f5d2a476d401ede567e422abb953b2bb4a78 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit d206724e78d99aee5d91d43fb0832d51d70eb57a)
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 327703327aa..4628e4ba38d 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -1263,17 +1263,11 @@ const static transport_proto_vft_t tcp_proto = {
void
tcp_connection_tx_pacer_update (tcp_connection_t * tc)
{
- f64 srtt;
- u64 rate;
-
if (!transport_connection_is_tx_paced (&tc->connection))
return;
- srtt = clib_min ((f64) tc->srtt * TCP_TICK, tc->mrtt_us);
- /* TODO should constrain to interface's max throughput but
- * we don't have link speeds for sw ifs ..*/
- rate = tc->cwnd / srtt;
- transport_connection_tx_pacer_update (&tc->connection, rate);
+ transport_connection_tx_pacer_update (&tc->connection,
+ tcp_cc_get_pacing_rate (tc));
}
void