Skip to content

Commit

Permalink
Add Dash DPU scope DPU driven HA attributes
Browse files Browse the repository at this point in the history
Brings in SAI API changes from these DASH PRs
sonic-net/DASH#599
sonic-net/DASH#604

Signed-off-by: mukeshmv <mukesh@pensando.io>
  • Loading branch information
mukeshmv committed Jul 24, 2024
1 parent 684a8ee commit 6070472
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 0 deletions.
9 changes: 9 additions & 0 deletions experimental/saiexperimentaldasheni.h
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,15 @@ typedef enum _sai_eni_attr_t
*/
SAI_ENI_ATTR_OUTBOUND_ROUTING_GROUP_ID,

/**
* @brief Action parameter is HA flow owner
*
* @type bool
* @flags CREATE_AND_SET
* @default false
*/
SAI_ENI_ATTR_IS_HA_FLOW_OWNER,

/**
* @brief End of attributes
*/
Expand Down
53 changes: 53 additions & 0 deletions experimental/saiexperimentaldashha.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ typedef enum _sai_ha_set_attr_t
*/
SAI_HA_SET_ATTR_DP_CHANNEL_IS_ALIVE,

/**
* @brief Action parameter SAI vendor driven HA switchover wait time ms
*
* @type sai_uint32_t
* @flags CREATE_AND_SET
* @default 0
*/
SAI_HA_SET_ATTR_DPU_DRIVEN_HA_SWITCHOVER_WAIT_TIME_MS,

/**
* @brief End of attributes
*/
Expand Down Expand Up @@ -263,6 +272,50 @@ typedef enum _sai_ha_scope_attr_t
*/
SAI_HA_SCOPE_ATTR_FLOW_RECONCILE_NEEDED,

/**
* @brief Action parameter VIP v4
*
* @type sai_ip_address_t
* @flags CREATE_AND_SET
* @default 0.0.0.0
*/
SAI_HA_SCOPE_ATTR_VIP_V4,

/**
* @brief Action parameter VIP v6
*
* @type sai_ip_address_t
* @flags CREATE_AND_SET
* @default 0.0.0.0
*/
SAI_HA_SCOPE_ATTR_VIP_V6,

/**
* @brief Action parameter admin state
*
* @type bool
* @flags CREATE_AND_SET
* @default false
*/
SAI_HA_SCOPE_ATTR_ADMIN_STATE,

/**
* @brief Action parameter activate role
*
* @type bool
* @flags CREATE_AND_SET
* @default false
*/
SAI_HA_SCOPE_ATTR_ACTIVATE_ROLE,

/**
* @brief Action parameter DASH HA state
*
* @type sai_dash_ha_state_t
* @flags READ_ONLY
*/
SAI_HA_SCOPE_ATTR_DASH_HA_STATE,

/**
* @brief End of attributes
*/
Expand Down
6 changes: 6 additions & 0 deletions experimental/saiswitchextensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ typedef enum _sai_ha_scope_event_t

/** Flow reconcile is needed */
SAI_HA_SCOPE_EVENT_FLOW_RECONCILE_NEEDED,

/** DPU driven HA split brain detected */
SAI_HA_SCOPE_EVENT_SPLIT_BRAIN_DETECTED,
} sai_ha_scope_event_t;

/**
Expand All @@ -109,6 +112,9 @@ typedef struct _sai_ha_scope_event_data_t
/** Flow version */
sai_uint32_t flow_version;

/** HA state */
sai_dash_ha_state_t ha_state;

} sai_ha_scope_event_data_t;

/**
Expand Down
33 changes: 33 additions & 0 deletions experimental/saitypesextensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,38 @@ typedef enum _sai_dash_ha_role_t

} sai_dash_ha_role_t;

/**
* @brief Defines a list of enums for dash_ha_state
*/
typedef enum _sai_dash_ha_state_t
{
SAI_DASH_HA_STATE_DEAD,

SAI_DASH_HA_STATE_CONNECTING,

SAI_DASH_HA_STATE_CONNECTED,

SAI_DASH_HA_STATE_INITIALIZING_TO_ACTIVE,

SAI_DASH_HA_STATE_INITIALIZING_TO_STANDBY,

SAI_DASH_HA_STATE_PENDING_STANDALONE_ACTIVATION,

SAI_DASH_HA_STATE_PENDING_ACTIVE_ACTIVATION,

SAI_DASH_HA_STATE_PENDING_STANDBY_ACTIVATION,

SAI_DASH_HA_STATE_STANDALONE,

SAI_DASH_HA_STATE_ACTIVE,

SAI_DASH_HA_STATE_STANDBY,

SAI_DASH_HA_STATE_DESTROYING,

SAI_DASH_HA_STATE_SWITCHING_TO_STANDALONE,

} sai_dash_ha_state_t;

#endif /* __SAITYPESEXTENSIONS_H_ */

1 change: 1 addition & 0 deletions meta/aspell.en.pws
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ structs
sublayer
subnet
subnets
switchover
SysFS
syslog
timespec
Expand Down

0 comments on commit 6070472

Please sign in to comment.