Skip to content

Commit

Permalink
Adding additional Ether pkts stats ranges for Cisco Platforms (#1997)
Browse files Browse the repository at this point in the history
Adding additional Ether Pkts in and out stats ranges requirement for Cisco Platforms.

Currently SAI supported attributes are in the range for bigger frames sizes are : 1519-2047, 2048-4095, 4096-9216 and 9217-16383
Cisco platform supported range for bigger frames sizes are : 1519-2500, 2501-9000, 9001-16383.
It requires new set of Attributes to show granular stats for Cisco platforms.

Adding below Attributes:

SAI_PORT_STAT_ETHER_IN_PKTS_1519_TO_2500_OCTETS,
SAI_PORT_STAT_ETHER_IN_PKTS_2501_TO_9000_OCTETS,
SAI_PORT_STAT_ETHER_IN_PKTS_9001_TO_16383_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_1519_TO_2500_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_2501_TO_9000_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_9001_TO_16383_OCTETS
  • Loading branch information
rajendrat authored Dec 9, 2024
1 parent ad20062 commit ab47430
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions inc/saiport.h
Original file line number Diff line number Diff line change
Expand Up @@ -2665,6 +2665,15 @@ typedef enum _sai_port_attr_t
*/
SAI_PORT_ATTR_SELECTIVE_COUNTER_LIST,

/**
* @brief Read supported port stat list
*
* @type sai_object_list_t
* @flags READ_ONLY
* @objects SAI_OBJECT_TYPE_COUNTER
*/
SAI_PORT_ATTR_PORT_STAT_EXTENDED,

/**
* @brief End of attributes
*/
Expand Down Expand Up @@ -3409,6 +3418,24 @@ typedef enum _sai_port_stat_t
/** Port stat out drop reasons range end */
SAI_PORT_STAT_OUT_DROP_REASON_RANGE_END = 0x00002fff,

/** SAI port stat ether in pkts 1519 to 2500 octets */
SAI_PORT_STAT_ETHER_IN_PKTS_1519_TO_2500_OCTETS,

/** SAI port stat ether in pkts 2501 to 9000 octets */
SAI_PORT_STAT_ETHER_IN_PKTS_2501_TO_9000_OCTETS,

/** SAI port stat ether in pkts 9001 to 16383 octets */
SAI_PORT_STAT_ETHER_IN_PKTS_9001_TO_16383_OCTETS,

/** SAI port stat ether out pkts 1519 to 2500 octets */
SAI_PORT_STAT_ETHER_OUT_PKTS_1519_TO_2500_OCTETS,

/** SAI port stat ether out pkts 2501 to 9000 octets */
SAI_PORT_STAT_ETHER_OUT_PKTS_2501_TO_9000_OCTETS,

/** SAI port stat ether out pkts 9001 to 16383 octets */
SAI_PORT_STAT_ETHER_OUT_PKTS_9001_TO_16383_OCTETS,

/** Port stat range end */
SAI_PORT_STAT_END,

Expand Down
1 change: 1 addition & 0 deletions meta/checkheaders.pl
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ sub CheckHash
next if $key eq "SAI_OBJECT_TYPE_MAX";
next if $key eq "SAI_API_MAX";
next if $key eq "SAI_PORT_INTERFACE_TYPE_MAX";
next if $key eq "SAI_PORT_STAT_END";
next if $key eq "SAI_PORT_BREAKOUT_MODE_TYPE_MAX";

# NOTE: some other attributes/enum with END range could be added
Expand Down

0 comments on commit ab47430

Please sign in to comment.