aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_input.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_input.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_input.c')
-rw-r--r--src/vnet/tcp/tcp_input.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index 509732fa876..b64c236bd47 100644
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -149,7 +149,7 @@ tcp_update_timestamp (tcp_connection_t * tc, u32 seq, u32 seq_end)
{
ASSERT (timestamp_leq (tc->tsval_recent, tc->rcv_opts.tsval));
tc->tsval_recent = tc->rcv_opts.tsval;
- tc->tsval_recent_age = tcp_time_now_w_thread (tc->c_thread_index);
+ tc->tsval_recent_age = tcp_time_tstamp (tc->c_thread_index);
}
}
@@ -288,7 +288,7 @@ tcp_segment_validate (tcp_worker_ctx_t * wrk, tcp_connection_t * tc0,
/* If it just so happens that a segment updates tsval_recent for a
* segment over 24 days old, invalidate tsval_recent. */
if (timestamp_lt (tc0->tsval_recent_age + TCP_PAWS_IDLE,
- tcp_time_now_w_thread (tc0->c_thread_index)))
+ tcp_time_tstamp (tc0->c_thread_index)))
{
tc0->tsval_recent = tc0->rcv_opts.tsval;
clib_warning ("paws failed: 24-day old segment");
@@ -1920,7 +1920,7 @@ tcp46_syn_sent_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
if (tcp_opts_tstamp (&new_tc0->rcv_opts))
{
new_tc0->tsval_recent = new_tc0->rcv_opts.tsval;
- new_tc0->tsval_recent_age = tcp_time_now ();
+ new_tc0->tsval_recent_age = tcp_time_tstamp (my_thread_index);
}
if (tcp_opts_wscale (&new_tc0->rcv_opts))
@@ -2830,7 +2830,7 @@ tcp46_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_buffer_t *bufs[VLIB_FRAME_SIZE], **b;
u16 nexts[VLIB_FRAME_SIZE], *next;
- tcp_set_time_now (tcp_get_worker (thread_index));
+ tcp_update_time_now (tcp_get_worker (thread_index));
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;