-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch attributes for tunnel ECN mode #1153
Changes from all commits
e7f91d8
18ff185
ff0c3aa
f09a8fd
7347e0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -325,6 +325,182 @@ typedef enum _sai_switch_failover_config_mode_t | |
|
||
} sai_switch_failover_config_mode_t; | ||
|
||
/** | ||
* @brief Defines tunnel encap ECN mode | ||
*/ | ||
typedef enum _sai_tunnel_ipinip_encap_ecn_mode_t | ||
{ | ||
/** | ||
* @brief Normal mode behavior defined in RFC 6040 | ||
* section 4.1 copy from inner | ||
*/ | ||
SAI_TUNNEL_IPINIP_ENCAP_ECN_MODE_STANDARD, | ||
|
||
/** | ||
* @brief User defined behavior. | ||
* | ||
* Need to provide #SAI_TUNNEL_MAP_TYPE_OECN_TO_UECN in #SAI_TUNNEL_ATTR_ENCAP_MAPPERS. | ||
*/ | ||
SAI_TUNNEL_IPINIP_ENCAP_ECN_MODE_USER_DEFINED | ||
|
||
} sai_tunnel_ipinip_encap_ecn_mode_t; | ||
|
||
/** | ||
* @brief Defines GRE tunnel encap ECN mode | ||
*/ | ||
typedef enum _sai_tunnel_ipinip_gre_encap_ecn_mode_t | ||
{ | ||
/** | ||
* @brief Normal mode behavior defined in RFC 6040 | ||
* section 4.1 copy from inner | ||
*/ | ||
SAI_TUNNEL_IPINIP_GRE_ENCAP_ECN_MODE_STANDARD, | ||
|
||
/** | ||
* @brief User defined behavior. | ||
* | ||
* Need to provide #SAI_TUNNEL_MAP_TYPE_OECN_TO_UECN in #SAI_TUNNEL_ATTR_ENCAP_MAPPERS. | ||
*/ | ||
SAI_TUNNEL_IPINIP_GRE_ENCAP_ECN_MODE_USER_DEFINED | ||
|
||
} sai_tunnel_ipinip_gre_encap_ecn_mode_t; | ||
|
||
/** | ||
* @brief Defines VXLAN tunnel encap ECN mode | ||
*/ | ||
typedef enum _sai_tunnel_vxlan_encap_ecn_mode_t | ||
{ | ||
/** | ||
* @brief Normal mode behavior defined in RFC 6040 | ||
* section 4.1 copy from inner | ||
*/ | ||
SAI_TUNNEL_VXLAN_ENCAP_ECN_MODE_STANDARD, | ||
|
||
/** | ||
* @brief User defined behavior. | ||
* | ||
* Need to provide #SAI_TUNNEL_MAP_TYPE_OECN_TO_UECN in #SAI_TUNNEL_ATTR_ENCAP_MAPPERS. | ||
*/ | ||
SAI_TUNNEL_VXLAN_ENCAP_ECN_MODE_USER_DEFINED | ||
|
||
} sai_tunnel_vxlan_encap_ecn_mode_t; | ||
|
||
/** | ||
* @brief Defines MPLS tunnel encap ECN mode | ||
*/ | ||
typedef enum _sai_tunnel_mpls_encap_ecn_mode_t | ||
{ | ||
/** | ||
* @brief Normal mode behavior defined in RFC 6040 | ||
* section 4.1 copy from inner | ||
*/ | ||
SAI_TUNNEL_MPLS_ENCAP_ECN_MODE_STANDARD, | ||
|
||
/** | ||
* @brief User defined behavior. | ||
* | ||
* Need to provide #SAI_TUNNEL_MAP_TYPE_OECN_TO_UECN in #SAI_TUNNEL_ATTR_ENCAP_MAPPERS. | ||
*/ | ||
SAI_TUNNEL_MPLS_ENCAP_ECN_MODE_USER_DEFINED | ||
|
||
} sai_tunnel_mpls_encap_ecn_mode_t; | ||
|
||
/** | ||
* @brief Defines tunnel decap ECN mode | ||
*/ | ||
typedef enum _sai_tunnel_ipinip_decap_ecn_mode_t | ||
{ | ||
/** | ||
* @brief Behavior defined in RFC 6040 section 4.2 | ||
*/ | ||
SAI_TUNNEL_IPINIP_DECAP_ECN_MODE_STANDARD, | ||
|
||
/** | ||
* @brief Copy from outer ECN | ||
*/ | ||
SAI_TUNNEL_IPINIP_DECAP_ECN_MODE_COPY_FROM_OUTER, | ||
|
||
/** | ||
* @brief User defined behavior | ||
* | ||
* Need to provide #SAI_TUNNEL_MAP_TYPE_UECN_OECN_TO_OECN in #SAI_TUNNEL_ATTR_DECAP_MAPPERS | ||
*/ | ||
SAI_TUNNEL_IPINIP_DECAP_ECN_MODE_USER_DEFINED | ||
|
||
} sai_tunnel_ipinip_decap_ecn_mode_t; | ||
|
||
/** | ||
* @brief Defines GRE tunnel decap ECN mode | ||
*/ | ||
typedef enum _sai_tunnel_ipinip_gre_decap_ecn_mode_t | ||
{ | ||
/** | ||
* @brief Behavior defined in RFC 6040 section 4.2 | ||
*/ | ||
SAI_TUNNEL_IPINIP_GRE_DECAP_ECN_MODE_STANDARD, | ||
|
||
/** | ||
* @brief Copy from outer ECN | ||
*/ | ||
SAI_TUNNEL_IPINIP_GRE_DECAP_ECN_MODE_COPY_FROM_OUTER, | ||
|
||
/** | ||
* @brief User defined behavior | ||
* | ||
* Need to provide #SAI_TUNNEL_MAP_TYPE_UECN_OECN_TO_OECN in #SAI_TUNNEL_ATTR_DECAP_MAPPERS | ||
*/ | ||
SAI_TUNNEL_IPINIP_GRE_DECAP_ECN_MODE_USER_DEFINED | ||
|
||
} sai_tunnel_ipinip_gre_decap_ecn_mode_t; | ||
|
||
/** | ||
* @brief Defines VXLAN tunnel decap ECN mode | ||
*/ | ||
typedef enum _sai_tunnel_vxlan_decap_ecn_mode_t | ||
{ | ||
/** | ||
* @brief Behavior defined in RFC 6040 section 4.2 | ||
*/ | ||
SAI_TUNNEL_VXLAN_DECAP_ECN_MODE_STANDARD, | ||
|
||
/** | ||
* @brief Copy from outer ECN | ||
*/ | ||
SAI_TUNNEL_VXLAN_DECAP_ECN_MODE_COPY_FROM_OUTER, | ||
|
||
/** | ||
* @brief User defined behavior | ||
* | ||
* Need to provide #SAI_TUNNEL_MAP_TYPE_UECN_OECN_TO_OECN in #SAI_TUNNEL_ATTR_DECAP_MAPPERS | ||
*/ | ||
SAI_TUNNEL_VXLAN_DECAP_ECN_MODE_USER_DEFINED | ||
|
||
} sai_tunnel_vxlan_decap_ecn_mode_t; | ||
|
||
/** | ||
* @brief Defines MPLS tunnel decap ECN mode | ||
*/ | ||
typedef enum _sai_tunnel_mpls_decap_ecn_mode_t | ||
{ | ||
/** | ||
* @brief Behavior defined in RFC 6040 section 4.2 | ||
*/ | ||
SAI_TUNNEL_MPLS_DECAP_ECN_MODE_STANDARD, | ||
|
||
/** | ||
* @brief Copy from outer ECN | ||
*/ | ||
SAI_TUNNEL_MPLS_DECAP_ECN_MODE_COPY_FROM_OUTER, | ||
|
||
/** | ||
* @brief User defined behavior | ||
* | ||
* Need to provide #SAI_TUNNEL_MAP_TYPE_UECN_OECN_TO_OECN in #SAI_TUNNEL_ATTR_DECAP_MAPPERS | ||
*/ | ||
SAI_TUNNEL_MPLS_DECAP_ECN_MODE_USER_DEFINED | ||
|
||
} sai_tunnel_mpls_decap_ecn_mode_t; | ||
|
||
/** | ||
* @brief Attribute Id in sai_set_switch_attribute() and | ||
* sai_get_switch_attribute() calls | ||
|
@@ -2256,6 +2432,158 @@ typedef enum _sai_switch_attr_t | |
*/ | ||
SAI_SWITCH_ATTR_SUPPORTED_FAILOVER_MODE, | ||
|
||
/** | ||
* @brief Tunnel mappers for encap | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add IP in IP in beginning of comment |
||
* | ||
* @type sai_object_list_t | ||
* @flags CREATE_AND_SET | ||
* @objects SAI_OBJECT_TYPE_TUNNEL_MAP | ||
* @default empty | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_IPINIP_ENCAP_ECN_MAPPERS, | ||
|
||
/** | ||
* @brief VXLAN Tunnel mappers for encap | ||
* | ||
* @type sai_object_list_t | ||
* @flags CREATE_AND_SET | ||
* @objects SAI_OBJECT_TYPE_TUNNEL_MAP | ||
* @default empty | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_VXLAN_ENCAP_ECN_MAPPERS, | ||
|
||
/** | ||
* @brief GRE Tunnel mappers for encap | ||
* | ||
* @type sai_object_list_t | ||
* @flags CREATE_AND_SET | ||
* @objects SAI_OBJECT_TYPE_TUNNEL_MAP | ||
* @default empty | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_IPINIP_GRE_ENCAP_ECN_MAPPERS, | ||
|
||
/** | ||
* @brief MPLS Tunnel mappers for encap | ||
* | ||
* @type sai_object_list_t | ||
* @flags CREATE_AND_SET | ||
* @objects SAI_OBJECT_TYPE_TUNNEL_MAP | ||
* @default empty | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_MPLS_ENCAP_ECN_MAPPERS, | ||
|
||
/** | ||
* @brief Tunnel mappers for decap | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add IP in IP in beginning of comment |
||
* | ||
* @type sai_object_list_t | ||
* @flags CREATE_AND_SET | ||
* @objects SAI_OBJECT_TYPE_TUNNEL_MAP | ||
* @default empty | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_IPINIP_DECAP_ECN_MAPPERS, | ||
|
||
/** | ||
* @brief VXLAN Tunnel mappers for decap | ||
* | ||
* @type sai_object_list_t | ||
* @flags CREATE_AND_SET | ||
* @objects SAI_OBJECT_TYPE_TUNNEL_MAP | ||
* @default empty | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_VXLAN_DECAP_ECN_MAPPERS, | ||
|
||
/** | ||
* @brief GRE Tunnel mappers for decap | ||
* | ||
* @type sai_object_list_t | ||
* @flags CREATE_AND_SET | ||
* @objects SAI_OBJECT_TYPE_TUNNEL_MAP | ||
* @default empty | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_IPINIP_GRE_DECAP_ECN_MAPPERS, | ||
|
||
/** | ||
* @brief MPLS Tunnel mappers for decap | ||
* | ||
* @type sai_object_list_t | ||
* @flags CREATE_AND_SET | ||
* @objects SAI_OBJECT_TYPE_TUNNEL_MAP | ||
* @default empty | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_MPLS_DECAP_ECN_MAPPERS, | ||
|
||
/** | ||
* @brief Tunnel encap ECN Mode load method | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add IP in IP in beginning of comment |
||
* | ||
* @type sai_tunnel_ipinip_encap_ecn_mode_t | ||
* @flags CREATE_AND_SET | ||
* @default SAI_TUNNEL_IPINIP_ENCAP_ECN_MODE_STANDARD | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_IPINIP_ENCAP_ECN_MODE, | ||
|
||
/** | ||
* @brief GRE Tunnel encap ECN Mode load method | ||
* | ||
* @type sai_tunnel_ipinip_gre_encap_ecn_mode_t | ||
* @flags CREATE_AND_SET | ||
* @default SAI_TUNNEL_IPINIP_GRE_ENCAP_ECN_MODE_STANDARD | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_IPINIP_GRE_ENCAP_ECN_MODE, | ||
|
||
/** | ||
* @brief VXLAN Tunnel encap ECN Mode load method | ||
* | ||
* @type sai_tunnel_vxlan_encap_ecn_mode_t | ||
* @flags CREATE_AND_SET | ||
* @default SAI_TUNNEL_VXLAN_ENCAP_ECN_MODE_STANDARD | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_VXLAN_ENCAP_ECN_MODE, | ||
|
||
/** | ||
* @brief MPLS Tunnel encap ECN Mode load method | ||
* | ||
* @type sai_tunnel_mpls_encap_ecn_mode_t | ||
* @flags CREATE_AND_SET | ||
* @default SAI_TUNNEL_MPLS_ENCAP_ECN_MODE_STANDARD | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_MPLS_ENCAP_ECN_MODE, | ||
|
||
/** | ||
* @brief Tunnel decap ECN Mode load method | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add IP in IP in beginning of comment |
||
* | ||
* @type sai_tunnel_ipinip_decap_ecn_mode_t | ||
* @flags CREATE_AND_SET | ||
* @default SAI_TUNNEL_IPINIP_DECAP_ECN_MODE_STANDARD | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_IPINIP_DECAP_ECN_MODE, | ||
|
||
/** | ||
* @brief GRE Tunnel decap ECN Mode load method | ||
* | ||
* @type sai_tunnel_ipinip_gre_decap_ecn_mode_t | ||
* @flags CREATE_AND_SET | ||
* @default SAI_TUNNEL_IPINIP_GRE_DECAP_ECN_MODE_STANDARD | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_IPINIP_GRE_DECAP_ECN_MODE, | ||
|
||
/** | ||
* @brief VXLAN Tunnel decap ECN Mode load method | ||
* | ||
* @type sai_tunnel_vxlan_decap_ecn_mode_t | ||
* @flags CREATE_AND_SET | ||
* @default SAI_TUNNEL_VXLAN_DECAP_ECN_MODE_STANDARD | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_VXLAN_DECAP_ECN_MODE, | ||
|
||
/** | ||
* @brief MPLS Tunnel decap ECN Mode load method | ||
* | ||
* @type sai_tunnel_mpls_decap_ecn_mode_t | ||
* @flags CREATE_AND_SET | ||
* @default SAI_TUNNEL_MPLS_DECAP_ECN_MODE_STANDARD | ||
*/ | ||
SAI_SWITCH_ATTR_TUNNEL_MPLS_DECAP_ECN_MODE, | ||
|
||
/** | ||
* @brief End of attributes | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to have enum per type, or can use a single enum ?
I think single enum would be good enough, but remember there is a prefix check, which maybe forces enum per type. Perhaps ask Kamil if a single enum can be used ?