-static void
-gdb_vxlan_dep_del (index_t vxri)
-{
- vxlan_tunnel_ref_t *vxr;
- gbp_vxlan_tunnel_t *gt;
- u32 pos;
-
- vxr = vxlan_tunnel_ref_get (vxri);
- gt = gbp_vxlan_tunnel_get (vxr->vxr_parent);
-
- GBP_VXLAN_TUN_DBG ("del-dep:%U", format_vxlan_tunnel_ref, vxri);
-
- vxlan_tunnel_ref_db[vxr->vxr_sw_if_index] = INDEX_INVALID;
- pos = vec_search (gt->gt_tuns, vxri);
-
- ASSERT (~0 != pos);
- vec_del1 (gt->gt_tuns, pos);
-
- if (GBP_VXLAN_TUN_L2 == vxr->vxr_layer)
- {
- gbp_itf_set_l2_output_feature (vxr->vxr_itf, vxr->vxr_sw_if_index,
- L2OUTPUT_FEAT_NONE);
- gbp_itf_set_l2_input_feature (vxr->vxr_itf, vxr->vxr_sw_if_index,
- L2INPUT_FEAT_NONE);
- gbp_itf_unlock (vxr->vxr_itf);
- }
- else
- {
- fib_protocol_t fproto;
-
- FOR_EACH_FIB_IP_PROTOCOL (fproto)
- ip_table_bind (fproto, vxr->vxr_sw_if_index, 0, 0);
- gbp_learn_disable (vxr->vxr_sw_if_index, GBP_LEARN_MODE_L3);
- }
-
- vnet_vxlan_gbp_tunnel_del (vxr->vxr_sw_if_index);
-
- pool_put (vxlan_tunnel_ref_pool, vxr);
-}
-