Skip to content

Commit

Permalink
Add port FEC histogram counter support.
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Beresford <mberes@google.com>
  • Loading branch information
mikeberesford committed Oct 15, 2022
1 parent 19f10ac commit c96e930
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
80 changes: 80 additions & 0 deletions inc/saiport.h
Original file line number Diff line number Diff line change
Expand Up @@ -2151,6 +2151,15 @@ typedef enum _sai_port_attr_t
*/
SAI_PORT_ATTR_FABRIC_ISOLATE,

/**
* @brief Query the maximum number of symbols with errors that can be
* detected by the current FEC code (per FEC codeword).
*
* @type sai_uint32_t
* @flags READ_ONLY
*/
SAI_PORT_ATTR_MAX_FEC_SYMBOL_ERRORS_DETECTABLE,

/**
* @brief End of attributes
*/
Expand Down Expand Up @@ -2749,6 +2758,77 @@ typedef enum _sai_port_stat_t
/** Fabric port stat out data units */
SAI_PORT_STAT_IF_OUT_FABRIC_DATA_UNITS,

/**
* @brief Port FEC codeword symbol error counters.
*
* This set of counters corresponds to number of symbol errors in each FEC
* codeword received on the port.
*
* The number of symbol errors that may be detected is dependent on the type
* of FEC in use. For instance, RS-528 FEC supports detection of up to 7
* symbol errors, while RS-544 FEC supports detection of up to 15 symbol
* errors. The maximum number of errors that can be detected by the port's
* current FEC mode may be retrieved via the
* SAI_PORT_ATTR_MAX_FEC_SYMBOL_ERRORS_DETECTABLE port attribute. If the
* codeword contains more than SAI_PORT_ATTR_MAX_FEC_SYMBOL_ERRORS_DETECTABLE,
* the errors are placed in the next higher counter (so for the examples
* above, SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S8 would be used for
* greater than 7 symbol errors when RS-528 FEC is used, and
* SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S16 for greater than 15 symbol
* errors when using RS-544).
*/

/** Count of FEC codewords with no symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S0,

/** Count of FEC codewords with 1 symbol error. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S1,

/** Count of FEC codewords with 2 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S2,

/** Count of FEC codewords with 3 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S3,

/** Count of FEC codewords with 4 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S4,

/** Count of FEC codewords with 5 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S5,

/** Count of FEC codewords with 6 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S6,

/** Count of FEC codewords with 7 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S7,

/** Count of FEC codewords with 8 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S8,

/** Count of FEC codewords with 9 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S9,

/** Count of FEC codewords with 10 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S10,

/** Count of FEC codewords with 11 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S11,

/** Count of FEC codewords with 12 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S12,

/** Count of FEC codewords with 13 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S13,

/** Count of FEC codewords with 14 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S14,

/** Count of FEC codewords with 15 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S15,

/** Count of FEC codewords with 16 symbol errors. */
SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S16,

/** Port stat in drop reasons range start */
SAI_PORT_STAT_IN_DROP_REASON_RANGE_BASE = 0x00001000,

Expand Down
2 changes: 2 additions & 0 deletions meta/aspell.en.pws
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Callee
chardata
checksum
childs
codeword
codewords
const
couldn
cpp
Expand Down

0 comments on commit c96e930

Please sign in to comment.