ip: Use .api declared error counters
[vpp.git] / src / vnet / mpls / mpls_tunnel.c
index e0fb9ef..5f7bf8c 100644 (file)
@@ -265,10 +265,8 @@ mpls_tunnel_collect_forwarding (fib_node_index_t pl_index,
      * found a matching extension. stack it to obtain the forwarding
      * info for this path.
      */
-    ctx->next_hops = fib_path_ext_stack(path_ext,
-                                        ctx->fct,
-                                        ctx->fct,
-                                        ctx->next_hops);
+    ctx->next_hops =
+      fib_path_ext_stack (path_ext, DPO_PROTO_MPLS, ctx->fct, ctx->next_hops);
 
     return (FIB_PATH_LIST_WALK_CONTINUE);
 }
@@ -617,10 +615,10 @@ mpls_tunnel_walk (mpls_tunnel_walk_cb_t cb,
 {
     u32 mti;
 
-    pool_foreach_index(mti, mpls_tunnel_pool,
-    ({
+    pool_foreach_index (mti, mpls_tunnel_pool)
+     {
         cb(mti, ctx);
-    }));
+    }
 }
 
 void
@@ -638,6 +636,7 @@ vnet_mpls_tunnel_del (u32 sw_if_index)
                                    mt->mt_sibling_index);
     dpo_reset(&mt->mt_l2_lb);
 
+    vnet_reset_interface_l3_output_node (vlib_get_main (), mt->mt_sw_if_index);
     vnet_delete_hw_interface (vnet_get_main(), mt->mt_hw_if_index);
 
     pool_put(mpls_tunnel_pool, mt);
@@ -685,6 +684,9 @@ vnet_mpls_tunnel_create (u8 l2_only,
     if (mt->mt_flags & MPLS_TUNNEL_FLAG_L2)
         vnet_set_interface_output_node (vnm, mt->mt_hw_if_index,
                                         mpls_tunnel_tx.index);
+    else
+      vnet_set_interface_l3_output_node (vnm->vlib_main, hi->sw_if_index,
+                                        (u8 *) "tunnel-output");
 
     /* Standard default MPLS tunnel MTU. */
     vnet_sw_interface_set_mtu (vnm, hi->sw_if_index, 9000);
@@ -989,12 +991,12 @@ show_mpls_tunnel_command_fn (vlib_main_t * vm,
 
     if (~0 == mti)
     {
-        pool_foreach (mt, mpls_tunnel_pool,
-        ({
+        pool_foreach (mt, mpls_tunnel_pool)
+         {
             vlib_cli_output (vm, "[@%d] %U",
                              mt - mpls_tunnel_pool,
                              format_mpls_tunnel, mt);
-        }));
+        }
     }
     else
     {