Toggle enablePerPortCounterDiscovery based on HWSKU config - #2002
Merged
Conversation
Toggle the use of the per-port counter discovery arg based on whether enable_per_port_counter_discovery option is enabled in the HWSKU config. Signed-off-by: Justin Wong <jvwong@arista.com>
Collaborator
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This was referenced Jul 20, 2026
dgsudharsan
previously approved these changes
Jul 21, 2026
Contributor
Author
|
Need to update the condition to override the ASIC type-based check from #2001 when |
Contributor
Author
justin-wong-ce
marked this pull request as ready for review
July 30, 2026 05:03
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Hi @justin-wong-ce, could you please help with the conflict? |
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
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.
Description of PR
Summary:
Apply the
enablePerPortCounterDiscoverysyncdarg when the fileenable_per_port_counter_discoveryexists and has the contentstruein the machine's HWSKU config insonic-buildimage/device/....This is part 2 of 2 fix in addressing sonic-net/sonic-buildimage#28460. There are two fix methods under consideration, this PR outlines the method of deciding code path via the HWSKU config and needs to be used together with sonic-net/sonic-buildimage#28506.
This change also requires the changes in #2000, #2001, and sonic-net/sonic-buildimage#28506 to work.
Fixes sonic-net/sonic-buildimage#28460
Type of change
Approach
What is the motivation for this PR?
In #1774 , a new counter support discovery method is introduced for being able to read counter support for platforms where different ports can have different capabilities.
The method worked well for some platforms, not so much for some others.
This change applies the new
syncdargenablePerPortCounterDiscovery(introduced in #2000) whenenable_per_port_counter_discoveryis populated astrueinSYNCD_VARS, which is retrieved fromDEVICE_METADATAinCONFIG_DB.Work item tracking
How did you do it?
Add logic in
syncd_init_common.shto apply thesyncdargenablePerPortCounterDiscoverywhen it is defined as so inSYNCD_VARS.How did you verify/test it?
syncdunit tests pass on master and on 202605.On physical hardware, an image is built with the changes cherry-picked to 202605 and tests are ran in 6 scenarios:
1):
broadcom2):
broadcomenable_per_port_counter_discoveryset totrue3):
broadcomenable_per_port_counter_discoveryset tofalse4):
mellanox5):
mellanoxenable_per_port_counter_discoveryset totrue6):
mellanoxenable_per_port_counter_discoveryset tofalseIn all 6 scenarios,
syncdenters the expected code path.Additionally, a subset of counters-focused
sonic-mgmttests are ran. There is no test result difference compared to tests done without this change.Tests were ran on
Arista-7260CX3-D108C8.The list of
sonic-mgmttests ran:Any platform specific information?
Broadcom
Documentation