u32 dev_instance; /* Real device instance in tunnel vector */
u32 user_instance; /* Instance name being shown to user */
- vnet_declare_rewrite (VLIB_BUFFER_PRE_DATA_SIZE);
+
+ VNET_DECLARE_REWRITE;
} vxlan_gbp_tunnel_t;
#define foreach_vxlan_gbp_input_next \
void vnet_int_vxlan_gbp_bypass_mode (u32 sw_if_index, u8 is_ip6,
u8 is_enable);
+always_inline u32
+vxlan_gbp_tunnel_by_sw_if_index (u32 sw_if_index)
+{
+ vxlan_gbp_main_t *vxm = &vxlan_gbp_main;
+
+ if (sw_if_index >= vec_len (vxm->tunnel_index_by_sw_if_index))
+ return ~0;
+
+ return (vxm->tunnel_index_by_sw_if_index[sw_if_index]);
+}
+
#endif /* included_vnet_vxlan_gbp_h */
/*