docs: more nitfixes
[vpp.git] / src / vnet / vxlan-gbp / vxlan_gbp.c
index 80eecb4..1a1d2c2 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include <vnet/vxlan-gbp/vxlan_gbp.h>
 #include <vnet/ip/format.h>
+#include <vnet/ip/punt.h>
 #include <vnet/fib/fib_entry.h>
 #include <vnet/fib/fib_table.h>
 #include <vnet/fib/fib_entry_track.h>
@@ -291,7 +292,7 @@ vtep_addr_unref (ip46_address_t * ip)
   uword *vtep = ip46_address_is_ip4 (ip) ?
     hash_get (vxlan_gbp_main.vtep4, ip->ip4.as_u32) :
     hash_get_mem (vxlan_gbp_main.vtep6, &ip->ip6);
-  ASSERT (vtep);
+  ALWAYS_ASSERT (vtep);
   if (--(*vtep) != 0)
     return *vtep;
   ip46_address_is_ip4 (ip) ?
@@ -317,7 +318,7 @@ mcast_shared_get (ip46_address_t * ip)
 {
   ASSERT (ip46_address_is_multicast (ip));
   uword *p = hash_get_mem (vxlan_gbp_main.mcast_shared, ip);
-  ASSERT (p);
+  ALWAYS_ASSERT (p);
   mcast_shared_t ret = {.as_u64 = *p };
   return ret;
 }
@@ -929,10 +930,10 @@ show_vxlan_gbp_tunnel_command_fn (vlib_main_t * vm,
     vlib_cli_output (vm, "No vxlan-gbp tunnels configured...");
 
 /* *INDENT-OFF* */
-  pool_foreach (t, vxm->tunnels,
-  ({
+  pool_foreach (t, vxm->tunnels)
+   {
     vlib_cli_output (vm, "%U", format_vxlan_gbp_tunnel, t);
-  }));
+  }
 /* *INDENT-ON* */
 
   if (raw)
@@ -1030,11 +1031,12 @@ set_ip4_vxlan_gbp_bypass (vlib_main_t * vm,
 }
 
 /*?
- * This command adds the 'ip4-vxlan-gbp-bypass' graph node for a given interface.
- * By adding the IPv4 vxlan_gbp-bypass graph node to an interface, the node checks
- *  for and validate input vxlan_gbp packet and bypass ip4-lookup, ip4-local,
- * ip4-udp-lookup nodes to speedup vxlan_gbp packet forwarding. This node will
- * cause extra overhead to for non-vxlan_gbp packets which is kept at a minimum.
+ * This command adds the 'ip4-vxlan-gbp-bypass' graph node for a given
+ * interface. By adding the IPv4 vxlan_gbp-bypass graph node to an interface,
+ * the node checks for and validate input vxlan_gbp packet and bypass
+ * ip4-lookup, ip4-local, ip4-udp-lookup nodes to speedup vxlan_gbp packet
+ * forwarding. This node will cause extra overhead to for non-vxlan_gbp packets
+ * which is kept at a minimum.
  *
  * @cliexpar
  * @parblock
@@ -1051,10 +1053,10 @@ set_ip4_vxlan_gbp_bypass (vlib_main_t * vm,
  *
  * Example of graph node after ip4-vxlan-gbp-bypass is enabled:
  * @cliexstart{show vlib graph ip4-vxlan-gbp-bypass}
- *            Name                      Next                    Previous
- * ip4-vxlan-gbp-bypass              error-drop [0]               ip4-input
- *                                vxlan4-gbp-input [1]        ip4-input-no-checksum
- *                                   ip4-lookup [2]
+ *            Name             Next                      Previous
+ * ip4-vxlan-gbp-bypass     error-drop [0]               ip4-input
+ *                       vxlan4-gbp-input [1]       ip4-input-no-checksum
+ *                          ip4-lookup [2]
  * @cliexend
  *
  * Example of how to display the feature enabled on an interface:
@@ -1087,11 +1089,12 @@ set_ip6_vxlan_gbp_bypass (vlib_main_t * vm,
 }
 
 /*?
- * This command adds the 'ip6-vxlan-gbp-bypass' graph node for a given interface.
- * By adding the IPv6 vxlan-gbp-bypass graph node to an interface, the node checks
- *  for and validate input vxlan_gbp packet and bypass ip6-lookup, ip6-local,
- * ip6-udp-lookup nodes to speedup vxlan_gbp packet forwarding. This node will
- * cause extra overhead to for non-vxlan packets which is kept at a minimum.
+ * This command adds the 'ip6-vxlan-gbp-bypass' graph node for a given
+ * interface. By adding the IPv6 vxlan-gbp-bypass graph node to an interface,
+ * the node checks for and validate input vxlan_gbp packet and bypass
+ * ip6-lookup, ip6-local, ip6-udp-lookup nodes to speedup vxlan_gbp packet
+ * forwarding. This node will cause extra overhead to for non-vxlan packets
+ * which is kept at a minimum.
  *
  * @cliexpar
  * @parblock
@@ -1108,10 +1111,10 @@ set_ip6_vxlan_gbp_bypass (vlib_main_t * vm,
  *
  * Example of graph node after ip6-vxlan-gbp-bypass is enabled:
  * @cliexstart{show vlib graph ip6-vxlan-gbp-bypass}
- *            Name                      Next                    Previous
- * ip6-vxlan-gbp-bypass              error-drop [0]               ip6-input
- *                                vxlan6-gbp-input [1]        ip4-input-no-checksum
- *                                   ip6-lookup [2]
+ *            Name             Next                    Previous
+ * ip6-vxlan-gbp-bypass     error-drop [0]             ip6-input
+ *                       vxlan6-gbp-input [1]      ip4-input-no-checksum
+ *                          ip6-lookup [2]
  * @cliexend
  *
  * Example of how to display the feature enabled on an interface:
@@ -1163,12 +1166,14 @@ vxlan_gbp_init (vlib_main_t * vm)
 
   punt_hdl = vlib_punt_client_register ("vxlan-gbp");
 
-  vlib_punt_reason_alloc (punt_hdl,
-                         "VXLAN-GBP-no-such-v4-tunnel",
-                         &vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP4]);
-  vlib_punt_reason_alloc (punt_hdl,
-                         "VXLAN-GBP-no-such-v6-tunnel",
-                         &vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP6]);
+  vlib_punt_reason_alloc (punt_hdl, "VXLAN-GBP-no-such-v4-tunnel", NULL, NULL,
+                         &vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP4],
+                         VNET_PUNT_REASON_F_IP4_PACKET,
+                         format_vnet_punt_reason_flags);
+  vlib_punt_reason_alloc (punt_hdl, "VXLAN-GBP-no-such-v6-tunnel", NULL, NULL,
+                         &vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP6],
+                         VNET_PUNT_REASON_F_IP6_PACKET,
+                         format_vnet_punt_reason_flags);
 
   return (0);
 }