Skip to content

Commit

Permalink
add oper speed (#898)
Browse files Browse the repository at this point in the history
* add oper speed

Current port speed attribute means configured speed
Added new read only attribute for operational speed, which is the actual speed the port is working, depending on configuration, peer, cable, and can be zero if port is down.

* Update saiport.h

Add comment about oper speed in cases of port down, and auto negotiation enabled.
  • Loading branch information
itaibaz authored and lguohan committed Dec 11, 2018
1 parent 0deb247 commit d1a27da
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions inc/saiport.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,17 @@ typedef enum _sai_port_attr_t
*/
SAI_PORT_ATTR_EYE_VALUES,

/**
* @brief Operational speed in Mbps
*
* If port is down, the returned value should be zero.
* If auto negotiation is on, the returned value should be the negotiated speed.
*
* @type sai_uint32_t
* @flags READ_ONLY
*/
SAI_PORT_ATTR_OPER_SPEED,

/* READ-WRITE */

/**
Expand All @@ -422,6 +433,8 @@ typedef enum _sai_port_attr_t
/**
* @brief Speed in Mbps
*
* On get, returns the configured port speed.
*
* @type sai_uint32_t
* @flags MANDATORY_ON_CREATE | CREATE_AND_SET
*/
Expand Down

0 comments on commit d1a27da

Please sign in to comment.