diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h
index 708d756..f8c8cb3 100644
--- a/src/vnet/tcp/tcp.h
+++ b/src/vnet/tcp/tcp.h
@@ -115,17 +115,14 @@
   tcp_cleanup_req_t *pending_cleanups;
 
   /** worker timer wheel */
-  tw_timer_wheel_16t_2w_512sl_t timer_wheel;
+  tcp_timer_wheel_t timer_wheel;
 
     CLIB_CACHE_LINE_ALIGN_MARK (cacheline2);
 
   tcp_wrk_stats_t stats;
 } tcp_worker_ctx_t;
 
-#define tcp_worker_stats_inc(_ti,_stat,_val) 		\
-  tcp_main.wrk_ctx[_ti].stats._stat += _val
-
-#define tcp_workerp_stats_inc(_wrk,_stat,_val) 		\
+#define tcp_worker_stats_inc(_wrk,_stat,_val) 		\
   _wrk->stats._stat += _val
 
 typedef struct tcp_iss_seed_
@@ -356,113 +353,6 @@
 format_function_t format_tcp_connection;
 format_function_t format_tcp_connection_id;
 
-always_inline void
-tcp_timer_set (tcp_connection_t * tc, u8 timer_id, u32 interval)
-{
-  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 (&tcp_main.
-				 wrk_ctx[tc->c_thread_index].timer_wheel,
-				 tc->c_c_index, timer_id, interval);
-}
-
-always_inline void
-tcp_timer_reset (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)
-    return;
-
-  tw_timer_stop_16t_2w_512sl (&tcp_main.
-			      wrk_ctx[tc->c_thread_index].timer_wheel,
-			      tc->timers[timer_id]);
-  tc->timers[timer_id] = TCP_TIMER_HANDLE_INVALID;
-}
-
-always_inline void
-tcp_timer_update (tcp_connection_t * tc, u8 timer_id, u32 interval)
-{
-  ASSERT (tc->c_thread_index == vlib_get_thread_index ());
-  if (tc->timers[timer_id] != TCP_TIMER_HANDLE_INVALID)
-    tw_timer_update_16t_2w_512sl (&tcp_main.
-				  wrk_ctx[tc->c_thread_index].timer_wheel,
-				  tc->timers[timer_id], interval);
-  else
-    tc->timers[timer_id] =
-      tw_timer_start_16t_2w_512sl (&tcp_main.
-				   wrk_ctx[tc->c_thread_index].timer_wheel,
-				   tc->c_c_index, timer_id, interval);
-}
-
-always_inline void
-tcp_retransmit_timer_set (tcp_connection_t * tc)
-{
-  ASSERT (tc->snd_una != tc->snd_una_max);
-  tcp_timer_set (tc, TCP_TIMER_RETRANSMIT,
-		 clib_max (tc->rto * TCP_TO_TIMER_TICK, 1));
-}
-
-always_inline void
-tcp_retransmit_timer_reset (tcp_connection_t * tc)
-{
-  tcp_timer_reset (tc, TCP_TIMER_RETRANSMIT);
-}
-
-always_inline void
-tcp_retransmit_timer_force_update (tcp_connection_t * tc)
-{
-  tcp_timer_update (tc, TCP_TIMER_RETRANSMIT,
-		    clib_max (tc->rto * TCP_TO_TIMER_TICK, 1));
-}
-
-always_inline void
-tcp_persist_timer_set (tcp_connection_t * tc)
-{
-  /* Reuse RTO. It's backed off in handler */
-  tcp_timer_set (tc, TCP_TIMER_PERSIST,
-		 clib_max (tc->rto * TCP_TO_TIMER_TICK, 1));
-}
-
-always_inline void
-tcp_persist_timer_update (tcp_connection_t * tc)
-{
-  u32 interval;
-
-  if (seq_leq (tc->snd_una, tc->snd_congestion + tc->burst_acked))
-    interval = 1;
-  else
-    interval = clib_max (tc->rto * TCP_TO_TIMER_TICK, 1);
-
-  tcp_timer_update (tc, TCP_TIMER_PERSIST, interval);
-}
-
-always_inline void
-tcp_persist_timer_reset (tcp_connection_t * tc)
-{
-  tcp_timer_reset (tc, TCP_TIMER_PERSIST);
-}
-
-always_inline void
-tcp_retransmit_timer_update (tcp_connection_t * tc)
-{
-  if (tc->snd_una == tc->snd_nxt)
-    {
-      tcp_retransmit_timer_reset (tc);
-      if (tc->snd_wnd < tc->snd_mss)
-	tcp_persist_timer_update (tc);
-    }
-  else
-    tcp_timer_update (tc, TCP_TIMER_RETRANSMIT,
-		      clib_max (tc->rto * TCP_TO_TIMER_TICK, 1));
-}
-
-always_inline u8
-tcp_timer_is_active (tcp_connection_t * tc, tcp_timers_e timer)
-{
-  return tc->timers[timer] != TCP_TIMER_HANDLE_INVALID;
-}
-
 #define tcp_validate_txf_size(_tc, _a) 					\
   ASSERT(_tc->state != TCP_STATE_ESTABLISHED 				\
 	 || transport_max_tx_dequeue (&_tc->connection) >= _a)
