Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Harmonize vec/pool_get_aligned object sizes and alignment requests
[vpp.git]
/
src
/
vnet
/
vxlan
/
vxlan.h
diff --git
a/src/vnet/vxlan/vxlan.h
b/src/vnet/vxlan/vxlan.h
index
1ebb894
..
3c74bfd
100644
(file)
--- a/
src/vnet/vxlan/vxlan.h
+++ b/
src/vnet/vxlan/vxlan.h
@@
-26,7
+26,7
@@
#include <vnet/vxlan/vxlan_packet.h>
#include <vnet/ip/ip4_packet.h>
#include <vnet/ip/ip6_packet.h>
#include <vnet/vxlan/vxlan_packet.h>
#include <vnet/ip/ip4_packet.h>
#include <vnet/ip/ip6_packet.h>
-#include <vnet/
i
p/udp.h>
+#include <vnet/
ud
p/udp.h>
#include <vnet/dpo/dpo.h>
#include <vnet/adj/adj_types.h>
#include <vnet/dpo/dpo.h>
#include <vnet/adj/adj_types.h>
@@
-66,18
+66,12
@@
typedef CLIB_PACKED(struct {
}) vxlan6_tunnel_key_t;
typedef struct {
}) vxlan6_tunnel_key_t;
typedef struct {
- /* Re
write string. $$$$ embed vnet_rewrite header
*/
-
u8 * rewrite
;
+ /* Re
quired for pool_get_aligned
*/
+
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
;
/* FIB DPO for IP forwarding of VXLAN encap packet */
dpo_id_t next_dpo;
/* FIB DPO for IP forwarding of VXLAN encap packet */
dpo_id_t next_dpo;
- /* storage for the hash key */
- union {
- vxlan4_tunnel_key_t *key4; /* unused for now */
- vxlan6_tunnel_key_t *key6;
- };
-
/* vxlan VNI in HOST byte order */
u32 vni;
/* vxlan VNI in HOST byte order */
u32 vni;
@@
-117,6
+111,11
@@
typedef struct {
* The tunnels sibling index on the FIB entry's dependency list.
*/
u32 sibling_index;
* The tunnels sibling index on the FIB entry's dependency list.
*/
u32 sibling_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 \
} vxlan_tunnel_t;
#define foreach_vxlan_input_next \
@@
-137,12
+136,6
@@
typedef enum {
VXLAN_N_ERROR,
} vxlan_input_error_t;
VXLAN_N_ERROR,
} vxlan_input_error_t;
-typedef struct {
- ip46_address_t * ip;
- fib_node_index_t fib_entry_index;
- adj_index_t mcast_adj_index;
-} mcast_remote_t;
-
typedef struct {
/* vector of encap tunnel instances */
vxlan_tunnel_t * tunnels;
typedef struct {
/* vector of encap tunnel instances */
vxlan_tunnel_t * tunnels;
@@
-156,12
+149,8
@@
typedef struct {
uword * vtep4; /* local ip4 VTEPs keyed on their ip4 addr */
uword * vtep6; /* local ip6 VTEPs keyed on their ip6 addr */
uword * vtep4; /* local ip4 VTEPs keyed on their ip4 addr */
uword * vtep6; /* local ip6 VTEPs keyed on their ip6 addr */
- /* set of active remote mcast VTEP */
- mcast_remote_t * mcast_eps;
- uword * mcast_ep_by_ip; /* mcast VTEPs keyed on their ip46 addr */
-
- /* Free vlib hw_if_indices */
- u32 * free_vxlan_tunnel_hw_if_indices;
+ /* mcast shared info */
+ uword * mcast_shared; /* keyed on mcast ip46 addr */
/* Mapping from sw_if_index to tunnel index */
u32 * tunnel_index_by_sw_if_index;
/* Mapping from sw_if_index to tunnel index */
u32 * tunnel_index_by_sw_if_index;
@@
-169,9
+158,12
@@
typedef struct {
/* convenience */
vlib_main_t * vlib_main;
vnet_main_t * vnet_main;
/* convenience */
vlib_main_t * vlib_main;
vnet_main_t * vnet_main;
+
+ /* Record used instances */
+ uword *instance_used;
} vxlan_main_t;
} 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_input_node;
extern vlib_node_registration_t vxlan6_input_node;
@@
-186,6
+178,7
@@
typedef struct {
/* we normally use is_ip4, but since this adds to the
* structure, this seems less of abreaking change */
u8 is_ip6;
/* 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;
ip46_address_t src, dst;
u32 mcast_sw_if_index;
u32 encap_fib_index;
@@
-196,4
+189,12
@@
typedef struct {
int vnet_vxlan_add_del_tunnel
(vnet_vxlan_add_del_tunnel_args_t *a, u32 * sw_if_indexp);
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);
#endif /* included_vnet_vxlan_h */
#endif /* included_vnet_vxlan_h */
+
+/*
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */