misc: move to new pool_foreach macros
[vpp.git] / src / plugins / nsh / nsh_api.c
index e541301..143285e 100644 (file)
@@ -90,14 +90,6 @@ nsh_interface_admin_up_down (vnet_main_t * vnm, u32 nsh_hw_if, u32 flags)
   return 0;
 }
 
-static uword
-dummy_interface_tx (vlib_main_t * vm,
-                   vlib_node_runtime_t * node, vlib_frame_t * frame)
-{
-  clib_warning ("you shouldn't be here, leaking buffers...");
-  return frame->n_vectors;
-}
-
 /**
  * @brief Naming for NSH tunnel
  *
@@ -118,7 +110,6 @@ format_nsh_name (u8 * s, va_list * args)
 VNET_DEVICE_CLASS (nsh_device_class, static) = {
   .name = "NSH",
   .format_device_name = format_nsh_name,
-  .tx_function = dummy_interface_tx,
   .admin_up_down_function = nsh_interface_admin_up_down,
 };
 /* *INDENT-ON* */
@@ -198,12 +189,10 @@ vl_api_nsh_map_dump_t_handler (vl_api_nsh_map_dump_t * mp)
 
   if (~0 == map_index)
     {
-      pool_foreach (t, nm->nsh_mappings, (
-                                          {
-                                          send_nsh_map_details (t, rp,
-                                                                mp->context);
-                                          }
-                   ));
+      pool_foreach (t, nm->nsh_mappings)
+      {
+       send_nsh_map_details (t, rp, mp->context);
+      }
     }
   else
     {
@@ -661,12 +650,10 @@ vl_api_nsh_entry_dump_t_handler (vl_api_nsh_entry_dump_t * mp)
 
   if (~0 == entry_index)
     {
-      pool_foreach (t, nm->nsh_entries, (
-                                         {
-                                         send_nsh_entry_details (t, rp,
-                                                                 mp->context);
-                                         }
-                   ));
+      pool_foreach (t, nm->nsh_entries)
+      {
+       send_nsh_entry_details (t, rp, mp->context);
+      }
     }
   else
     {
@@ -722,7 +709,7 @@ nsh_api_init (vlib_main_t * vm, nsh_main_t * nm)
   error = nsh_plugin_api_hookup (vm);
 
   /* Add our API messages to the global name_crc hash table */
-  setup_message_id_table (nm, &api_main);
+  setup_message_id_table (nm, vlibapi_get_main ());
 
   vec_free (name);