Enhance counter polling implementation#73
Merged
r12f merged 1 commit intoAzure:202412from Aug 4, 2025
Merged
Conversation
Add feature to allow different sets of supported counters for different interfaces. Currently, if an interface has less supported counters than other interfaces on a switch, the interface with fewer supported counters will not have their counters polled to COUNTERS_DB - it will remain as a `N/A` in `show interface counters`. This change will allow counters to be polled successfuly for those interfaces with fewer supported counters by recognizing what can be polled and what cannot be when syncd initializes.
r12f
approved these changes
Aug 4, 2025
mssonicbld
added a commit
that referenced
this pull request
Aug 5, 2025
```<br>* 4fd6cc6 - (HEAD -> 202503) Merge branch '202412' of https://github.com/Azure/sonic-sairedis.msft into 202503 (2025-08-05) [Sonic Automation] * 6039c6b - (base/202412) Enhance counter polling implementation (#73) (2025-08-04) [Justin Wong]<br>```
r12f
added a commit
to r12f/sonic-sairedis.msft
that referenced
this pull request
Aug 14, 2025
This reverts commit 6039c6b.
r12f
added a commit
that referenced
this pull request
Aug 15, 2025
mssonicbld
added a commit
that referenced
this pull request
Aug 16, 2025
```<br>* 7a3919d - (HEAD -> 202503) Merge branch '202412' of https://github.com/Azure/sonic-sairedis.msft into 202503 (2025-08-16) [Sonic Automation] * 2b3cbce - (base/202412, test, 202412) Revert "Enhance counter polling implementation (#73)" (#81) (2025-08-14) [Riff]<br>```
yejianquan
added a commit
to sonic-net/sonic-swss
that referenced
this pull request
Sep 3, 2025
…for-port-cntrs Temporarily disable bulk init requests for PORT counters Add temporary fix for https://github.com/aristanetworks/sonic-qual.msft/issues/655 This forces each port to be processed individually, avoiding capability mismatch between different ports in bulk requests What I did Temporarily disable bulk init requests for PORT counters. Why I did it When swss requests bulk initialization of PORT counters, corresponding component in sonic-sairedis assumes all the requested ports support same attributes, which is not the case for SFP/mgmt ports of Arista switches and was causing these ports to be completely skipped. This is supposed to be fixed by Azure/sonic-sairedis.msft#73 but it needs a re-work as its breaking non-Broadcom platform. So, we're temporarily disabling this flow. How I verified it Verified countersDB is now having all the supported counters for SFP ports. Details if related relevant threads: #558, #629, 655 signed-off-by: jianquanye@microsoft.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add feature to allow different sets of supported counters for different interfaces.
Currently, if an interface has less supported counters than other interfaces on a switch, the interface with fewer supported counters will not have their counters polled to
COUNTERS_DB- it will remain as aN/Ainshow interface counters.This change will allow counters to be polled successfully for those interfaces with fewer supported counters by recognizing what can be polled and what cannot be when
syncdinitializes.Instead of directly modifying existing functions, parallel functions are created with the new logic that uses the new data structures
std::map<sai_object_id_t, size_t> m_objectSupportedCountersGroupMapandstd::vector<std::set<StatType>> m_supportedCounterGroups. This is so that in the case the new method fails initialisation, it will fallback to the old method.The parallel methods are:
This change does not involve
BulkStatContextcode path. However, the data structure it relies on is no longer populated in the parallel functions. It will use the largestCounterGroupinm_supportedCounterGroupsinstead ofm_supportedCounters.Testing: WIP. Review opened first for early feedback.