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>

Add more port status

Address review comment
  • Loading branch information
prgeor committed Aug 29, 2024
1 parent d790980 commit e842ac9
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions inc/saiport.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,29 @@ typedef enum _sai_port_oper_status_t

} sai_port_oper_status_t;

typedef enum _sai_port_errors_status_t
{
/** No errors */
SAI_PORT_ERROR_CLEAR=0x0,

SAI_PORT_ERROR_MAC_LOCAL_FAULT=0x1,

SAI_PORT_ERROR_MAC_REMOTE_FAULT=0x2,

SAI_PORT_ERROR_LINK_TRAINING_FAILED=0x4,

SAI_PORT_ERROR_AUTONEG_FAILED=0x8,

SAI_PORT_ERROR_LINK_TRAINING_FAILED=0x10,

SAI_PORT_ERROR_SET_SPEED_FAILED=0x20,

SAI_PORT_ERROR_FEC_SYNC_LOSS=0x40,

SAI_PORT_FEC_LOSS_ALIGNMENT_MARKER=0x80

} sai_port_errors_status_t;

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

/** Bitmask of various port error status */
sai_port_errors_status_t port_error_status;
} sai_port_oper_status_notification_t;

/**
Expand Down Expand Up @@ -2537,6 +2562,18 @@ 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
*
* @type sai_port_errors_status_t
* @flags READ_ONLY
* @default SAI_PORT_ERROR_CLEAR
*/
SAI_PORT_ATTR_ERROR_STATUS,

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

0 comments on commit e842ac9

Please sign in to comment.