+inline void
+vxlan_gbp_register_udp_ports (void)
+{
+ vxlan_gbp_main_t *vxm = &vxlan_gbp_main;
+
+ if (vxm->udp_ports_registered == 0)
+ {
+ udp_register_dst_port (vxm->vlib_main, UDP_DST_PORT_vxlan_gbp,
+ vxlan4_gbp_input_node.index, /* is_ip4 */ 1);
+ udp_register_dst_port (vxm->vlib_main, UDP_DST_PORT_vxlan6_gbp,
+ vxlan6_gbp_input_node.index, /* is_ip4 */ 0);
+ }
+ /*
+ * Counts the number of vxlan_gbp tunnels
+ */
+ vxm->udp_ports_registered += 1;
+}
+
+inline void
+vxlan_gbp_unregister_udp_ports (void)
+{
+ vxlan_gbp_main_t *vxm = &vxlan_gbp_main;
+
+ ASSERT (vxm->udp_ports_registered != 0);
+
+ if (vxm->udp_ports_registered == 1)
+ {
+ udp_unregister_dst_port (vxm->vlib_main, UDP_DST_PORT_vxlan_gbp,
+ /* is_ip4 */ 1);
+ udp_unregister_dst_port (vxm->vlib_main, UDP_DST_PORT_vxlan6_gbp,
+ /* is_ip4 */ 0);
+ }
+
+ vxm->udp_ports_registered -= 1;
+}
+
+int vnet_vxlan_gbp_tunnel_add_del
+ (vnet_vxlan_gbp_tunnel_add_del_args_t * a, u32 * sw_if_indexp)