tcp: custom geometry for timer wheel

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I04f992e5d91d21f1e5bbafef070478cfe268d94a
diff --git a/src/vnet/tcp/tcp_timer.h b/src/vnet/tcp/tcp_timer.h
index 914b5aa..f604152 100644
--- a/src/vnet/tcp/tcp_timer.h
+++ b/src/vnet/tcp/tcp_timer.h
@@ -23,8 +23,8 @@
 {
   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 @@
   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 @@
 {
   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 @@
   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__ */
 
 /*