interface: interface-output end node rework
[vpp.git] / src / plugins / flowprobe / flowprobe.c
index 9bc12c8..ffc43bc 100644 (file)
@@ -60,11 +60,10 @@ VNET_FEATURE_INIT (flow_perpacket_ip6, static) =
   .runs_before = VNET_FEATURES ("interface-output"),
 };
 
-VNET_FEATURE_INIT (flow_perpacket_l2, static) =
-{
+VNET_FEATURE_INIT (flow_perpacket_l2, static) = {
   .arc_name = "interface-output",
   .node_name = "flowprobe-l2",
-  .runs_before = VNET_FEATURES ("interface-tx"),
+  .runs_before = VNET_FEATURES ("interface-output-arc-end"),
 };
 /* *INDENT-ON* */
 
@@ -656,24 +655,6 @@ out:
   REPLY_MACRO (VL_API_FLOWPROBE_TX_INTERFACE_ADD_DEL_REPLY);
 }
 
-/**
- * @brief API message custom-dump function
- * @param mp vl_api_flowprobe_tx_interface_add_del_t * mp the api message
- * @param handle void * print function handle
- * @returns u8 * output string
- */
-static void *vl_api_flowprobe_tx_interface_add_del_t_print
-  (vl_api_flowprobe_tx_interface_add_del_t * mp, void *handle)
-{
-  u8 *s;
-
-  s = format (0, "SCRIPT: flowprobe_tx_interface_add_del ");
-  s = format (s, "sw_if_index %d is_add %d which %d ",
-             clib_host_to_net_u32 (mp->sw_if_index),
-             (int) mp->is_add, (int) mp->which);
-  FINISH;
-}
-
 #define vec_neg_search(v,E)         \
 ({              \
   word _v(i) = 0;         \
@@ -809,12 +790,12 @@ flowprobe_show_table_fn (vlib_main_t * vm,
   for (i = 0; i < vec_len (fm->pool_per_worker); i++)
     {
       /* *INDENT-OFF* */
-      pool_foreach (e, fm->pool_per_worker[i], (
+      pool_foreach (e, fm->pool_per_worker[i])
        {
          vlib_cli_output (vm, "%U",
                           format_flowprobe_entry,
                           e);
-       }));
+       }
       /* *INDENT-ON* */
 
     }
@@ -1059,13 +1040,13 @@ timer_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
   vec_reset_length (event_data);
 
   int i;
-  if (vec_len (vlib_mains) == 0)
+  if (vlib_get_n_threads () == 0)
     vec_add1 (worker_vms, vm);
   else
     {
-      for (i = 0; i < vec_len (vlib_mains); i++)
+      for (i = 0; i < vlib_get_n_threads (); i++)
        {
-         worker_vm = vlib_mains[i];
+         worker_vm = vlib_get_main_by_index (i);
          if (worker_vm)
            vec_add1 (worker_vms, worker_vm);
        }