From a8e71c8981f039588a7ca94e6ab66b4ebac784a5 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 22 Oct 2019 19:01:39 -0700 Subject: session tcp: refactor pacer time Type: refactor Change-Id: Ic1c3e1f7987702cd88972acc34849dc1f585d5fe Signed-off-by: Florin Coras --- src/vnet/session/session.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/vnet/session/session.h') diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h index 9fe35b19b25..830a34b72e8 100644 --- a/src/vnet/session/session.h +++ b/src/vnet/session/session.h @@ -84,7 +84,10 @@ typedef struct session_worker_ svm_msg_q_t *vpp_event_queue; /** vlib_time_now last time around the track */ - f64 last_vlib_time; + clib_time_type_t last_vlib_time; + + /** vlib_time_now rounded to us precision and as u64 */ + clib_us_time_t last_vlib_us_time; /** Convenience pointer to this worker's vlib_main */ vlib_main_t *vm; @@ -124,7 +127,7 @@ typedef struct session_worker_ #if SESSION_DEBUG /** last event poll time by thread */ - f64 last_event_poll; + clib_time_type_t last_event_poll; #endif } session_worker_t; @@ -516,12 +519,18 @@ transport_rx_fifo_has_ooo_data (transport_connection_t * tc) return svm_fifo_has_ooo_data (s->rx_fifo); } -always_inline f64 +always_inline clib_time_type_t transport_time_now (u32 thread_index) { return session_main.wrk[thread_index].last_vlib_time; } +always_inline clib_us_time_t +transport_us_time_now (u32 thread_index) +{ + return session_main.wrk[thread_index].last_vlib_us_time; +} + always_inline void transport_add_tx_event (transport_connection_t * tc) { -- cgit 1.2.3-korg