summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-10-22 19:01:39 -0700
committerDave Barach <openvpp@barachs.net>2019-11-05 15:50:37 +0000
commita8e71c8981f039588a7ca94e6ab66b4ebac784a5 (patch)
treee1cb1e3ff299d16276c0060901705d446645a445 /src/vnet/session/session.h
parent0b6a857d85df97e887de7aaf00fd6bd2dae39bf8 (diff)
session tcp: refactor pacer time
Type: refactor Change-Id: Ic1c3e1f7987702cd88972acc34849dc1f585d5fe Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.h')
-rw-r--r--src/vnet/session/session.h15
1 files changed, 12 insertions, 3 deletions
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)
{