summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-04-02 18:32:00 -0700
committerDave Barach <openvpp@barachs.net>2021-04-05 21:07:22 +0000
commit8f10b9050dc6318d7ccb3982eec2ed742752c6ea (patch)
tree64123a2faaf179db0558023a1a6de8c147528714 /src/vnet/tcp/tcp.c
parente2daada1d58368b7e77c2990e680bf58e4d94f2e (diff)
tcp: time infra improvements
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I998c0686f9f7dc556dda8b28e23bbed127d0aafc
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 72161ec8e17..2d384a65cfc 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -337,7 +337,7 @@ tcp_program_cleanup (tcp_worker_ctx_t * wrk, tcp_connection_t * tc)
tcp_cleanup_req_t *req;
clib_time_type_t now;
- now = transport_time_now (tc->c_thread_index);
+ now = tcp_time_now_us (tc->c_thread_index);
clib_fifo_add2 (wrk->pending_cleanups, req);
req->connection_index = tc->c_c_index;
req->free_time = now + tcp_cfg.cleanup_time;
@@ -675,7 +675,7 @@ tcp_init_snd_vars (tcp_connection_t * tc)
* handshake may make it look as if time has flown in the opposite
* direction for us.
*/
- tcp_set_time_now (tcp_get_worker (vlib_get_thread_index ()));
+ tcp_update_time_now (tcp_get_worker (vlib_get_thread_index ()));
tcp_init_rcv_mss (tc);
tc->iss = tcp_generate_random_iss (tc);
@@ -1147,7 +1147,7 @@ tcp_update_time (f64 now, u8 thread_index)
{
tcp_worker_ctx_t *wrk = tcp_get_worker (thread_index);
- tcp_set_time_now (wrk);
+ tcp_set_time_now (wrk, now);
tcp_handle_cleanups (wrk, now);
tcp_timer_expire_timers (&wrk->timer_wheel, now);
tcp_dispatch_pending_timers (wrk);