Refactor fragile msg macro W and W2 to not burry return control flow.
[vpp.git] / src / vat / api_format.c
index b374b28..db5478c 100644 (file)
@@ -4640,8 +4640,8 @@ static int
 exec_inband (vat_main_t * vam)
 {
   vl_api_cli_inband_t *mp;
-  f64 timeout;
   unformat_input_t *i = vam->input;
+  int ret;
 
   if (vec_len (i->buffer) == 0)
     return -1;
@@ -4668,7 +4668,8 @@ exec_inband (vat_main_t * vam)
   mp->length = htonl (len);
 
   S (mp);
-  W2 (print (vam->ofp, "%s", vam->cmd_reply));
+  W2 (ret, print (vam->ofp, "%s", vam->cmd_reply));
+  return ret;
 }
 
 static int
@@ -4676,9 +4677,9 @@ api_create_loopback (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_create_loopback_t *mp;
-  f64 timeout;
   u8 mac_address[6];
   u8 mac_set = 0;
+  int ret;
 
   memset (mac_address, 0, sizeof (mac_address));
 
@@ -4696,7 +4697,8 @@ api_create_loopback (vat_main_t * vam)
     clib_memcpy (mp->mac_address, mac_address, sizeof (mac_address));
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4704,8 +4706,8 @@ api_delete_loopback (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_delete_loopback_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -4726,7 +4728,8 @@ api_delete_loopback (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4734,8 +4737,8 @@ api_want_stats (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_want_stats_t *mp;
-  f64 timeout;
   int enable = -1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -4757,7 +4760,8 @@ api_want_stats (vat_main_t * vam)
   mp->enable_disable = enable;
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4765,8 +4769,8 @@ api_want_interface_events (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_want_interface_events_t *mp;
-  f64 timeout;
   int enable = -1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -4790,7 +4794,8 @@ api_want_interface_events (vat_main_t * vam)
   vam->interface_event_display = enable;
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 
@@ -4799,10 +4804,10 @@ int
 api_sw_interface_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_dump_t *mp;
-  f64 timeout;
   hash_pair_t *p;
   name_sort_t *nses = 0, *ns;
   sw_interface_subif_t *sub = NULL;
+  int ret;
 
   /* Toss the old name table */
   /* *INDENT-OFF* */
@@ -4898,7 +4903,8 @@ api_sw_interface_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4906,10 +4912,10 @@ api_sw_interface_set_flags (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_flags_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 admin_up = 0, link_up = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -4947,7 +4953,8 @@ api_sw_interface_set_flags (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return the good/bad news... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4955,9 +4962,9 @@ api_sw_interface_clear_stats (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_clear_stats_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -4982,7 +4989,8 @@ api_sw_interface_clear_stats (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return the good/bad news... */
-  W;
+  W (ret);
+  return ret;
 }
 
 #if DPDK >0
@@ -4991,7 +4999,6 @@ api_sw_interface_set_dpdk_hqos_pipe (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_dpdk_hqos_pipe_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u32 subport;
@@ -5000,6 +5007,7 @@ api_sw_interface_set_dpdk_hqos_pipe (vat_main_t * vam)
   u8 pipe_set = 0;
   u32 profile;
   u8 profile_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5054,9 +5062,8 @@ api_sw_interface_set_dpdk_hqos_pipe (vat_main_t * vam)
 
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5064,7 +5071,6 @@ api_sw_interface_set_dpdk_hqos_subport (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_dpdk_hqos_subport_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u32 subport;
@@ -5073,6 +5079,7 @@ api_sw_interface_set_dpdk_hqos_subport (vat_main_t * vam)
   u32 tb_size = 1000000;
   u32 tc_rate[] = { 1250000000, 1250000000, 1250000000, 1250000000 };
   u32 tc_period = 10;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5135,9 +5142,8 @@ api_sw_interface_set_dpdk_hqos_subport (vat_main_t * vam)
   mp->tc_period = ntohl (tc_period);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5145,13 +5151,13 @@ api_sw_interface_set_dpdk_hqos_tctbl (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_dpdk_hqos_tctbl_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 entry_set = 0;
   u8 tc_set = 0;
   u8 queue_set = 0;
   u32 entry, tc, queue;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5202,9 +5208,8 @@ api_sw_interface_set_dpdk_hqos_tctbl (vat_main_t * vam)
   mp->queue = ntohl (queue);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 #endif
 
@@ -5213,7 +5218,6 @@ api_sw_interface_add_del_address (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_add_del_address_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 is_add = 1, del_all = 0;
@@ -5222,6 +5226,7 @@ api_sw_interface_add_del_address (vat_main_t * vam)
   u8 v6_address_set = 0;
   ip4_address_t v4address;
   ip6_address_t v6address;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5282,7 +5287,8 @@ api_sw_interface_add_del_address (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5290,10 +5296,10 @@ api_sw_interface_set_mpls_enable (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_mpls_enable_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 enable = 1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5326,7 +5332,8 @@ api_sw_interface_set_mpls_enable (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5334,10 +5341,10 @@ api_sw_interface_set_table (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_table_t *mp;
-  f64 timeout;
   u32 sw_if_index, vrf_id = 0;
   u8 sw_if_index_set = 0;
   u8 is_ipv6 = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5371,7 +5378,8 @@ api_sw_interface_set_table (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_sw_interface_get_table_reply_t_handler
@@ -5411,7 +5419,7 @@ api_sw_interface_get_table (vat_main_t * vam)
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 is_ipv6 = 0;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -5436,7 +5444,8 @@ api_sw_interface_get_table (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5444,10 +5453,10 @@ api_sw_interface_set_vpath (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_vpath_t *mp;
-  f64 timeout;
   u32 sw_if_index = 0;
   u8 sw_if_index_set = 0;
   u8 is_enable = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5480,7 +5489,8 @@ api_sw_interface_set_vpath (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5488,11 +5498,11 @@ api_sw_interface_set_vxlan_bypass (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_vxlan_bypass_t *mp;
-  f64 timeout;
   u32 sw_if_index = 0;
   u8 sw_if_index_set = 0;
   u8 is_enable = 1;
   u8 is_ipv6 = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5530,7 +5540,8 @@ api_sw_interface_set_vxlan_bypass (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5538,12 +5549,12 @@ api_sw_interface_set_l2_xconnect (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_l2_xconnect_t *mp;
-  f64 timeout;
   u32 rx_sw_if_index;
   u8 rx_sw_if_index_set = 0;
   u32 tx_sw_if_index;
   u8 tx_sw_if_index_set = 0;
   u8 enable = 1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5601,9 +5612,8 @@ api_sw_interface_set_l2_xconnect (vat_main_t * vam)
   mp->enable = enable;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5611,7 +5621,6 @@ api_sw_interface_set_l2_bridge (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_l2_bridge_t *mp;
-  f64 timeout;
   u32 rx_sw_if_index;
   u8 rx_sw_if_index_set = 0;
   u32 bd_id;
@@ -5619,6 +5628,7 @@ api_sw_interface_set_l2_bridge (vat_main_t * vam)
   u8 bvi = 0;
   u32 shg = 0;
   u8 enable = 1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5664,9 +5674,8 @@ api_sw_interface_set_l2_bridge (vat_main_t * vam)
   mp->enable = enable;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5674,8 +5683,8 @@ api_bridge_domain_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_bridge_domain_dump_t *mp;
-  f64 timeout;
   u32 bd_id = ~0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5697,9 +5706,8 @@ api_bridge_domain_dump (vat_main_t * vam)
     S (mp);
   }
 
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5707,11 +5715,11 @@ api_bridge_domain_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_bridge_domain_add_del_t *mp;
-  f64 timeout;
   u32 bd_id = ~0;
   u8 is_add = 1;
   u32 flood = 1, forward = 1, learn = 1, uu_flood = 1, arp_term = 0;
   u32 mac_age = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5763,9 +5771,8 @@ api_bridge_domain_add_del (vat_main_t * vam)
   mp->mac_age = (u8) mac_age;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5908,8 +5915,11 @@ api_l2fib_add_del (vat_main_t * vam)
     }
   else
     {
+      int ret;
+
       /* Wait for a reply... */
-      W;
+      W (ret);
+      return ret;
     }
   /* Return the good/bad news */
   return (vam->retval);
@@ -5920,10 +5930,10 @@ api_l2_flags (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_flags_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u32 feature_bitmap = 0;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5965,9 +5975,8 @@ api_l2_flags (vat_main_t * vam)
   mp->feature_bitmap = ntohl (feature_bitmap);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5975,11 +5984,11 @@ api_bridge_flags (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_bridge_flags_t *mp;
-  f64 timeout;
   u32 bd_id;
   u8 bd_id_set = 0;
   u8 is_set = 1;
   u32 flags = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -6017,9 +6026,8 @@ api_bridge_flags (vat_main_t * vam)
   mp->is_set = is_set;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6027,7 +6035,6 @@ api_bd_ip_mac_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_bd_ip_mac_add_del_t *mp;
-  f64 timeout;
   u32 bd_id;
   u8 is_ipv6 = 0;
   u8 is_add = 1;
@@ -6037,6 +6044,7 @@ api_bd_ip_mac_add_del (vat_main_t * vam)
   ip4_address_t v4addr;
   ip6_address_t v6addr;
   u8 macaddr[6];
+  int ret;
 
 
   /* Parse args required to build the message */
@@ -6092,9 +6100,8 @@ api_bd_ip_mac_add_del (vat_main_t * vam)
     clib_memcpy (mp->ip_address, &v4addr, sizeof (v4addr));
   clib_memcpy (mp->mac_address, macaddr, 6);
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6102,7 +6109,6 @@ api_tap_connect (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_tap_connect_t *mp;
-  f64 timeout;
   u8 mac_address[6];
   u8 random_mac = 1;
   u8 name_set = 0;
@@ -6114,6 +6120,7 @@ api_tap_connect (vat_main_t * vam)
   ip6_address_t ip6_address;
   u32 ip6_mask_width;
   int ip6_address_set = 0;
+  int ret;
 
   memset (mac_address, 0, sizeof (mac_address));
 
@@ -6187,7 +6194,8 @@ api_tap_connect (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6195,13 +6203,13 @@ api_tap_modify (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_tap_modify_t *mp;
-  f64 timeout;
   u8 mac_address[6];
   u8 random_mac = 1;
   u8 name_set = 0;
   u8 *tap_name;
   u32 sw_if_index = ~0;
   u8 sw_if_index_set = 0;
+  int ret;
 
   memset (mac_address, 0, sizeof (mac_address));
 
@@ -6253,7 +6261,8 @@ api_tap_modify (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6261,9 +6270,9 @@ api_tap_delete (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_tap_delete_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -6291,7 +6300,8 @@ api_tap_delete (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6299,7 +6309,6 @@ api_ip_add_del_route (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ip_add_del_route_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0, vrf_id = 0;
   u8 is_ipv6 = 0;
   u8 is_local = 0, is_drop = 0;
@@ -6549,6 +6558,7 @@ api_ip_add_del_route (vat_main_t * vam)
     {
       vl_api_control_ping_t *mp;
       f64 after;
+      f64 timeout;
 
       /* Shut off async mode */
       vam->async_mode = 0;
@@ -6583,8 +6593,11 @@ api_ip_add_del_route (vat_main_t * vam)
     }
   else
     {
+      int ret;
+
       /* Wait for a reply... */
-      W;
+      W (ret);
+      return ret;
     }
 
   /* Return the good/bad news */
@@ -6596,7 +6609,6 @@ api_ip_mroute_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ip_mroute_add_del_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0, vrf_id = 0;
   u8 is_ipv6 = 0;
   u8 is_local = 0;
@@ -6608,6 +6620,7 @@ api_ip_mroute_add_del (vat_main_t * vam)
   ip6_address_t v6_grp_address, v6_src_address;
   mfib_itf_flags_t iflags = 0;
   mfib_entry_flags_t eflags = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -6705,7 +6718,8 @@ api_ip_mroute_add_del (vat_main_t * vam)
   /* send it... */
   S (mp);
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6713,7 +6727,6 @@ api_mpls_route_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_mpls_route_add_del_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0, table_id = 0;
   u8 create_table_if_needed = 0;
   u8 is_add = 1;
@@ -6887,6 +6900,7 @@ api_mpls_route_add_del (vat_main_t * vam)
     {
       vl_api_control_ping_t *mp;
       f64 after;
+      f64 timeout;
 
       /* Shut off async mode */
       vam->async_mode = 0;
@@ -6921,8 +6935,11 @@ api_mpls_route_add_del (vat_main_t * vam)
     }
   else
     {
+      int ret;
+
       /* Wait for a reply... */
-      W;
+      W (ret);
+      return ret;
     }
 
   /* Return the good/bad news */
@@ -6934,7 +6951,6 @@ api_mpls_ip_bind_unbind (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_mpls_ip_bind_unbind_t *mp;
-  f64 timeout;
   u32 ip_table_id = 0;
   u8 create_table_if_needed = 0;
   u8 is_bind = 1;
@@ -6944,6 +6960,7 @@ api_mpls_ip_bind_unbind (vat_main_t * vam)
   u32 address_length;
   u8 address_set = 0;
   mpls_label_t local_label = MPLS_LABEL_INVALID;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -7009,7 +7026,8 @@ api_mpls_ip_bind_unbind (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7017,11 +7035,11 @@ api_proxy_arp_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_proxy_arp_add_del_t *mp;
-  f64 timeout;
   u32 vrf_id = 0;
   u8 is_add = 1;
   ip4_address_t lo, hi;
   u8 range_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7053,9 +7071,8 @@ api_proxy_arp_add_del (vat_main_t * vam)
   clib_memcpy (mp->hi_address, &hi, sizeof (mp->hi_address));
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7063,10 +7080,10 @@ api_proxy_arp_intfc_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_proxy_arp_intfc_enable_disable_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 enable = 1;
   u8 sw_if_index_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7097,9 +7114,8 @@ api_proxy_arp_intfc_enable_disable (vat_main_t * vam)
   mp->enable_disable = enable;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7107,7 +7123,6 @@ api_mpls_tunnel_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_mpls_tunnel_add_del_t *mp;
-  f64 timeout;
 
   u8 is_add = 1;
   u8 l2_only = 0;
@@ -7121,6 +7136,7 @@ api_mpls_tunnel_add_del (vat_main_t * vam)
   };
   ip6_address_t v6_next_hop_address = { {0} };
   mpls_label_t next_hop_out_label = MPLS_LABEL_INVALID, *labels = NULL;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7183,9 +7199,8 @@ api_mpls_tunnel_add_del (vat_main_t * vam)
     }
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7193,11 +7208,11 @@ api_sw_interface_set_unnumbered (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_unnumbered_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u32 unnum_sw_index = ~0;
   u8 is_add = 1;
   u8 sw_if_index_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7229,9 +7244,8 @@ api_sw_interface_set_unnumbered (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7239,7 +7253,6 @@ api_ip_neighbor_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ip_neighbor_add_del_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u32 vrf_id = 0;
@@ -7251,6 +7264,7 @@ api_ip_neighbor_add_del (vat_main_t * vam)
   u8 v6_address_set = 0;
   ip4_address_t v4address;
   ip6_address_t v6address;
+  int ret;
 
   memset (mac_address, 0, sizeof (mac_address));
 
@@ -7323,10 +7337,8 @@ api_ip_neighbor_add_del (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7334,10 +7346,10 @@ api_reset_vrf (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_reset_vrf_t *mp;
-  f64 timeout;
   u32 vrf_id = 0;
   u8 is_ipv6 = 0;
   u8 vrf_id_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7364,9 +7376,8 @@ api_reset_vrf (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7374,11 +7385,11 @@ api_create_vlan_subif (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_create_vlan_subif_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u32 vlan_id;
   u8 vlan_id_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7413,9 +7424,8 @@ api_create_vlan_subif (vat_main_t * vam)
   mp->vlan_id = ntohl (vlan_id);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 #define foreach_create_subif_bit                \
@@ -7433,7 +7443,6 @@ api_create_subif (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_create_subif_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u32 sub_id;
@@ -7449,6 +7458,7 @@ api_create_subif (vat_main_t * vam)
   u32 tmp;
   u16 outer_vlan_id = 0;
   u16 inner_vlan_id = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7498,9 +7508,8 @@ api_create_subif (vat_main_t * vam)
   mp->inner_vlan_id = ntohs (inner_vlan_id);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7508,12 +7517,12 @@ api_oam_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_oam_add_del_t *mp;
-  f64 timeout;
   u32 vrf_id = 0;
   u8 is_add = 1;
   ip4_address_t src, dst;
   u8 src_set = 0;
   u8 dst_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7552,9 +7561,8 @@ api_oam_add_del (vat_main_t * vam)
   clib_memcpy (mp->dst_address, &dst, sizeof (mp->dst_address));
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7562,11 +7570,11 @@ api_reset_fib (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_reset_fib_t *mp;
-  f64 timeout;
   u32 vrf_id = 0;
   u8 is_ipv6 = 0;
   u8 vrf_id_set = 0;
 
+  int ret;
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (i, "vrf %d", &vrf_id))
@@ -7592,9 +7600,8 @@ api_reset_fib (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7602,7 +7609,6 @@ api_dhcp_proxy_config (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_dhcp_proxy_config_t *mp;
-  f64 timeout;
   u32 vrf_id = 0;
   u8 is_add = 1;
   u8 insert_cid = 1;
@@ -7614,6 +7620,7 @@ api_dhcp_proxy_config (vat_main_t * vam)
   u8 v6_src_address_set = 0;
   ip4_address_t v4srcaddress;
   ip6_address_t v6srcaddress;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -7687,9 +7694,8 @@ api_dhcp_proxy_config (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7697,7 +7703,6 @@ api_dhcp_proxy_config_2 (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_dhcp_proxy_config_2_t *mp;
-  f64 timeout;
   u32 rx_vrf_id = 0;
   u32 server_vrf_id = 0;
   u8 is_add = 1;
@@ -7710,6 +7715,7 @@ api_dhcp_proxy_config_2 (vat_main_t * vam)
   u8 v6_src_address_set = 0;
   ip4_address_t v4srcaddress;
   ip6_address_t v6srcaddress;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -7786,9 +7792,8 @@ api_dhcp_proxy_config_2 (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7796,7 +7801,6 @@ api_dhcp_proxy_set_vss (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_dhcp_proxy_set_vss_t *mp;
-  f64 timeout;
   u8 is_ipv6 = 0;
   u8 is_add = 1;
   u32 tbl_id;
@@ -7805,6 +7809,7 @@ api_dhcp_proxy_set_vss (vat_main_t * vam)
   u8 oui_set = 0;
   u32 fib_id;
   u8 fib_id_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7850,9 +7855,8 @@ api_dhcp_proxy_set_vss (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7860,12 +7864,12 @@ api_dhcp_client_config (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_dhcp_client_config_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 is_add = 1;
   u8 *hostname = 0;
   u8 disable_event = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -7911,9 +7915,8 @@ api_dhcp_client_config (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7921,7 +7924,6 @@ api_set_ip_flow_hash (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_set_ip_flow_hash_t *mp;
-  f64 timeout;
   u32 vrf_id = 0;
   u8 is_ipv6 = 0;
   u8 vrf_id_set = 0;
@@ -7931,6 +7933,7 @@ api_set_ip_flow_hash (vat_main_t * vam)
   u8 dport = 0;
   u8 proto = 0;
   u8 reverse = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7975,9 +7978,8 @@ api_set_ip_flow_hash (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7985,10 +7987,10 @@ api_sw_interface_ip6_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_ip6_enable_disable_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 enable = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -8019,9 +8021,8 @@ api_sw_interface_ip6_enable_disable (vat_main_t * vam)
   mp->enable = enable;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8029,11 +8030,11 @@ api_sw_interface_ip6_set_link_local_address (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_ip6_set_link_local_address_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 v6_address_set = 0;
   ip6_address_t v6address;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -8069,10 +8070,8 @@ api_sw_interface_ip6_set_link_local_address (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 
@@ -8081,7 +8080,6 @@ api_sw_interface_ip6nd_ra_prefix (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_ip6nd_ra_prefix_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u32 address_length = 0;
@@ -8095,6 +8093,7 @@ api_sw_interface_ip6nd_ra_prefix (vat_main_t * vam)
   u8 is_no = 0;
   u32 val_lifetime = 0;
   u32 pref_lifetime = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -8159,10 +8158,8 @@ api_sw_interface_ip6nd_ra_prefix (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8170,7 +8167,6 @@ api_sw_interface_ip6nd_ra_config (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_ip6nd_ra_config_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 suppress = 0;
@@ -8186,6 +8182,7 @@ api_sw_interface_ip6nd_ra_config (vat_main_t * vam)
   u32 lifetime = 0;
   u32 initial_count = 0;
   u32 initial_interval = 0;
+  int ret;
 
 
   /* Parse args required to build the message */
@@ -8256,10 +8253,8 @@ api_sw_interface_ip6nd_ra_config (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8267,10 +8262,10 @@ api_set_arp_neighbor_limit (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_set_arp_neighbor_limit_t *mp;
-  f64 timeout;
   u32 arp_nbr_limit;
   u8 limit_set = 0;
   u8 is_ipv6 = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -8297,9 +8292,8 @@ api_set_arp_neighbor_limit (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8307,12 +8301,12 @@ api_l2_patch_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_patch_add_del_t *mp;
-  f64 timeout;
   u32 rx_sw_if_index;
   u8 rx_sw_if_index_set = 0;
   u32 tx_sw_if_index;
   u8 tx_sw_if_index_set = 0;
   u8 is_add = 1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -8368,9 +8362,8 @@ api_l2_patch_add_del (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8378,12 +8371,12 @@ api_ioam_enable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_ioam_enable_t *mp;
-  f64 timeout;
   u32 id = 0;
   int has_trace_option = 0;
   int has_pot_option = 0;
   int has_seqno_option = 0;
   int has_analyse_option = 0;
+  int ret;
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
@@ -8406,10 +8399,8 @@ api_ioam_enable (vat_main_t * vam)
   mp->trace_enable = has_trace_option;
 
   S (mp);
-  W;
-
-  return (0);
-
+  W (ret);
+  return ret;
 }
 
 
@@ -8417,12 +8408,12 @@ static int
 api_ioam_disable (vat_main_t * vam)
 {
   vl_api_ioam_disable_t *mp;
-  f64 timeout;
+  int ret;
 
   M (IOAM_DISABLE, mp);
   S (mp);
-  W;
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8430,7 +8421,6 @@ api_sr_tunnel_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sr_tunnel_add_del_t *mp;
-  f64 timeout;
   int is_del = 0;
   int pl_index;
   ip6_address_t src_address;
@@ -8448,6 +8438,7 @@ api_sr_tunnel_add_del (vat_main_t * vam)
   ip6_address_t next_address, tag;
   u8 *name = 0;
   u8 *policy_name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -8554,8 +8545,8 @@ api_sr_tunnel_add_del (vat_main_t * vam)
   vec_free (tags);
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8563,7 +8554,6 @@ api_sr_policy_add_del (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_sr_policy_add_del_t *mp;
-  f64 timeout;
   int is_del = 0;
   u8 *name = 0;
   u8 *tunnel_name = 0;
@@ -8574,6 +8564,7 @@ api_sr_policy_add_del (vat_main_t * vam)
   int j = 0;
   int tunnel_names_length = 1; // Init to 1 to offset the #tunnel_names counter byte
   int tun_name_len = 0;                // Different naming convention used as confusing these would be "bad" (TM)
+  int ret;
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
@@ -8638,8 +8629,8 @@ api_sr_policy_add_del (vat_main_t * vam)
   vec_free (tunnel_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8647,11 +8638,11 @@ api_sr_multicast_map_add_del (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_sr_multicast_map_add_del_t *mp;
-  f64 timeout;
   int is_del = 0;
   ip6_address_t multicast_address;
   u8 *policy_name = 0;
   int multicast_address_set = 0;
+  int ret;
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
@@ -8691,8 +8682,8 @@ api_sr_multicast_map_add_del (vat_main_t * vam)
   vec_free (policy_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 
@@ -9320,9 +9311,9 @@ api_classify_add_del_table (vat_main_t * vam)
   u32 miss_next_index = ~0;
   u32 memory_size = 32 << 20;
   u8 *mask = 0;
-  f64 timeout;
   u32 current_data_flag = 0;
   int current_data_offset = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -9407,8 +9398,8 @@ api_classify_add_del_table (vat_main_t * vam)
   vec_free (mask);
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 uword
@@ -9858,11 +9849,11 @@ api_classify_add_del_session (vat_main_t * vam)
   u32 opaque_index = ~0;
   u8 *match = 0;
   i32 advance = 0;
-  f64 timeout;
   u32 skip_n_vectors = 0;
   u32 match_n_vectors = 0;
   u32 action = 0;
   u32 metadata = 0;
+  int ret;
 
   /*
    * Warning: you have to supply skip_n and match_n
@@ -9937,8 +9928,8 @@ api_classify_add_del_session (vat_main_t * vam)
   vec_free (match);
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -9946,11 +9937,11 @@ api_classify_set_interface_ip_table (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_classify_set_interface_ip_table_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   int sw_if_index_set;
   u32 table_index = ~0;
   u8 is_ipv6 = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -9981,9 +9972,8 @@ api_classify_set_interface_ip_table (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -9991,13 +9981,13 @@ api_classify_set_interface_l2_tables (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_classify_set_interface_l2_tables_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   int sw_if_index_set;
   u32 ip4_table_index = ~0;
   u32 ip6_table_index = ~0;
   u32 other_table_index = ~0;
   u32 is_input = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10036,9 +10026,8 @@ api_classify_set_interface_l2_tables (vat_main_t * vam)
   mp->is_input = (u8) is_input;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10055,7 +10044,7 @@ api_set_ipfix_exporter (vat_main_t * vam)
   u32 path_mtu = ~0;
   u32 template_interval = ~0;
   u8 udp_checksum = 0;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10103,8 +10092,8 @@ api_set_ipfix_exporter (vat_main_t * vam)
   mp->udp_checksum = udp_checksum;
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10114,7 +10103,7 @@ api_set_ipfix_classify_stream (vat_main_t * vam)
   vl_api_set_ipfix_classify_stream_t *mp;
   u32 domain_id = 0;
   u32 src_port = UDP_DST_PORT_ipfix;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10135,8 +10124,8 @@ api_set_ipfix_classify_stream (vat_main_t * vam)
   mp->src_port = htons ((u16) src_port);
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10148,7 +10137,7 @@ api_ipfix_classify_table_add_del (vat_main_t * vam)
   u32 classify_table_index = ~0;
   u8 ip_version = 0;
   u8 transport_protocol = 255;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10197,8 +10186,8 @@ api_ipfix_classify_table_add_del (vat_main_t * vam)
   mp->transport_protocol = transport_protocol;
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10206,8 +10195,8 @@ api_get_node_index (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_get_node_index_t *mp;
-  f64 timeout;
   u8 *name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10232,9 +10221,8 @@ api_get_node_index (vat_main_t * vam)
   vec_free (name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10242,8 +10230,8 @@ api_get_next_index (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_get_next_index_t *mp;
-  f64 timeout;
   u8 *node_name = 0, *next_node_name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10282,9 +10270,8 @@ api_get_next_index (vat_main_t * vam)
   vec_free (next_node_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10292,9 +10279,9 @@ api_add_node_next (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_add_node_next_t *mp;
-  f64 timeout;
   u8 *name = 0;
   u8 *next = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10333,9 +10320,8 @@ api_add_node_next (vat_main_t * vam)
   vec_free (next);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10351,7 +10337,7 @@ api_l2tpv3_create_tunnel (vat_main_t * vam)
   u64 remote_cookie = 0;
   u8 l2_sublayer_present = 0;
   vl_api_l2tpv3_create_tunnel_t *mp;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10402,9 +10388,8 @@ api_l2tpv3_create_tunnel (vat_main_t * vam)
   mp->is_ipv6 = 1;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10416,7 +10401,7 @@ api_l2tpv3_set_tunnel_cookies (vat_main_t * vam)
   u64 new_local_cookie = 0;
   u64 new_remote_cookie = 0;
   vl_api_l2tpv3_set_tunnel_cookies_t *mp;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10445,9 +10430,8 @@ api_l2tpv3_set_tunnel_cookies (vat_main_t * vam)
   mp->new_remote_cookie = clib_host_to_net_u64 (new_remote_cookie);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10455,10 +10439,10 @@ api_l2tpv3_interface_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2tpv3_interface_enable_disable_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 enable_disable = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10486,9 +10470,8 @@ api_l2tpv3_interface_enable_disable (vat_main_t * vam)
   mp->enable_disable = enable_disable;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10496,8 +10479,8 @@ api_l2tpv3_set_lookup_key (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2tpv3_set_lookup_key_t *mp;
-  f64 timeout;
   u8 key = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10522,9 +10505,8 @@ api_l2tpv3_set_lookup_key (vat_main_t * vam)
   mp->key = key;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_sw_if_l2tpv3_tunnel_details_t_handler
@@ -10594,7 +10576,7 @@ static int
 api_sw_if_l2tpv3_tunnel_dump (vat_main_t * vam)
 {
   vl_api_sw_if_l2tpv3_tunnel_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   /* Get list of l2tpv3-tunnel interfaces */
   M (SW_IF_L2TPV3_TUNNEL_DUMP, mp);
@@ -10606,7 +10588,8 @@ api_sw_if_l2tpv3_tunnel_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 
@@ -10641,7 +10624,7 @@ static int
 api_sw_interface_tap_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_tap_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   print (vam->ofp, "\n%-16s %s", "dev_name", "sw_if_index");
   /* Get list of tap interfaces */
@@ -10654,7 +10637,8 @@ api_sw_interface_tap_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static uword unformat_vxlan_decap_next
@@ -10677,7 +10661,6 @@ api_vxlan_add_del_tunnel (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_vxlan_add_del_tunnel_t *mp;
-  f64 timeout;
   ip46_address_t src, dst;
   u8 is_add = 1;
   u8 ipv4_set = 0, ipv6_set = 0;
@@ -10688,6 +10671,7 @@ api_vxlan_add_del_tunnel (vat_main_t * vam)
   u32 encap_vrf_id = 0;
   u32 decap_next_index = ~0;
   u32 vni = 0;
+  int ret;
 
   /* Can't "universally zero init" (={0}) due to GCC bug 53119 */
   memset (&src, 0, sizeof src);
@@ -10824,9 +10808,8 @@ api_vxlan_add_del_tunnel (vat_main_t * vam)
   mp->is_ipv6 = ipv6_set;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_vxlan_tunnel_details_t_handler
@@ -10894,9 +10877,9 @@ api_vxlan_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_vxlan_tunnel_dump_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -10932,7 +10915,8 @@ api_vxlan_tunnel_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10940,13 +10924,13 @@ api_gre_add_del_tunnel (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_gre_add_del_tunnel_t *mp;
-  f64 timeout;
   ip4_address_t src4, dst4;
   u8 is_add = 1;
   u8 teb = 0;
   u8 src_set = 0;
   u8 dst_set = 0;
   u32 outer_fib_id = 0;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -10988,9 +10972,8 @@ api_gre_add_del_tunnel (vat_main_t * vam)
   mp->teb = teb;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_gre_tunnel_details_t_handler
@@ -11034,9 +11017,9 @@ api_gre_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_gre_tunnel_dump_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -11072,7 +11055,8 @@ api_gre_tunnel_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11080,14 +11064,13 @@ api_l2_fib_clear_table (vat_main_t * vam)
 {
 //  unformat_input_t * i = vam->input;
   vl_api_l2_fib_clear_table_t *mp;
-  f64 timeout;
+  int ret;
 
   M (L2_FIB_CLEAR_TABLE, mp);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11095,10 +11078,10 @@ api_l2_interface_efp_filter (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_interface_efp_filter_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 enable = 1;
   u8 sw_if_index_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11129,9 +11112,8 @@ api_l2_interface_efp_filter (vat_main_t * vam)
   mp->enable_disable = enable;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 #define foreach_vtr_op                          \
@@ -11150,7 +11132,6 @@ api_l2_interface_vlan_tag_rewrite (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_interface_vlan_tag_rewrite_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 vtr_op_set = 0;
@@ -11158,6 +11139,7 @@ api_l2_interface_vlan_tag_rewrite (vat_main_t * vam)
   u32 push_dot1q = 1;
   u32 tag1 = ~0;
   u32 tag2 = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11197,9 +11179,8 @@ api_l2_interface_vlan_tag_rewrite (vat_main_t * vam)
   mp->tag2 = ntohl (tag2);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11207,7 +11188,6 @@ api_create_vhost_user_if (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_create_vhost_user_if_t *mp;
-  f64 timeout;
   u8 *file_name;
   u8 is_server = 0;
   u8 file_name_set = 0;
@@ -11215,6 +11195,7 @@ api_create_vhost_user_if (vat_main_t * vam)
   u8 hwaddr[6];
   u8 use_custom_mac = 0;
   u8 *tag = 0;
+  int ret;
 
   /* Shut up coverity */
   memset (hwaddr, 0, sizeof (hwaddr));
@@ -11267,9 +11248,8 @@ api_create_vhost_user_if (vat_main_t * vam)
   vec_free (tag);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11277,13 +11257,13 @@ api_modify_vhost_user_if (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_modify_vhost_user_if_t *mp;
-  f64 timeout;
   u8 *file_name;
   u8 is_server = 0;
   u8 file_name_set = 0;
   u32 custom_dev_instance = ~0;
   u8 sw_if_index_set = 0;
   u32 sw_if_index = (u32) ~ 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11335,9 +11315,8 @@ api_modify_vhost_user_if (vat_main_t * vam)
     }
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11345,9 +11324,9 @@ api_delete_vhost_user_if (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_delete_vhost_user_if_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
   u8 sw_if_index_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11371,9 +11350,8 @@ api_delete_vhost_user_if (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_sw_interface_vhost_user_details_t_handler
@@ -11420,7 +11398,7 @@ static int
 api_sw_interface_vhost_user_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_vhost_user_dump_t *mp;
-  f64 timeout;
+  int ret;
   print (vam->ofp,
         "Interface name           idx hdr_sz features server regions filename");
 
@@ -11434,21 +11412,21 @@ api_sw_interface_vhost_user_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_version (vat_main_t * vam)
 {
   vl_api_show_version_t *mp;
-  f64 timeout;
+  int ret;
 
   M (SHOW_VERSION, mp);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 
@@ -11457,7 +11435,6 @@ api_vxlan_gpe_add_del_tunnel (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_vxlan_gpe_add_del_tunnel_t *mp;
-  f64 timeout;
   ip4_address_t local4, remote4;
   ip6_address_t local6, remote6;
   u8 is_add = 1;
@@ -11469,6 +11446,7 @@ api_vxlan_gpe_add_del_tunnel (vat_main_t * vam)
   u8 protocol = ~0;
   u32 vni;
   u8 vni_set = 0;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -11563,9 +11541,8 @@ api_vxlan_gpe_add_del_tunnel (vat_main_t * vam)
   mp->is_ipv6 = ipv6_set;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_vxlan_gpe_tunnel_details_t_handler
@@ -11625,9 +11602,9 @@ api_vxlan_gpe_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_vxlan_gpe_tunnel_dump_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -11663,7 +11640,8 @@ api_vxlan_gpe_tunnel_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 u8 *
@@ -11714,9 +11692,9 @@ api_l2_fib_table_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_fib_table_dump_t *mp;
-  f64 timeout;
   u32 bd_id;
   u8 bd_id_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -11747,7 +11725,8 @@ api_l2_fib_table_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 
@@ -11757,8 +11736,8 @@ api_interface_name_renumber (vat_main_t * vam)
   unformat_input_t *line_input = vam->input;
   vl_api_interface_name_renumber_t *mp;
   u32 sw_if_index = ~0;
-  f64 timeout;
   u32 new_show_dev_instance = ~0;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -11792,7 +11771,8 @@ api_interface_name_renumber (vat_main_t * vam)
   mp->new_show_dev_instance = ntohl (new_show_dev_instance);
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11800,10 +11780,10 @@ api_want_ip4_arp_events (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_want_ip4_arp_events_t *mp;
-  f64 timeout;
   ip4_address_t address;
   int address_set = 0;
   u32 enable_disable = 1;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -11827,7 +11807,8 @@ api_want_ip4_arp_events (vat_main_t * vam)
   mp->address = address.as_u32;
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11835,10 +11816,10 @@ api_want_ip6_nd_events (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_want_ip6_nd_events_t *mp;
-  f64 timeout;
   ip6_address_t address;
   int address_set = 0;
   u32 enable_disable = 1;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -11862,7 +11843,8 @@ api_want_ip6_nd_events (vat_main_t * vam)
   clib_memcpy (mp->address, &address, sizeof (ip6_address_t));
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11870,13 +11852,13 @@ api_input_acl_set_interface (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_input_acl_set_interface_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   int sw_if_index_set;
   u32 ip4_table_index = ~0;
   u32 ip6_table_index = ~0;
   u32 l2_table_index = ~0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11914,9 +11896,8 @@ api_input_acl_set_interface (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11928,7 +11909,7 @@ api_ip_address_dump (vat_main_t * vam)
   u8 sw_if_index_set = 0;
   u8 ipv4_set = 0;
   u8 ipv6_set = 0;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11977,7 +11958,8 @@ api_ip_address_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11988,8 +11970,8 @@ api_ip_dump (vat_main_t * vam)
   int ipv4_set = 0;
   int ipv6_set = 0;
   int is_ipv6;
-  f64 timeout;
   int i;
+  int ret;
 
   while (unformat_check_input (in) != UNFORMAT_END_OF_INPUT)
     {
@@ -12033,7 +12015,8 @@ api_ip_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12041,9 +12024,9 @@ api_ipsec_spd_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_spd_add_del_t *mp;
-  f64 timeout;
   u32 spd_id = ~0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12069,9 +12052,8 @@ api_ipsec_spd_add_del (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12079,11 +12061,11 @@ api_ipsec_interface_add_del_spd (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_interface_add_del_spd_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u32 spd_id = (u32) ~ 0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12123,9 +12105,8 @@ api_ipsec_interface_add_del_spd (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12133,7 +12114,6 @@ api_ipsec_spd_add_del_entry (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_spd_add_del_entry_t *mp;
-  f64 timeout;
   u8 is_add = 1, is_outbound = 0, is_ipv6 = 0, is_ip_any = 1;
   u32 spd_id = 0, sa_id = 0, protocol = 0, policy = 0;
   i32 priority = 0;
@@ -12141,6 +12121,7 @@ api_ipsec_spd_add_del_entry (vat_main_t * vam)
   u32 lport_start = 0, lport_stop = (u32) ~ 0;
   ip4_address_t laddr4_start, laddr4_stop, raddr4_start, raddr4_stop;
   ip6_address_t laddr6_start, laddr6_stop, raddr6_start, raddr6_stop;
+  int ret;
 
   laddr4_start.as_u32 = raddr4_start.as_u32 = 0;
   laddr4_stop.as_u32 = raddr4_stop.as_u32 = (u32) ~ 0;
@@ -12281,9 +12262,8 @@ api_ipsec_spd_add_del_entry (vat_main_t * vam)
   mp->is_add = is_add;
   mp->is_ip_any = is_ip_any;
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12291,7 +12271,6 @@ api_ipsec_sad_add_del_entry (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_sad_add_del_entry_t *mp;
-  f64 timeout;
   u32 sad_id = 0, spi = 0;
   u8 *ck = 0, *ik = 0;
   u8 is_add = 1;
@@ -12303,6 +12282,7 @@ api_ipsec_sad_add_del_entry (vat_main_t * vam)
   ip4_address_t tun_dst4;
   ip6_address_t tun_src6;
   ip6_address_t tun_dst6;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12413,9 +12393,8 @@ api_ipsec_sad_add_del_entry (vat_main_t * vam)
     }
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12423,9 +12402,9 @@ api_ipsec_sa_set_key (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_sa_set_key_t *mp;
-  f64 timeout;
   u32 sa_id;
   u8 *ck = 0, *ik = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12460,9 +12439,8 @@ api_ipsec_sa_set_key (vat_main_t * vam)
     clib_memcpy (mp->integrity_key, ik, mp->integrity_key_length);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12470,9 +12448,9 @@ api_ikev2_profile_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ikev2_profile_add_del_t *mp;
-  f64 timeout;
   u8 is_add = 1;
   u8 *name = 0;
+  int ret;
 
   const char *valid_chars = "a-zA-Z0-9_";
 
@@ -12508,9 +12486,8 @@ api_ikev2_profile_add_del (vat_main_t * vam)
   vec_free (name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12518,11 +12495,11 @@ api_ikev2_profile_set_auth (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ikev2_profile_set_auth_t *mp;
-  f64 timeout;
   u8 *name = 0;
   u8 *data = 0;
   u32 auth_method = 0;
   u8 is_hex = 0;
+  int ret;
 
   const char *valid_chars = "a-zA-Z0-9_";
 
@@ -12579,9 +12556,8 @@ api_ikev2_profile_set_auth (vat_main_t * vam)
   vec_free (data);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12589,12 +12565,12 @@ api_ikev2_profile_set_id (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ikev2_profile_set_id_t *mp;
-  f64 timeout;
   u8 *name = 0;
   u8 *data = 0;
   u8 is_local = 0;
   u32 id_type = 0;
   ip4_address_t ip4;
+  int ret;
 
   const char *valid_chars = "a-zA-Z0-9_";
 
@@ -12659,9 +12635,8 @@ api_ikev2_profile_set_id (vat_main_t * vam)
   vec_free (data);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12669,13 +12644,13 @@ api_ikev2_profile_set_ts (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ikev2_profile_set_ts_t *mp;
-  f64 timeout;
   u8 *name = 0;
   u8 is_local = 0;
   u32 proto = 0, start_port = 0, end_port = (u32) ~ 0;
   ip4_address_t start_addr, end_addr;
 
   const char *valid_chars = "a-zA-Z0-9_";
+  int ret;
 
   start_addr.as_u32 = 0;
   end_addr.as_u32 = (u32) ~ 0;
@@ -12730,9 +12705,8 @@ api_ikev2_profile_set_ts (vat_main_t * vam)
   vec_free (name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12740,8 +12714,8 @@ api_ikev2_set_local_key (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ikev2_set_local_key_t *mp;
-  f64 timeout;
   u8 *file = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12772,9 +12746,8 @@ api_ikev2_set_local_key (vat_main_t * vam)
   vec_free (file);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /*
@@ -12785,7 +12758,6 @@ api_map_add_domain (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_map_add_domain_t *mp;
-  f64 timeout;
 
   ip4_address_t ip4_prefix;
   ip6_address_t ip6_prefix;
@@ -12796,6 +12768,7 @@ api_map_add_domain (vat_main_t * vam)
   u8 is_translation = 0;
   u32 mtu = 0;
   u32 ip6_src_len = 128;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12857,7 +12830,8 @@ api_map_add_domain (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12865,10 +12839,10 @@ api_map_del_domain (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_map_del_domain_t *mp;
-  f64 timeout;
 
   u32 num_m_args = 0;
   u32 index;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12896,7 +12870,8 @@ api_map_del_domain (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12904,10 +12879,10 @@ api_map_add_del_rule (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_map_add_del_rule_t *mp;
-  f64 timeout;
   u8 is_add = 1;
   ip6_address_t ip6_dst;
   u32 num_m_args = 0, index, psid = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12940,14 +12915,15 @@ api_map_add_del_rule (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
 api_map_domain_dump (vat_main_t * vam)
 {
   vl_api_map_domain_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   /* Construct the API message */
   M (MAP_DOMAIN_DUMP, mp);
@@ -12961,7 +12937,8 @@ api_map_domain_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12969,8 +12946,8 @@ api_map_rule_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_map_rule_dump_t *mp;
-  f64 timeout;
   u32 domain_index = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -13000,7 +12977,8 @@ api_map_rule_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_map_add_domain_reply_t_handler
@@ -13041,10 +13019,10 @@ static int
 api_get_first_msg_id (vat_main_t * vam)
 {
   vl_api_get_first_msg_id_t *mp;
-  f64 timeout;
   unformat_input_t *i = vam->input;
   u8 *name;
   u8 name_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -13070,9 +13048,8 @@ api_get_first_msg_id (vat_main_t * vam)
   M (GET_FIRST_MSG_ID, mp);
   clib_memcpy (mp->name, name, vec_len (name));
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13080,9 +13057,9 @@ api_cop_interface_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_cop_interface_enable_disable_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
   u8 enable_disable = 1;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -13113,7 +13090,8 @@ api_cop_interface_enable_disable (vat_main_t * vam)
   /* send it... */
   S (mp);
   /* Wait for the reply */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13121,10 +13099,10 @@ api_cop_whitelist_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_cop_whitelist_enable_disable_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
   u8 ip4 = 0, ip6 = 0, default_cop = 0;
   u32 fib_id = 0;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -13162,21 +13140,23 @@ api_cop_whitelist_enable_disable (vat_main_t * vam)
   /* send it... */
   S (mp);
   /* Wait for the reply */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
 api_get_node_graph (vat_main_t * vam)
 {
   vl_api_get_node_graph_t *mp;
-  f64 timeout;
+  int ret;
 
   M (GET_NODE_GRAPH, mp);
 
   /* send it... */
   S (mp);
   /* Wait for the reply */
-  W;
+  W (ret);
+  return ret;
 }
 
 /* *INDENT-OFF* */
@@ -13246,7 +13226,6 @@ api_lisp_add_del_locator_set (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_locator_set_t *mp;
-  f64 timeout = ~0;
   u8 is_add = 1;
   u8 *locator_set_name = NULL;
   u8 locator_set_name_set = 0;
@@ -13254,6 +13233,7 @@ api_lisp_add_del_locator_set (vat_main_t * vam)
   u32 sw_if_index, priority, weight;
   u32 data_len = 0;
 
+  int ret;
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
@@ -13322,10 +13302,8 @@ api_lisp_add_del_locator_set (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13333,7 +13311,6 @@ api_lisp_add_del_locator (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_locator_t *mp;
-  f64 timeout = ~0;
   u32 tmp_if_index = ~0;
   u32 sw_if_index = ~0;
   u8 sw_if_index_set = 0;
@@ -13345,6 +13322,7 @@ api_lisp_add_del_locator (vat_main_t * vam)
   u8 is_add = 1;
   u8 *locator_set_name = NULL;
   u8 locator_set_name_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13437,10 +13415,8 @@ api_lisp_add_del_locator (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 uword
@@ -13473,7 +13449,6 @@ api_lisp_add_del_local_eid (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_local_eid_t *mp;
-  f64 timeout = ~0;
   u8 is_add = 1;
   u8 eid_set = 0;
   lisp_eid_vat_t _eid, *eid = &_eid;
@@ -13482,6 +13457,7 @@ api_lisp_add_del_local_eid (vat_main_t * vam)
   u32 vni = 0;
   u16 key_id = 0;
   u8 *key = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13564,10 +13540,8 @@ api_lisp_add_del_local_eid (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /* *INDENT-OFF* */
@@ -13587,7 +13561,6 @@ api_lisp_gpe_add_del_fwd_entry (vat_main_t * vam)
   u32 dp_table = 0, vni = 0;;
   unformat_input_t *input = vam->input;
   vl_api_lisp_gpe_add_del_fwd_entry_t *mp;
-  f64 timeout = ~0;
   u8 is_add = 1;
   lisp_eid_vat_t _rmt_eid, *rmt_eid = &_rmt_eid;
   lisp_eid_vat_t _lcl_eid, *lcl_eid = &_lcl_eid;
@@ -13597,6 +13570,7 @@ api_lisp_gpe_add_del_fwd_entry (vat_main_t * vam)
   ip6_address_t rmt_rloc6, lcl_rloc6;
   vl_api_lisp_gpe_locator_t *rmt_locs = 0, *lcl_locs = 0, rloc, *curr_rloc =
     0;
+  int ret;
 
   memset (&rloc, 0, sizeof (rloc));
 
@@ -13717,10 +13691,8 @@ api_lisp_gpe_add_del_fwd_entry (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13728,12 +13700,12 @@ api_lisp_add_del_map_server (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_map_server_t *mp;
-  f64 timeout = ~0;
   u8 is_add = 1;
   u8 ipv4_set = 0;
   u8 ipv6_set = 0;
   ip4_address_t ipv4;
   ip6_address_t ipv6;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13785,10 +13757,8 @@ api_lisp_add_del_map_server (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13796,12 +13766,12 @@ api_lisp_add_del_map_resolver (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_map_resolver_t *mp;
-  f64 timeout = ~0;
   u8 is_add = 1;
   u8 ipv4_set = 0;
   u8 ipv6_set = 0;
   ip4_address_t ipv4;
   ip6_address_t ipv6;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13853,10 +13823,8 @@ api_lisp_add_del_map_resolver (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13864,9 +13832,9 @@ api_lisp_gpe_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_gpe_enable_disable_t *mp;
-  f64 timeout = ~0;
   u8 is_set = 0;
   u8 is_en = 1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13900,10 +13868,8 @@ api_lisp_gpe_enable_disable (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13911,9 +13877,9 @@ api_lisp_rloc_probe_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_rloc_probe_enable_disable_t *mp;
-  f64 timeout = ~0;
   u8 is_set = 0;
   u8 is_en = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13944,10 +13910,8 @@ api_lisp_rloc_probe_enable_disable (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13955,9 +13919,9 @@ api_lisp_map_register_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_map_register_enable_disable_t *mp;
-  f64 timeout = ~0;
   u8 is_set = 0;
   u8 is_en = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13988,10 +13952,8 @@ api_lisp_map_register_enable_disable (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13999,9 +13961,9 @@ api_lisp_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_enable_disable_t *mp;
-  f64 timeout = ~0;
   u8 is_set = 0;
   u8 is_en = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14034,17 +13996,15 @@ api_lisp_enable_disable (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_lisp_map_register_state (vat_main_t * vam)
 {
-  f64 timeout = ~0;
   vl_api_show_lisp_map_register_state_t *mp;
+  int ret;
 
   M (SHOW_LISP_MAP_REGISTER_STATE, mp);
 
@@ -14052,16 +14012,15 @@ api_show_lisp_map_register_state (vat_main_t * vam)
   S (mp);
 
   /* wait for reply */
-  W;
-
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_lisp_rloc_probe_state (vat_main_t * vam)
 {
-  f64 timeout = ~0;
   vl_api_show_lisp_rloc_probe_state_t *mp;
+  int ret;
 
   M (SHOW_LISP_RLOC_PROBE_STATE, mp);
 
@@ -14069,16 +14028,15 @@ api_show_lisp_rloc_probe_state (vat_main_t * vam)
   S (mp);
 
   /* wait for reply */
-  W;
-
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_lisp_map_request_mode (vat_main_t * vam)
 {
-  f64 timeout = ~0;
   vl_api_show_lisp_map_request_mode_t *mp;
+  int ret;
 
   M (SHOW_LISP_MAP_REQUEST_MODE, mp);
 
@@ -14086,18 +14044,17 @@ api_show_lisp_map_request_mode (vat_main_t * vam)
   S (mp);
 
   /* wait for reply */
-  W;
-
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_map_request_mode (vat_main_t * vam)
 {
-  f64 timeout = ~0;
   unformat_input_t *input = vam->input;
   vl_api_lisp_map_request_mode_t *mp;
   u8 mode = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14121,10 +14078,8 @@ api_lisp_map_request_mode (vat_main_t * vam)
   S (mp);
 
   /* wait for reply */
-  W;
-
-  /* notreached */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /**
@@ -14136,12 +14091,12 @@ api_lisp_map_request_mode (vat_main_t * vam)
 static int
 api_lisp_pitr_set_locator_set (vat_main_t * vam)
 {
-  f64 timeout = ~0;
   u8 ls_name_set = 0;
   unformat_input_t *input = vam->input;
   vl_api_lisp_pitr_set_locator_set_t *mp;
   u8 is_add = 1;
   u8 *ls_name = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14173,17 +14128,15 @@ api_lisp_pitr_set_locator_set (vat_main_t * vam)
   S (mp);
 
   /* wait for reply */
-  W;
-
-  /* notreached */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_lisp_pitr (vat_main_t * vam)
 {
   vl_api_show_lisp_pitr_t *mp;
-  f64 timeout = ~0;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -14195,10 +14148,8 @@ api_show_lisp_pitr (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /**
@@ -14207,11 +14158,11 @@ api_show_lisp_pitr (vat_main_t * vam)
 static int
 api_lisp_eid_table_add_del_map (vat_main_t * vam)
 {
-  f64 timeout = ~0;
   unformat_input_t *input = vam->input;
   vl_api_lisp_eid_table_add_del_map_t *mp;
   u8 is_add = 1, vni_set = 0, vrf_set = 0, bd_index_set = 0;
   u32 vni, vrf, bd_index;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14251,10 +14202,8 @@ api_lisp_eid_table_add_del_map (vat_main_t * vam)
   S (mp);
 
   /* wait for reply */
-  W;
-
-  /* notreached */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 uword
@@ -14297,7 +14246,6 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_remote_mapping_t *mp;
-  f64 timeout = ~0;
   u32 vni = 0;
   lisp_eid_vat_t _eid, *eid = &_eid;
   lisp_eid_vat_t _seid, *seid = &_seid;
@@ -14306,6 +14254,7 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
   ip4_address_t rloc4;
   ip6_address_t rloc6;
   vl_api_remote_locator_t *rlocs = 0, rloc, *curr_rloc = 0;
+  int ret;
 
   memset (&rloc, 0, sizeof (rloc));
 
@@ -14406,10 +14355,8 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /**
@@ -14424,7 +14371,6 @@ api_lisp_add_del_adjacency (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_adjacency_t *mp;
-  f64 timeout = ~0;
   u32 vni = 0;
   ip4_address_t leid4, reid4;
   ip6_address_t leid6, reid6;
@@ -14433,6 +14379,7 @@ api_lisp_add_del_adjacency (vat_main_t * vam)
   u8 reid_type, leid_type;
   u32 leid_len = 0, reid_len = 0, len;
   u8 is_add = 1;
+  int ret;
 
   leid_type = reid_type = (u8) ~ 0;
 
@@ -14534,10 +14481,8 @@ api_lisp_add_del_adjacency (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -14545,9 +14490,9 @@ api_lisp_gpe_add_del_iface (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_gpe_add_del_iface_t *mp;
-  f64 timeout = ~0;
   u8 action_set = 0, is_add = 1, is_l2 = 0, dp_table_set = 0, vni_set = 0;
   u32 dp_table = 0, vni = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14602,10 +14547,8 @@ api_lisp_gpe_add_del_iface (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /**
@@ -14619,10 +14562,10 @@ api_lisp_add_del_map_request_itr_rlocs (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_map_request_itr_rlocs_t *mp;
-  f64 timeout = ~0;
   u8 *locator_set_name = 0;
   u8 locator_set_name_set = 0;
   u8 is_add = 1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14672,10 +14615,8 @@ api_lisp_add_del_map_request_itr_rlocs (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -14683,10 +14624,10 @@ api_lisp_locator_dump (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_locator_dump_t *mp;
-  f64 timeout = ~0;
   u8 is_index_set = 0, is_name_set = 0;
   u8 *ls_name = 0;
   u32 ls_index = ~0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14751,10 +14692,8 @@ api_lisp_locator_dump (vat_main_t * vam)
     S (mp);
   }
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -14762,8 +14701,8 @@ api_lisp_locator_set_dump (vat_main_t * vam)
 {
   vl_api_lisp_locator_set_dump_t *mp;
   unformat_input_t *input = vam->input;
-  f64 timeout = ~0;
   u8 filter = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14802,10 +14741,8 @@ api_lisp_locator_set_dump (vat_main_t * vam)
     S (mp);
   }
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -14815,7 +14752,7 @@ api_lisp_eid_table_map_dump (vat_main_t * vam)
   u8 mode_set = 0;
   unformat_input_t *input = vam->input;
   vl_api_lisp_eid_table_map_dump_t *mp;
-  f64 timeout = ~0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14861,17 +14798,15 @@ api_lisp_eid_table_map_dump (vat_main_t * vam)
     S (mp);
   }
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_eid_table_vni_dump (vat_main_t * vam)
 {
   vl_api_lisp_eid_table_vni_dump_t *mp;
-  f64 timeout = ~0;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -14890,10 +14825,8 @@ api_lisp_eid_table_vni_dump (vat_main_t * vam)
     S (mp);
   }
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -14901,13 +14834,13 @@ api_lisp_eid_table_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_lisp_eid_table_dump_t *mp;
-  f64 timeout = ~0;
   struct in_addr ip4;
   struct in6_addr ip6;
   u8 mac[6];
   u8 eid_type = ~0, eid_set = 0;
   u32 prefix_length = ~0, t, vni = 0;
   u8 filter = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -14991,10 +14924,8 @@ api_lisp_eid_table_dump (vat_main_t * vam)
   }
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15002,9 +14933,9 @@ api_lisp_gpe_fwd_entries_get (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_lisp_gpe_fwd_entries_get_t *mp;
-  f64 timeout = ~0;
   u8 vni_set = 0;
   u32 vni = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15038,10 +14969,8 @@ api_lisp_gpe_fwd_entries_get (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 #define vl_api_lisp_gpe_fwd_entries_get_reply_t_endian vl_noop_handler
@@ -15054,9 +14983,9 @@ api_lisp_adjacencies_get (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_lisp_adjacencies_get_t *mp;
-  f64 timeout = ~0;
   u8 vni_set = 0;
   u32 vni = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15089,17 +15018,15 @@ api_lisp_adjacencies_get (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_map_server_dump (vat_main_t * vam)
 {
   vl_api_lisp_map_server_dump_t *mp;
-  f64 timeout = ~0;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -15117,17 +15044,15 @@ api_lisp_map_server_dump (vat_main_t * vam)
     S (mp);
   }
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_map_resolver_dump (vat_main_t * vam)
 {
   vl_api_lisp_map_resolver_dump_t *mp;
-  f64 timeout = ~0;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -15145,17 +15070,15 @@ api_lisp_map_resolver_dump (vat_main_t * vam)
     S (mp);
   }
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_lisp_status (vat_main_t * vam)
 {
   vl_api_show_lisp_status_t *mp;
-  f64 timeout = ~0;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -15166,19 +15089,17 @@ api_show_lisp_status (vat_main_t * vam)
   /* send it... */
   S (mp);
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_gpe_fwd_entry_path_dump (vat_main_t * vam)
 {
   vl_api_lisp_gpe_fwd_entry_path_dump_t *mp;
-  f64 timeout = ~0;
   unformat_input_t *i = vam->input;
   u32 fwd_entry_index = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15210,17 +15131,15 @@ api_lisp_gpe_fwd_entry_path_dump (vat_main_t * vam)
     S (mp);
   }
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_get_map_request_itr_rlocs (vat_main_t * vam)
 {
   vl_api_lisp_get_map_request_itr_rlocs_t *mp;
-  f64 timeout = ~0;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -15231,10 +15150,8 @@ api_lisp_get_map_request_itr_rlocs (vat_main_t * vam)
   /* send it... */
   S (mp);
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15242,10 +15159,10 @@ api_af_packet_create (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_af_packet_create_t *mp;
-  f64 timeout;
   u8 *host_if_name = 0;
   u8 hw_addr[6];
   u8 random_hw_addr = 1;
+  int ret;
 
   memset (hw_addr, 0, sizeof (hw_addr));
 
@@ -15279,9 +15196,8 @@ api_af_packet_create (vat_main_t * vam)
   vec_free (host_if_name);
 
   S (mp);
-  W2 (fprintf (vam->ofp, " new sw_if_index = %d ", vam->sw_if_index));
-  /* NOTREACHED */
-  return 0;
+  W2 (ret, fprintf (vam->ofp, " new sw_if_index = %d ", vam->sw_if_index));
+  return ret;
 }
 
 static int
@@ -15289,8 +15205,8 @@ api_af_packet_delete (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_af_packet_delete_t *mp;
-  f64 timeout;
   u8 *host_if_name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15318,9 +15234,8 @@ api_af_packet_delete (vat_main_t * vam)
   vec_free (host_if_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15328,7 +15243,6 @@ api_policer_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_policer_add_del_t *mp;
-  f64 timeout;
   u8 is_add = 1;
   u8 *name = 0;
   u32 cir = 0;
@@ -15340,6 +15254,7 @@ api_policer_add_del (vat_main_t * vam)
   u8 type = 0;
   u8 color_aware = 0;
   sse2_qos_pol_action_params_st conform_action, exceed_action, violate_action;
+  int ret;
 
   conform_action.action_type = SSE2_QOS_ACTION_TRANSMIT;
   conform_action.dscp = 0;
@@ -15418,9 +15333,8 @@ api_policer_add_del (vat_main_t * vam)
   mp->color_aware = color_aware;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15428,9 +15342,9 @@ api_policer_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_policer_dump_t *mp;
-  f64 timeout = ~0;
   u8 *match_name = 0;
   u8 match_name_valid = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15457,10 +15371,8 @@ api_policer_dump (vat_main_t * vam)
     S (mp);
   }
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15468,13 +15380,13 @@ api_policer_classify_set_interface (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_policer_classify_set_interface_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   int sw_if_index_set;
   u32 ip4_table_index = ~0;
   u32 ip6_table_index = ~0;
   u32 l2_table_index = ~0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15512,9 +15424,8 @@ api_policer_classify_set_interface (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15522,8 +15433,8 @@ api_policer_classify_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_policer_classify_dump_t *mp;
-  f64 timeout = ~0;
   u8 type = POLICER_CLASSIFY_N_TABLES;
+  int ret;
 
   if (unformat (i, "type %U", unformat_policer_classify_table_type, &type))
     ;
@@ -15550,10 +15461,8 @@ api_policer_classify_dump (vat_main_t * vam)
     S (mp);
   }
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15561,12 +15470,12 @@ api_netmap_create (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_netmap_create_t *mp;
-  f64 timeout;
   u8 *if_name = 0;
   u8 hw_addr[6];
   u8 random_hw_addr = 1;
   u8 is_pipe = 0;
   u8 is_master = 0;
+  int ret;
 
   memset (hw_addr, 0, sizeof (hw_addr));
 
@@ -15608,9 +15517,8 @@ api_netmap_create (vat_main_t * vam)
   vec_free (if_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15618,8 +15526,8 @@ api_netmap_delete (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_netmap_delete_t *mp;
-  f64 timeout;
   u8 *if_name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15647,9 +15555,8 @@ api_netmap_delete (vat_main_t * vam)
   vec_free (if_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_mpls_tunnel_details_t_handler
@@ -15705,8 +15612,8 @@ static int
 api_mpls_tunnel_dump (vat_main_t * vam)
 {
   vl_api_mpls_tunnel_dump_t *mp;
-  f64 timeout;
   i32 index = -1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (vam->input) != UNFORMAT_END_OF_INPUT)
@@ -15730,7 +15637,8 @@ api_mpls_tunnel_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 #define vl_api_mpls_fib_details_t_endian vl_noop_handler
@@ -15818,7 +15726,7 @@ static int
 api_mpls_fib_dump (vat_main_t * vam)
 {
   vl_api_mpls_fib_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   M (MPLS_FIB_DUMP, mp);
   S (mp);
@@ -15829,7 +15737,8 @@ api_mpls_fib_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 #define vl_api_ip_fib_details_t_endian vl_noop_handler
@@ -15919,7 +15828,7 @@ static int
 api_ip_fib_dump (vat_main_t * vam)
 {
   vl_api_ip_fib_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   M (IP_FIB_DUMP, mp);
   S (mp);
@@ -15930,7 +15839,8 @@ api_ip_fib_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_ip_neighbor_details_t_handler
@@ -15987,9 +15897,9 @@ api_ip_neighbor_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ip_neighbor_dump_t *mp;
-  f64 timeout;
   u8 is_ipv6 = 0;
   u32 sw_if_index = ~0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -16021,7 +15931,8 @@ api_ip_neighbor_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 #define vl_api_ip6_fib_details_t_endian vl_noop_handler
@@ -16111,7 +16022,7 @@ static int
 api_ip6_fib_dump (vat_main_t * vam)
 {
   vl_api_ip6_fib_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   M (IP6_FIB_DUMP, mp);
   S (mp);
@@ -16122,23 +16033,23 @@ api_ip6_fib_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 int
 api_classify_table_ids (vat_main_t * vam)
 {
   vl_api_classify_table_ids_t *mp;
-  f64 timeout;
+  int ret;
 
   /* Construct the API message */
   M (CLASSIFY_TABLE_IDS, mp);
   mp->context = 0;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16146,9 +16057,9 @@ api_classify_table_by_interface (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_classify_table_by_interface_t *mp;
-  f64 timeout;
 
   u32 sw_if_index = ~0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "%U", api_unformat_sw_if_index, vam, &sw_if_index))
@@ -16170,9 +16081,8 @@ api_classify_table_by_interface (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16180,9 +16090,9 @@ api_classify_table_info (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_classify_table_info_t *mp;
-  f64 timeout;
 
   u32 table_id = ~0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "table_id %d", &table_id))
@@ -16202,9 +16112,8 @@ api_classify_table_info (vat_main_t * vam)
   mp->table_id = ntohl (table_id);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16212,9 +16121,9 @@ api_classify_session_dump (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_classify_session_dump_t *mp;
-  f64 timeout;
 
   u32 table_id = ~0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "table_id %d", &table_id))
@@ -16240,9 +16149,8 @@ api_classify_session_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void
@@ -16296,30 +16204,30 @@ int
 api_ipfix_exporter_dump (vat_main_t * vam)
 {
   vl_api_ipfix_exporter_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   /* Construct the API message */
   M (IPFIX_EXPORTER_DUMP, mp);
   mp->context = 0;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_ipfix_classify_stream_dump (vat_main_t * vam)
 {
   vl_api_ipfix_classify_stream_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   /* Construct the API message */
   M (IPFIX_CLASSIFY_STREAM_DUMP, mp);
   mp->context = 0;
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
   /* NOTREACHED */
   return 0;
 }
@@ -16356,7 +16264,7 @@ static int
 api_ipfix_classify_table_dump (vat_main_t * vam)
 {
   vl_api_ipfix_classify_table_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -16376,7 +16284,8 @@ api_ipfix_classify_table_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static void
@@ -16415,10 +16324,10 @@ api_sw_interface_span_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_span_enable_disable_t *mp;
-  f64 timeout;
   u32 src_sw_if_index = ~0;
   u32 dst_sw_if_index = ~0;
   u8 state = 3;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -16452,9 +16361,8 @@ api_sw_interface_span_enable_disable (vat_main_t * vam)
   mp->state = state;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void
@@ -16542,7 +16450,7 @@ static int
 api_sw_interface_span_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_span_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   M (SW_INTERFACE_SPAN_DUMP, mp);
   S (mp);
@@ -16553,7 +16461,8 @@ api_sw_interface_span_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16561,9 +16470,9 @@ api_pg_create_interface (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_pg_create_interface_t *mp;
-  f64 timeout;
 
   u32 if_id = ~0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "if_id %d", &if_id))
@@ -16583,9 +16492,8 @@ api_pg_create_interface (vat_main_t * vam)
   mp->interface_id = ntohl (if_id);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16593,13 +16501,13 @@ api_pg_capture (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_pg_capture_t *mp;
-  f64 timeout;
 
   u32 if_id = ~0;
   u8 enable = 1;
   u32 count = 1;
   u8 pcap_file_set = 0;
   u8 *pcap_file = 0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "if_id %d", &if_id))
@@ -16642,9 +16550,8 @@ api_pg_capture (vat_main_t * vam)
   vec_free (pcap_file);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16652,11 +16559,11 @@ api_pg_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_pg_enable_disable_t *mp;
-  f64 timeout;
 
   u8 enable = 1;
   u8 stream_name_set = 0;
   u8 *stream_name = 0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "stream %s", &stream_name))
@@ -16689,9 +16596,8 @@ api_pg_enable_disable (vat_main_t * vam)
   vec_free (stream_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16699,7 +16605,6 @@ api_ip_source_and_port_range_check_add_del (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_ip_source_and_port_range_check_add_del_t *mp;
-  f64 timeout;
 
   u16 *low_ports = 0;
   u16 *high_ports = 0;
@@ -16713,6 +16618,7 @@ api_ip_source_and_port_range_check_add_del (vat_main_t * vam)
   u32 vrf_id = ~0;
   u8 is_add = 1;
   u8 is_ipv6 = 0;
+  int ret;
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
@@ -16820,9 +16726,8 @@ api_ip_source_and_port_range_check_add_del (vat_main_t * vam)
   mp->vrf_id = ntohl (vrf_id);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16830,12 +16735,12 @@ api_ip_source_and_port_range_check_interface_add_del (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_ip_source_and_port_range_check_interface_add_del_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
   int vrf_set = 0;
   u32 tcp_out_vrf_id = ~0, udp_out_vrf_id = ~0;
   u32 tcp_in_vrf_id = ~0, udp_in_vrf_id = ~0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
@@ -16891,7 +16796,8 @@ api_ip_source_and_port_range_check_interface_add_del (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -16899,12 +16805,12 @@ api_ipsec_gre_add_del_tunnel (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_gre_add_del_tunnel_t *mp;
-  f64 timeout;
   u32 local_sa_id = 0;
   u32 remote_sa_id = 0;
   ip4_address_t src_address;
   ip4_address_t dst_address;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -16934,9 +16840,8 @@ api_ipsec_gre_add_del_tunnel (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -16944,11 +16849,11 @@ api_punt (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_punt_t *mp;
-  f64 timeout;
   u32 ipv = ~0;
   u32 protocol = ~0;
   u32 port = ~0;
   int is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -16975,9 +16880,8 @@ api_punt (vat_main_t * vam)
   mp->l4_port = htons ((u16) port);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_ipsec_gre_tunnel_details_t_handler
@@ -17021,9 +16925,9 @@ api_ipsec_gre_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_gre_tunnel_dump_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -17059,7 +16963,8 @@ api_ipsec_gre_tunnel_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17067,8 +16972,8 @@ api_delete_subif (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_delete_subif_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17091,7 +16996,8 @@ api_delete_subif (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 #define foreach_pbb_vtr_op      \
@@ -17104,7 +17010,6 @@ api_l2_interface_pbb_tag_rewrite (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_interface_pbb_tag_rewrite_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0, vtr_op = ~0;
   u16 outer_tag = ~0;
   u8 dmac[6], smac[6];
@@ -17112,6 +17017,7 @@ api_l2_interface_pbb_tag_rewrite (vat_main_t * vam)
   u16 vlanid = 0;
   u32 sid = ~0;
   u32 tmp;
+  int ret;
 
   /* Shut up coverity */
   memset (dmac, 0, sizeof (dmac));
@@ -17180,9 +17086,8 @@ api_l2_interface_pbb_tag_rewrite (vat_main_t * vam)
   mp->i_sid = ntohl (sid);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17190,12 +17095,12 @@ api_flow_classify_set_interface (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_flow_classify_set_interface_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   int sw_if_index_set;
   u32 ip4_table_index = ~0;
   u32 ip6_table_index = ~0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17230,9 +17135,8 @@ api_flow_classify_set_interface (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17240,8 +17144,8 @@ api_flow_classify_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_flow_classify_dump_t *mp;
-  f64 timeout = ~0;
   u8 type = FLOW_CLASSIFY_N_TABLES;
+  int ret;
 
   if (unformat (i, "type %U", unformat_flow_classify_table_type, &type))
     ;
@@ -17268,10 +17172,8 @@ api_flow_classify_dump (vat_main_t * vam)
     S (mp);
   }
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17279,11 +17181,11 @@ api_feature_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_feature_enable_disable_t *mp;
-  f64 timeout;
   u8 *arc_name = 0;
   u8 *feature_name = 0;
   u32 sw_if_index = ~0;
   u8 enable = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17338,7 +17240,8 @@ api_feature_enable_disable (vat_main_t * vam)
   vec_free (feature_name);
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17346,10 +17249,10 @@ api_sw_interface_tag_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_tag_add_del_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
   u8 *tag = 0;
   u8 enable = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17386,7 +17289,8 @@ api_sw_interface_tag_add_del (vat_main_t * vam)
   vec_free (tag);
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_l2_xconnect_details_t_handler
@@ -17422,7 +17326,7 @@ static int
 api_l2_xconnect_dump (vat_main_t * vam)
 {
   vl_api_l2_xconnect_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -17439,7 +17343,8 @@ api_l2_xconnect_dump (vat_main_t * vam)
     M (CONTROL_PING, mp);
     S (mp);
   }
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17447,9 +17352,9 @@ api_sw_interface_set_mtu (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_mtu_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
   u32 mtu = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17481,7 +17386,8 @@ api_sw_interface_set_mtu (vat_main_t * vam)
   mp->mtu = ntohs ((u16) mtu);
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }