Skip to content
Closed
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
11 changes: 11 additions & 0 deletions inc/saiport.h
Original file line number Diff line number Diff line change
Expand Up @@ -2925,6 +2925,17 @@ typedef enum _sai_port_attr_t
*/
SAI_PORT_ATTR_LINK_UP_DEBOUNCE_TIMEOUT,

/**
* @brief Port PFC Deadlock Detection timer granularity in milliseconds.
*
* Specifies the hardware timer granularity for PFC deadlock detection.
*
* @type sai_map_list_t
* @flags CREATE_AND_SET
* @default empty
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@pinky-nexthop why list of granularities?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good point. Removed.

SAI_PORT_ATTR_PFC_TC_DLD_TIMER_INTERVAL,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could you also add the unit of the granularity? Is this in milliseconds?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, updated. Thanks.


Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Real use-case of different timer intervals for different ports ? For uplink and downlink for example ?

/**
* @brief End of attributes
*/
Expand Down
11 changes: 11 additions & 0 deletions inc/saiswitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -3550,6 +3550,17 @@ typedef enum _sai_switch_attr_t
*/
SAI_SWITCH_ATTR_LINK_UP_DEBOUNCE_TIMEOUT,

/**
* @brief PFC Deadlock Detection timer granularity in milliseconds.
*
* Specifies the hardware timer granularity for PFC deadlock detection.
*
* @type sai_map_list_t
* @flags CREATE_AND_SET
* @default empty
*/
SAI_SWITCH_ATTR_PFC_TC_DLD_TIMER_INTERVAL,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why not to use the existing SAI_SWITCH_ATTR_PFC_TC_DLD_INTERVAL SAI attribute ?

We will have 2 now : SAI_SWITCH_ATTR_PFC_TC_DLD_INTERVAL (old) and SAI_SWITCH_ATTR_PFC_TC_DLD_TIMER_INTERVAL (new)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

SAI_SWITCH_ATTR_PFC_TC_DLD_INTERVAL and SAI_PORT_ATTR_PFC_TC_DLD_INTERVAL are existing attributes that define the detection time to trigger deadlock state on a port/queue.
However, the new proposal SAI_SWITCH_ATTR_PFC_TC_DLD_TIMER_INTERVAL is for setting the granularity of the h/w timers. For example, broadcom chips support granularity of 1ms, 10ms and 100ms. If granularity is set to 10ms, then h/w can only program detection timer range between 10-150ms. Similarly, if granularity is set to 100ms, then h/w can only program detection timer range between 100-1500ms.
therefore, a new SAI attribute is required to dynamically tune the detection timer range based on this new attribute.

Copy link
Copy Markdown
Contributor

@rck-innovium rck-innovium Mar 12, 2026

Choose a reason for hiding this comment

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

  • I agree with @eddyk-nvidia; this can be managed by the SAI/SDK implementation using the existing SAI attributes. For the above e.g., the SDK can choose to return the range {1 to 1500} as part of the get on SAI_PORT_ATTR_PFC_TC_DLD_INTERVAL_RANGE. When the user sets SAI_SWITCH_ATTR_PFC_TC_DLD_INTERVAL as 1500, the SDK can internally configure the h/w timer granularity to 100ms.
  • Reason: The above relationship between detection time and timer interval seems platform specific: that the detection interval must be <= 10 * timer_interval.


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