diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h
index ba57e3a..1fd03c9 100644
--- a/src/vnet/tcp/tcp.h
+++ b/src/vnet/tcp/tcp.h
@@ -721,13 +721,14 @@
 {
   ASSERT (tc->c_thread_index == vlib_get_thread_index ());
   if (tc->timers[timer_id] != TCP_TIMER_HANDLE_INVALID)
-    tw_timer_stop_16t_2w_512sl (&tcp_main.
-				wrk_ctx[tc->c_thread_index].timer_wheel,
-				tc->timers[timer_id]);
-  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);
+    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
diff --git a/src/vpp/api/test_client.c b/src/vpp/api/test_client.c
index f0feee0..98cc18e 100644
--- a/src/vpp/api/test_client.c
+++ b/src/vpp/api/test_client.c
@@ -918,15 +918,15 @@
   mp->_vl_msg_id = ntohs (VL_API_PROXY_ARP_ADD_DEL);
   mp->client_index = tm->my_client_index;
   mp->context = 0xdeadbeef;
-  mp->vrf_id = ntohl (11);
+  mp->proxy.vrf_id = ntohl (11);
   mp->is_add = is_add;
 
   /* proxy fib 11, 1.1.1.1 -> 1.1.1.10 */
   tmp = ntohl (0x01010101);
-  clib_memcpy (mp->low_address, &tmp, 4);
+  clib_memcpy (mp->proxy.low_address, &tmp, 4);
 
   tmp = ntohl (0x0101010a);
-  clib_memcpy (mp->hi_address, &tmp, 4);
+  clib_memcpy (mp->proxy.hi_address, &tmp, 4);
 
   vl_msg_api_send_shmem (tm->vl_input_queue, (u8 *) & mp);
 }
diff --git a/src/vppinfra/cuckoo_template.h b/src/vppinfra/cuckoo_template.h
index b53a089..eccbde1 100644
--- a/src/vppinfra/cuckoo_template.h
+++ b/src/vppinfra/cuckoo_template.h
@@ -154,6 +154,8 @@
 
 typedef struct
 {
+  CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
+
   /** reduced hashes corresponding to elements */
   u8 reduced_hashes[CLIB_CUCKOO_KVP_PER_BUCKET];
 
diff --git a/src/vppinfra/test_tw_timer.c b/src/vppinfra/test_tw_timer.c
index ec0baa0..bde958f 100644
--- a/src/vppinfra/test_tw_timer.c
+++ b/src/vppinfra/test_tw_timer.c
@@ -482,6 +482,117 @@
   return 0;
 }
 
+static u32
+get_expiration_time (tw_timer_test_main_t * tm)
+{
+  u32 expiration_time;
+  do
+    {
+      expiration_time = random_u64 (&tm->seed) & ((1 << 17) - 1);
+    }
+  while (expiration_time == 0);
+  return expiration_time;
+}
+
+static clib_error_t *
+test2_double_updates (tw_timer_test_main_t * tm)
+{
+  u32 i, j;
+  tw_timer_test_elt_t *e;
+  u32 initial_wheel_offset;
+  u32 expiration_time;
+  u32 max_expiration_time = 0, updates = 0;
+  f64 before, after;
+
+  clib_time_init (&tm->clib_time);
+  tw_timer_wheel_init_16t_2w_512sl (&tm->double_wheel,
+				    expired_timer_double_callback,
+				    1.0 /* timer interval */ , ~0);
+
+  /* Prime offset */
+  initial_wheel_offset = 7577;
+  run_double_wheel (&tm->double_wheel, initial_wheel_offset);
+  fformat (stdout, "initial wheel time %d, fast index %d slow index %d\n",
+	   tm->double_wheel.current_tick,
+	   tm->double_wheel.current_index[TW_TIMER_RING_FAST],
+	   tm->double_wheel.current_index[TW_TIMER_RING_SLOW]);
+
+  initial_wheel_offset = tm->double_wheel.current_tick;
+  fformat (stdout,
+	   "test %d timers, %d iter, %d ticks per iter, 0x%llx seed\n",
+	   tm->ntimers, tm->niter, tm->ticks_per_iter, tm->seed);
+
+  before = clib_time_now (&tm->clib_time);
+
+  /* Prime the pump */
+  for (i = 0; i < tm->ntimers; i++)
+    {
+      pool_get (tm->test_elts, e);
+      memset (e, 0, sizeof (*e));
+
+      expiration_time = get_expiration_time (tm);
+      max_expiration_time = clib_max (expiration_time, max_expiration_time);
+
+      e->expected_to_expire = expiration_time + initial_wheel_offset;
+      e->stop_timer_handle = tw_timer_start_16t_2w_512sl (&tm->double_wheel,
+							  e - tm->test_elts,
+							  14 /* timer id */ ,
+							  expiration_time);
+    }
+
+  for (i = 0; i < tm->niter; i++)
+    {
+      run_double_wheel (&tm->double_wheel, tm->ticks_per_iter);
+
+      j = 0;
+
+      /* *INDENT-OFF* */
+      pool_foreach (e, tm->test_elts,
+      ({
+        expiration_time = get_expiration_time (tm);
+        max_expiration_time = clib_max (expiration_time, max_expiration_time);
+	e->expected_to_expire = expiration_time
+				+ tm->double_wheel.current_tick;
+        tw_timer_update_16t_2w_512sl (&tm->double_wheel, e->stop_timer_handle,
+                                      expiration_time);
+        if (++j >= tm->ntimers / 4)
+          goto done;
+      }));
+      /* *INDENT-ON* */
+
+    done:
+      updates += j;
+    }
+
+  run_double_wheel (&tm->double_wheel, max_expiration_time + 1);
+
+  after = clib_time_now (&tm->clib_time);
+
+  fformat (stdout, "%d updates, %d ticks\n", updates,
+	   tm->double_wheel.current_tick);
+  fformat (stdout, "test ran %.2f seconds, %.2f ops/second\n",
+	   (after - before),
+	   ((f64) updates + (f64) tm->double_wheel.current_tick) / (after -
+								    before));
+
+  if (pool_elts (tm->test_elts))
+    fformat (stdout, "Note: %d elements remain in pool\n",
+	     pool_elts (tm->test_elts));
+
+  /* *INDENT-OFF* */
+  pool_foreach (e, tm->test_elts,
+  ({
+    fformat (stdout, "[%d] expected to expire %d\n",
+             e - tm->test_elts,
+             e->expected_to_expire);
+  }));
+  /* *INDENT-ON* */
+
+  pool_free (tm->test_elts);
+  tw_timer_wheel_free_16t_2w_512sl (&tm->double_wheel);
+  return 0;
+}
+
 static clib_error_t *
 test2_triple (tw_timer_test_main_t * tm)
 {
@@ -1141,7 +1252,7 @@
 timer_test_command_fn (tw_timer_test_main_t * tm, unformat_input_t * input)
 {
 
-  int is_test1 = 0;
+  int is_test1 = 0, is_updates = 0;
   int num_wheels = 1;
   int is_test2 = 0;
   int is_test3 = 0;
@@ -1172,6 +1283,8 @@
 	is_test4 = 1;
       else if (unformat (input, "linear"))
 	is_test5 = 1;
+      else if (unformat (input, "updates"))
+	is_updates = 1;
       else if (unformat (input, "wheels %d", &num_wheels))
 	;
       else if (unformat (input, "ntimers %d", &tm->ntimers))
@@ -1202,7 +1315,10 @@
       if (num_wheels == 1)
 	return test2_single (tm);
       else if (num_wheels == 2)
-	return test2_double (tm);
+	if (is_updates)
+	  return test2_double_updates (tm);
+	else
+	  return test2_double (tm);
       else if (num_wheels == 3)
 	{
 	  if (overflow == 0)
diff --git a/src/vppinfra/tw_timer_template.c b/src/vppinfra/tw_timer_template.c
index a6d26d7..da40e2c 100644
--- a/src/vppinfra/tw_timer_template.c
+++ b/src/vppinfra/tw_timer_template.c
@@ -142,9 +142,8 @@
 }
 
 static inline void
-timer_remove (TWT (tw_timer) * pool, u32 index)
+timer_remove (TWT (tw_timer) * pool, TWT (tw_timer) * elt)
 {
-  TWT (tw_timer) * elt = pool_elt_at_index (pool, index);
   TWT (tw_timer) * next_elt, *prev_elt;
 
   ASSERT (elt->user_handle != ~0);
@@ -158,17 +157,8 @@
   elt->prev = elt->next = ~0;
 }
 
-/**
- * @brief Start a Tw Timer
- * @param tw_timer_wheel_t * tw timer wheel object pointer
- * @param u32 pool_index user pool index, presumably for a tw session
- * @param u32 timer_id app-specific timer ID. 4 bits.
- * @param u64 interval timer interval in ticks
- * @returns handle needed to cancel the timer
- */
-u32
-TW (tw_timer_start) (TWT (tw_timer_wheel) * tw, u32 pool_index, u32 timer_id,
-		     u64 interval)
+static void
+timer_add (TWT (tw_timer_wheel) * tw, TWT (tw_timer) * t, u64 interval)
 {
 #if TW_TIMER_WHEELS > 1
   u16 slow_ring_offset;
@@ -182,14 +172,6 @@
 #endif
   u16 fast_ring_offset;
   tw_timer_wheel_slot_t *ts;
-  TWT (tw_timer) * t;
-
-  ASSERT (interval);
-
-  pool_get (tw->timers, t);
-  memset (t, 0xff, sizeof (*t));
-
-  t->user_handle = TW (make_internal_timer_handle) (pool_index, timer_id);
 
   /* Factor interval into 1..3 wheel offsets */
 #if TW_TIMER_WHEELS > 2
@@ -209,9 +191,9 @@
       ts = &tw->overflow;
       timer_addhead (tw->timers, ts->head_index, t - tw->timers);
 #if TW_START_STOP_TRACE_SIZE > 0
-      TW (tw_timer_trace) (tw, timer_id, pool_index, t - tw->timers);
+      TW (tw_timer_trace) (tw, timer_id, user_id, t - tw->timers);
 #endif
-      return t - tw->timers;
+      return;
     }
 #endif
 
@@ -262,9 +244,9 @@
 
       timer_addhead (tw->timers, ts->head_index, t - tw->timers);
 #if TW_START_STOP_TRACE_SIZE > 0
-      TW (tw_timer_trace) (tw, timer_id, pool_index, t - tw->timers);
+      TW (tw_timer_trace) (tw, timer_id, user_id, t - tw->timers);
 #endif
-      return t - tw->timers;
+      return;
     }
 #endif
 
@@ -280,9 +262,9 @@
 
       timer_addhead (tw->timers, ts->head_index, t - tw->timers);
 #if TW_START_STOP_TRACE_SIZE > 0
-      TW (tw_timer_trace) (tw, timer_id, pool_index, t - tw->timers);
+      TW (tw_timer_trace) (tw, timer_id, user_id, t - tw->timers);
 #endif
-      return t - tw->timers;
+      return;
     }
 #else
   fast_ring_offset %= TW_SLOTS_PER_RING;
@@ -298,8 +280,32 @@
 					  fast_ring_offset, 1);
 #endif
 #if TW_START_STOP_TRACE_SIZE > 0
-  TW (tw_timer_trace) (tw, timer_id, pool_index, t - tw->timers);
+  TW (tw_timer_trace) (tw, timer_id, user_id, t - tw->timers);
 #endif
+}
+
+/**
+ * @brief Start a Tw Timer
+ * @param tw_timer_wheel_t * tw timer wheel object pointer
+ * @param u32 user_id user defined timer id, presumably for a tw session
+ * @param u32 timer_id app-specific timer ID. 4 bits.
+ * @param u64 interval timer interval in ticks
+ * @returns handle needed to cancel the timer
+ */
+u32
+TW (tw_timer_start) (TWT (tw_timer_wheel) * tw, u32 user_id, u32 timer_id,
+		     u64 interval)
+{
+  TWT (tw_timer) * t;
+
+  ASSERT (interval);
+
+  pool_get (tw->timers, t);
+  memset (t, 0xff, sizeof (*t));
+
+  t->user_handle = TW (make_internal_timer_handle) (user_id, timer_id);
+
+  timer_add (tw, t, interval);
   return t - tw->timers;
 }
 
@@ -365,12 +371,27 @@
   /* in case of idiotic handle (e.g. passing a listhead index) */
   ASSERT (t->user_handle != ~0);
 
-  timer_remove (tw->timers, handle);
+  timer_remove (tw->timers, t);
 
   pool_put_index (tw->timers, handle);
 }
 
 /**
+ * @brief Update a tw timer
+ * @param tw_timer_wheel_t * tw timer wheel object pointer
+ * @param u32 handle timer returned by tw_timer_start
+ * @param u32 interval timer interval in ticks
+ */
+void TW (tw_timer_update) (TWT (tw_timer_wheel) * tw, u32 handle,
+			   u64 interval)
+{
+  TWT (tw_timer) * t;
+  t = pool_elt_at_index (tw->timers, handle);
+  timer_remove (tw->timers, t);
+  timer_add (tw, t, interval);
+}
+
+/**
  * @brief Initialize a tw timer wheel template instance
  * @param tw_timer_wheel_t * tw timer wheel object pointer
  * @param void * expired_timer_callback. Passed a u32 * vector of
diff --git a/src/vppinfra/tw_timer_template.h b/src/vppinfra/tw_timer_template.h
index 0217644..b5cdac0 100644
--- a/src/vppinfra/tw_timer_template.h
+++ b/src/vppinfra/tw_timer_template.h
@@ -238,6 +238,8 @@
 			 u32 pool_index, u32 timer_id, u64 interval);
 
 void TW (tw_timer_stop) (TWT (tw_timer_wheel) * tw, u32 handle);
+void TW (tw_timer_update) (TWT (tw_timer_wheel) * tw, u32 handle,
+			   u64 interval);
 
 void TW (tw_timer_wheel_init) (TWT (tw_timer_wheel) * tw,
 			       void *expired_timer_callback,
