From e7999ce189439d8fa57c75999f1e04d732ad2e4e Mon Sep 17 00:00:00 2001 From: Marian Pritsak Date: Tue, 16 Mar 2021 15:14:32 -0700 Subject: [PATCH] User defined VxLAN UDP source port calculation Signed-off-by: Marian Pritsak --- inc/saiswitch.h | 14 ++++++++++++++ inc/saitunnel.h | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/inc/saiswitch.h b/inc/saiswitch.h index a6a7bfa6d..3ff43421e 100644 --- a/inc/saiswitch.h +++ b/inc/saiswitch.h @@ -490,6 +490,20 @@ typedef enum _sai_switch_tunnel_attr_t */ SAI_SWITCH_TUNNEL_ATTR_VXLAN_UDP_SPORT, + /** + * @brief Tunnel UDP source port mask + * + * Sport mask defining the number of least significant bits + * reserved for the calculated hash value. 0 means a fixed value. + * + * @type sai_uint8_t + * @flags CREATE_AND_SET + * @isvlan false + * @default 0 + * @validonly SAI_SWITCH_TUNNEL_ATTR_TUNNEL_TYPE == SAI_TUNNEL_TYPE_VXLAN and SAI_SWITCH_TUNNEL_ATTR_TUNNEL_VXLAN_UDP_SPORT_MODE == SAI_TUNNEL_VXLAN_UDP_SPORT_MODE_USER_DEFINED + */ + SAI_SWITCH_TUNNEL_ATTR_VXLAN_UDP_SPORT_MASK, + /** * @brief End of attributes */ diff --git a/inc/saitunnel.h b/inc/saitunnel.h index 877da1385..405fd232a 100644 --- a/inc/saitunnel.h +++ b/inc/saitunnel.h @@ -614,6 +614,20 @@ typedef enum _sai_tunnel_attr_t */ SAI_TUNNEL_ATTR_VXLAN_UDP_SPORT, + /** + * @brief Tunnel UDP source port mask + * + * Sport mask defining the number of least significant bits + * reserved for the calculated hash value. 0 means a fixed value. + * + * @type sai_uint8_t + * @flags CREATE_AND_SET + * @isvlan false + * @default 0 + * @validonly SAI_TUNNEL_ATTR_TYPE == SAI_TUNNEL_TYPE_VXLAN and SAI_TUNNEL_ATTR_VXLAN_UDP_SPORT_MODE == SAI_TUNNEL_VXLAN_UDP_SPORT_MODE_USER_DEFINED + */ + SAI_TUNNEL_ATTR_VXLAN_UDP_SPORT_MASK, + /** * @brief End of attributes */