Skip to content

Commit

Permalink
Cable diagnostics attribute added
Browse files Browse the repository at this point in the history
Signed-off-by: Prafull Singh <56103377+prafull-brcm@users.noreply.github.com>
  • Loading branch information
prafull-brcm committed Sep 8, 2023
1 parent c47fa0d commit d105ab4
Showing 1 changed file with 81 additions and 0 deletions.
81 changes: 81 additions & 0 deletions inc/saiport.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,53 @@ typedef enum _sai_port_media_type_t
SAI_PORT_MEDIA_TYPE_BACKPLANE,
} sai_port_media_type_t;

/**
* @brief Attribute data for #SAI_PORT_ATTR_CABLE_PAIR_STATE
* Copper cable pair states
*/
typedef enum _sai_port_cable_pair_state_t
{
/** Cable state no faults */
SAI_PORT_CABLE_PAIR_STATE_OK,

/** Cable state open */
SAI_PORT_CABLE_PAIR_STATE_OPEN,

/** Cable state short */
SAI_PORT_CABLE_PAIR_STATE_SHORT,

/** Cable state cross talk */
SAI_PORT_CABLE_PAIR_STATE_CROSSTALK,

/** Cable state unknown */
SAI_PORT_CABLE_PAIR_STATE_UNKNOWN
} sai_port_cable_pair_state_t;

/**
* @brief Attribute data for #SAI_PORT_ATTR_CABLE_TYPE
* Copper cable types
*/
typedef enum _sai_port_cable_type_t
{
/** Cable type Unknown */
SAI_PORT_CABLE_TYPE_UNKNOWN,

/** Cable type CAT5 */
SAI_PORT_CABLE_TYPE_CAT5,

/** Cable type CAT5E */
SAI_PORT_CABLE_TYPE_CAT5E,

/** Cable type CAT6 */
SAI_PORT_CABLE_TYPE_CAT6,

/** Cable type CAT6A */
SAI_PORT_CABLE_TYPE_CAT6A,

/** Cable type CAT7 */
SAI_PORT_CABLE_TYPE_CAT7
} sai_port_cable_type_t;

/**
* @brief Breakout Mode types based on number
* of SerDes lanes used in a port
Expand Down Expand Up @@ -2400,6 +2447,40 @@ typedef enum _sai_port_attr_t
*/
SAI_PORT_ATTR_DATAPATH_ENABLE,

/**
* @brief Read ethernet copper cable pair status.
*
* Returns pair states sequentially from list index 0 to n (n = number of pairs - 1)
* value of n depends on number of pairs in twisted ethernet copper cable
* Cable diagnostics triggers ECD once cable pair states is requested, it is synchronous call.
*
* @type sai_s32_list_t sai_port_cable_pair_state_t
* @flags READ_ONLY
*/
SAI_PORT_ATTR_CABLE_PAIR_STATE,

/**
* @brief Get ethernet copper cable pair length (unit meter)
*
* Returns ethernet cable pair length sequentially from list index 0 to n (n = number of pairs - 1)
* value of n depends on number of pairs in twisted ethernet copper cable
* Cable diagnostics runs once cable pair length is requested, it is synchronous call.
*
* @type sai_s32_list_t
* @flags READ_ONLY
*/
SAI_PORT_ATTR_CABLE_PAIR_LENGTH,

/**
* @brief Configure ethernet copper cable type to check the cable status
*
* @type sai_port_cable_type_t
* @flags CREATE_AND_SET
* @default SAI_PORT_CABLE_TYPE_UNKNOWN
* @validonly SAI_PORT_ATTR_MEDIA_TYPE == SAI_PORT_MEDIA_TYPE_COPPER
*/
SAI_PORT_ATTR_CABLE_TYPE,

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

0 comments on commit d105ab4

Please sign in to comment.