summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan-gpe/vxlan_gpe.h
diff options
context:
space:
mode:
authorArtem Glazychev <artem.glazychev@xored.com>2021-05-28 19:09:14 +0700
committerDamjan Marion <dmarion@me.com>2021-10-08 11:38:56 +0000
commitea96292985760b7fc3af54669e3eab35e7561a10 (patch)
tree05a0317fb9cb7460f86056e16d256e448147eeaa /src/vnet/vxlan-gpe/vxlan_gpe.h
parent3f59c639609be9768f592111e5f8a8a2c23db3ac (diff)
vxlan-gpe: add udp-port configuration support
similar behavior as here: 839dcc0fb7313638d9b8f52a9db81350dddfe461 Type: improvement Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> Change-Id: I1b0a8f8f3dab48839e27df7065cf5f786cf0b5e9
Diffstat (limited to 'src/vnet/vxlan-gpe/vxlan_gpe.h')
-rw-r--r--src/vnet/vxlan-gpe/vxlan_gpe.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/vnet/vxlan-gpe/vxlan_gpe.h b/src/vnet/vxlan-gpe/vxlan_gpe.h
index 0f8250a1788..5d21ee66d67 100644
--- a/src/vnet/vxlan-gpe/vxlan_gpe.h
+++ b/src/vnet/vxlan-gpe/vxlan_gpe.h
@@ -64,7 +64,7 @@ typedef CLIB_PACKED (struct {
/**
* @brief Key struct for IPv4 VXLAN GPE tunnel.
- * Key fields: local remote, vni
+ * Key fields: local remote, vni, udp-port
* all fields in NET byte order
* VNI shifted 8 bits
*/
@@ -76,7 +76,7 @@ typedef CLIB_PACKED(struct {
u32 remote;
u32 vni;
- u32 pad;
+ u32 port;
};
u64 as_u64[2];
};
@@ -85,7 +85,7 @@ typedef CLIB_PACKED(struct {
/**
* @brief Key struct for IPv6 VXLAN GPE tunnel.
- * Key fields: local remote, vni
+ * Key fields: local remote, vni, udp-port
* all fields in NET byte order
* VNI shifted 8 bits
*/
@@ -94,9 +94,21 @@ typedef CLIB_PACKED(struct {
ip6_address_t local;
ip6_address_t remote;
u32 vni;
+ u32 port;
}) vxlan6_gpe_tunnel_key_t;
/* *INDENT-ON* */
+typedef union
+{
+ struct
+ {
+ u32 tunnel_index;
+ u16 next_index;
+ u8 error;
+ };
+ u64 as_u64;
+} vxlan_gpe_decap_info_t;
+
/**
* @brief Struct for VXLAN GPE tunnel
*/
@@ -117,6 +129,10 @@ typedef struct
ip46_address_t local;
/** tunnel remote address */
ip46_address_t remote;
+ /** local udp-port **/
+ u16 local_port;
+ /** remote udp-port **/
+ u16 remote_port;
/* mcast packet output intfc index (used only if dst is mcast) */
u32 mcast_sw_if_index;
@@ -248,6 +264,8 @@ typedef struct
u32 encap_fib_index;
u32 decap_fib_index;
u32 vni;
+ u16 local_port;
+ u16 remote_port;
} vnet_vxlan_gpe_add_del_tunnel_args_t;