summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-10-22 19:01:39 -0700
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-11-28 09:30:38 +0000
commit67bb7ca00479e81bbc8770857d38e156a7b3824e (patch)
tree41fdf67260a395ccd2a025cc1ef8cadbbb17da78 /src/vnet/tcp/tcp.c
parent87e1bcdd7567f62fdd6510c26599580775871057 (diff)
session tcp: refactor pacer time
Type: refactor Change-Id: Ic1c3e1f7987702cd88972acc34849dc1f585d5fe Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit a8e71c8981f039588a7ca94e6ab66b4ebac784a5)
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 2de4791fde1..317ed3aa876 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -1402,11 +1402,9 @@ void
tcp_connection_tx_pacer_reset (tcp_connection_t * tc, u32 window,
u32 start_bucket)
{
- tcp_worker_ctx_t *wrk = tcp_get_worker (tc->c_thread_index);
f64 srtt = clib_min ((f64) tc->srtt * TCP_TICK, tc->mrtt_us);
- u64 last_time = wrk->vm->clib_time.last_cpu_time;
- transport_connection_tx_pacer_reset (&tc->connection, window / srtt,
- start_bucket, last_time);
+ u64 rate = (u64) window / srtt;
+ transport_connection_tx_pacer_reset (&tc->connection, rate, start_bucket);
}
static void