Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add occupancy and watermark counters in cells #2092

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions inc/saibuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ typedef enum _sai_ingress_priority_group_stat_t
/** Get dropped packets count [uint64_t] */
SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS = 0x00000008,

/** Get current pg occupancy in cells [uint64_t] */
SAI_INGRESS_PRIORITY_GROUP_STAT_CURR_OCCUPANCY_CELLS = 0x00000009,

/** Get watermark pg occupancy in cells [uint64_t] */
SAI_INGRESS_PRIORITY_GROUP_STAT_WATERMARK_CELLS = 0x0000000a,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Marian, just a sanity checks here, do we need:

  • SAI_INGRESS_PRIORITY_GROUP_STAT_XOFF_ROOM_CURR_OCCUPANCY_CELLS
  • SAI_INGRESS_PRIORITY_GROUP_STAT_XOFF_ROOM_WATERMARK_CELLS

For SAI_INGRESS_PRIORITY_GROUP_STAT_BYTES, I believe it is supported, and we don't need the cell counts (as it will be bad for tracking the traffic volume).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we missing the buffer pool ones? or can they be supported in bytes?


/** Custom range base value */
SAI_INGRESS_PRIORITY_GROUP_STAT_CUSTOM_RANGE_BASE = 0x10000000

Expand Down
6 changes: 6 additions & 0 deletions inc/saiqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,12 @@ typedef enum _sai_queue_stat_t
/** Queue delay watermark in nanoseconds [uint64_t] */
SAI_QUEUE_STAT_DELAY_WATERMARK_NS = 0x00000027,

/** Get current queue occupancy in cells [uint64_t] */
SAI_QUEUE_STAT_CURR_OCCUPANCY_CELLS = 0x00000028,

/** Get watermark queue occupancy in cells [uint64_t] */
SAI_QUEUE_STAT_WATERMARK_CELLS = 0x00000029,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, do we need SAI_BUFFER_POOL_STAT_XOFF_ROOM_WATERMARK_CELLS?


/** Custom range base value */
SAI_QUEUE_STAT_CUSTOM_RANGE_BASE = 0x10000000

Expand Down
12 changes: 12 additions & 0 deletions inc/saiswitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -3070,6 +3070,18 @@ typedef enum _sai_switch_attr_t
*/
SAI_SWITCH_ATTR_SELECTIVE_COUNTER_LIST,

/**
* @brief Size of a shared buffer cell
*
* Some counters related to shared buffer may be
* reported in cells instead of bytes for an
* improved performance.
*
* @type sai_uint32_t
* @flags READ_ONLY
*/
SAI_SWITCH_ATTR_SHARED_BUFFER_CELL_SIZE,

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