X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fvxlan%2Fvxlan.h;h=0f226aa3e72c174b67659b4bfadfeb81941c2fcd;hb=af86a48;hp=ab9b2333a20be52dc9c1d8ed6b3f0918ad6cbcba;hpb=0ded8518cd3bc24f5f528bd42a5d2ff5c4602faf;p=vpp.git diff --git a/src/vnet/vxlan/vxlan.h b/src/vnet/vxlan/vxlan.h index ab9b2333a20..0f226aa3e72 100644 --- a/src/vnet/vxlan/vxlan.h +++ b/src/vnet/vxlan/vxlan.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include @@ -66,8 +66,8 @@ typedef CLIB_PACKED(struct { }) vxlan6_tunnel_key_t; typedef struct { - /* Rewrite string. $$$$ embed vnet_rewrite header */ - u8 * rewrite; + /* Required for pool_get_aligned */ + CLIB_CACHE_LINE_ALIGN_MARK(cacheline0); /* FIB DPO for IP forwarding of VXLAN encap packet */ dpo_id_t next_dpo; @@ -111,6 +111,12 @@ typedef struct { * The tunnels sibling index on the FIB entry's dependency list. */ u32 sibling_index; + + u32 flow_index; /* infra flow index */ + 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); } vxlan_tunnel_t; #define foreach_vxlan_input_next \ @@ -147,23 +153,25 @@ typedef struct { /* mcast shared info */ uword * mcast_shared; /* keyed on mcast ip46 addr */ - /* Free vlib hw_if_indices */ - u32 * free_vxlan_tunnel_hw_if_indices; - /* Mapping from sw_if_index to tunnel index */ u32 * tunnel_index_by_sw_if_index; /* convenience */ vlib_main_t * vlib_main; vnet_main_t * vnet_main; + + /* Record used instances */ + uword *instance_used; + u32 flow_id_start; } vxlan_main_t; -vxlan_main_t vxlan_main; +extern vxlan_main_t vxlan_main; extern vlib_node_registration_t vxlan4_input_node; extern vlib_node_registration_t vxlan6_input_node; extern vlib_node_registration_t vxlan4_encap_node; extern vlib_node_registration_t vxlan6_encap_node; +extern vlib_node_registration_t vxlan4_flow_input_node; u8 * format_vxlan_encap_trace (u8 * s, va_list * args); @@ -173,6 +181,7 @@ typedef struct { /* we normally use is_ip4, but since this adds to the * structure, this seems less of abreaking change */ u8 is_ip6; + u32 instance; ip46_address_t src, dst; u32 mcast_sw_if_index; u32 encap_fib_index; @@ -183,4 +192,17 @@ typedef struct { int vnet_vxlan_add_del_tunnel (vnet_vxlan_add_del_tunnel_args_t *a, u32 * sw_if_indexp); +void vnet_int_vxlan_bypass_mode +(u32 sw_if_index, u8 is_ip6, u8 is_enable); + +int vnet_vxlan_add_del_rx_flow +(u32 hw_if_index, u32 t_imdex, int is_add); + +u32 vnet_vxlan_get_tunnel_index (u32 sw_if_index); #endif /* included_vnet_vxlan_h */ + +/* + * Local Variables: + * eval: (c-set-style "gnu") + * End: + */