-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[HLD] orchagent for PFC Historical stats #1903
base: master
Are you sure you want to change the base?
Conversation
/azp run |
No pipelines are associated with this pull request. |
/azp run |
No pipelines are associated with this pull request. |
22db32b
to
58f08f5
Compare
/azp run |
No pipelines are associated with this pull request. |
58f08f5
to
acca53d
Compare
/azp run |
No pipelines are associated with this pull request. |
acca53d
to
8eadba7
Compare
/azp run |
No pipelines are associated with this pull request. |
|
||
A new orch agent named "PfcHistoryOrch" will configure a flex counter group ("PFC\_STAT\_HISTORY") with a lua script plugin to poll COUNTERS\_DB at the configured interval and investigate if Pause Frames have been received on the interface. | ||
|
||
`TOTAL_PAUSE_TRANSITIONS`: Running total number of transitions from unpaused to paused |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
take a look at this stats, looks like same as definition. https://github.com/sonic-net/sonic-swss/blob/master/orchagent/pfc_detect_broadcom.lua#L43
SAI_PORT_STAT_PFC_RX_PKTS
SAI_PORT_STAT_PFC_ON2OFF_RX_PKTS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in pfc watchdog logic, looks like we are already pulling these counters at ~200ms, so you might want to just reuse those counters instead of pulling your own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the feedback Guohan! I looked into your suggestion but think merging PFC history into the PFC watchdog would be impractical. Even though they both poll the same counters, the features are distinct and I believe should be individually configurable. Using the same flex counter would make this difficult.
For example, it should be possible to have history enabled while the watchdog is disabled and vice versa. Similarly it should be possible to enable them on different ports. It might additionally be misleading that configuring the polling interval for the watchdog would also correspond to the history feature.
Using the same Flex Counter by adding the pfc_stat_history.lua plugin to the watchdog (or by adjusting the pfc_detect_{platform}.lua script to estimate the historical data) would make these configurations significantly more cumbersome.
Looking at SAI_PORT_STAT_PFC_ON2OFF_RX_PKTS, it seems to be exclusive to broadcom platform and is not used or provided on other platforms, so it would only be usable in that situation regardless.
Please let me know what you think!
Originally presented in SONiC Hackathon 2024
Using software to extrapolate PFC activity from existing PFC RX counters.
#1904