aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/tcp/tcp_timer.h')
-rw-r--r--src/vnet/tcp/tcp_timer.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/vnet/tcp/tcp_timer.h b/src/vnet/tcp/tcp_timer.h
index 914b5aaeeb7..f604152cdf9 100644
--- a/src/vnet/tcp/tcp_timer.h
+++ b/src/vnet/tcp/tcp_timer.h
@@ -23,8 +23,8 @@ tcp_timer_set (tcp_timer_wheel_t * tw, tcp_connection_t * tc, u8 timer_id,
{
ASSERT (tc->c_thread_index == vlib_get_thread_index ());
ASSERT (tc->timers[timer_id] == TCP_TIMER_HANDLE_INVALID);
- tc->timers[timer_id] = tw_timer_start_16t_2w_512sl (tw, tc->c_c_index,
- timer_id, interval);
+ tc->timers[timer_id] = tw_timer_start_tcp_twsl (tw, tc->c_c_index,
+ timer_id, interval);
}
always_inline void
@@ -35,7 +35,7 @@ tcp_timer_reset (tcp_timer_wheel_t * tw, tcp_connection_t * tc, u8 timer_id)
if (tc->timers[timer_id] == TCP_TIMER_HANDLE_INVALID)
return;
- tw_timer_stop_16t_2w_512sl (tw, tc->timers[timer_id]);
+ tw_timer_stop_tcp_twsl (tw, tc->timers[timer_id]);
tc->timers[timer_id] = TCP_TIMER_HANDLE_INVALID;
}
@@ -45,10 +45,10 @@ tcp_timer_update (tcp_timer_wheel_t * tw, tcp_connection_t * tc, u8 timer_id,
{
ASSERT (tc->c_thread_index == vlib_get_thread_index ());
if (tc->timers[timer_id] != TCP_TIMER_HANDLE_INVALID)
- tw_timer_update_16t_2w_512sl (tw, tc->timers[timer_id], interval);
+ tw_timer_update_tcp_twsl (tw, tc->timers[timer_id], interval);
else
- tc->timers[timer_id] = tw_timer_start_16t_2w_512sl (tw, tc->c_c_index,
- timer_id, interval);
+ tc->timers[timer_id] = tw_timer_start_tcp_twsl (tw, tc->c_c_index,
+ timer_id, interval);
}
always_inline void
@@ -120,6 +120,15 @@ tcp_timer_is_active (tcp_connection_t * tc, tcp_timers_e timer)
return tc->timers[timer] != TCP_TIMER_HANDLE_INVALID;
}
+always_inline void
+tcp_timer_expire_timers (tcp_timer_wheel_t * tw, f64 now)
+{
+ tw_timer_expire_timers_tcp_twsl (tw, now);
+}
+
+void tcp_timer_initialize_wheel (tcp_timer_wheel_t * tw,
+ void (*expired_timer_cb) (u32 *), f64 now);
+
#endif /* __included_tcp_timer_h__ */
/*