Skip to content

Commit

Permalink
Extended port operational status with various error status
Browse files Browse the repository at this point in the history
Signed-off-by: Prince George <prgeor@microsoft.com>
  • Loading branch information
prgeor committed Sep 12, 2024
1 parent a0ae84d commit 972917d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions inc/saiport.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,23 @@ typedef enum _sai_port_oper_status_t

} sai_port_oper_status_t;

/**
* @brief Attribute bitmap data for #SAI_PORT_ATTR_ERROR_STATUS
*/
typedef enum _sai_port_error_status_t
{
/** No errors */
SAI_PORT_ERROR_STATUS_CLEAR = 0,

SAI_PORT_ERROR_STATUS_MAC_LOCAL_FAULT = 1,

SAI_PORT_ERROR_STATUS_MAC_REMOTE_FAULT = 2,

SAI_PORT_ERROR_STATUS_FEC_SYNC_LOSS = 4,

SAI_PORT_ERROR_STATUS_FEC_LOSS_ALIGNMENT_MARKER = 8
} sai_port_error_status_t;

/**
* @brief Defines the operational status of the port
*/
Expand All @@ -89,6 +106,8 @@ typedef struct _sai_port_oper_status_notification_t
/** Port operational status */
sai_port_oper_status_t port_state;

/** Bitmap of various port error or fault status */
sai_port_error_status_t port_error_status;
} sai_port_oper_status_notification_t;

/**
Expand Down Expand Up @@ -2537,6 +2556,19 @@ typedef enum _sai_port_attr_t
*/
SAI_PORT_ATTR_UNRELIABLE_LOS,

/**
* @brief Various port error status
*
* Attribute to query the capability of the Switch to report
* various port error and fault status. The attribute can also
* be used to query the current port error and fault status.
*
* @type sai_port_error_status_t
* @flags READ_ONLY
* @default SAI_PORT_ERROR_STATUS_CLEAR
*/
SAI_PORT_ATTR_ERROR_STATUS,

/**
* @brief End of attributes
*/
Expand Down

0 comments on commit 972917d

Please sign in to comment.