Add PFC Deadlock Detection timer granularity attributes#2250
Add PFC Deadlock Detection timer granularity attributes#2250pinky-nexthop wants to merge 3 commits intoopencomputeproject:masterfrom
Conversation
- Add SAI_PORT_ATTR_PFC_TC_DLD_TIMER_INTERVAL to saiport.h - Add SAI_SWITCH_ATTR_PFC_TC_DLD_TIMER_INTERVAL to saiswitch.h These attributes allow configuration of PFC deadlock detection timer granularity (1ms, 10ms, or 100ms) at port and switch levels. Signed-off-by: pinky-nexthop <pinky@nexthop.ai> Signed-off-by: Pinky Agrawal <pinky@nexthop.ai>
| * @type sai_map_list_t | ||
| * @flags CREATE_AND_SET | ||
| * @default empty | ||
| */ |
| * @flags CREATE_AND_SET | ||
| * @default empty | ||
| */ | ||
| SAI_PORT_ATTR_PFC_TC_DLD_TIMER_INTERVAL, |
There was a problem hiding this comment.
could you also add the unit of the granularity? Is this in milliseconds?
Address review comments: - Add explicit units (milliseconds) to documentation - Clarify that sai_map_list_t maps TC to granularity value - Explain relationship with detection timer interval attribute - Specify valid granularity values: 1, 10, or 100 milliseconds Signed-off-by: pinky-nexthop <pinky@nexthop.ai> Signed-off-by: Pinky Agrawal <pinky@nexthop.ai>
Remove detailed explanation to keep documentation concise. The brief description is sufficient to understand the attribute purpose. Signed-off-by: pinky-nexthop <pinky@nexthop.ai> Signed-off-by: Pinky Agrawal <pinky@nexthop.ai>
|
@pinky-nexthop - are you able to discuss this PR in the SAI community meeting on 3/12? |
Could you please share the invite? |
| * @flags CREATE_AND_SET | ||
| * @default empty | ||
| */ | ||
| SAI_SWITCH_ATTR_PFC_TC_DLD_TIMER_INTERVAL, |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
- 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.
| * @default empty | ||
| */ | ||
| SAI_PORT_ATTR_PFC_TC_DLD_TIMER_INTERVAL, | ||
|
|
There was a problem hiding this comment.
Real use-case of different timer intervals for different ports ? For uplink and downlink for example ?
rck-innovium
left a comment
There was a problem hiding this comment.
Need more explanation:
- Why this cannot be managed within the SDK/SAI layer?
- An API workflow that does not have platform specific information
|
@JaiOCP - please help review |
These attributes allow configuration of PFC deadlock detection timer granularity (1ms, 10ms, or 100ms) at port and switch levels.