Add new config to enable per-port counter discovery for syncd - #28506
Add new config to enable per-port counter discovery for syncd#28506justin-wong-ce wants to merge 6 commits into
Conversation
|
/azp run Azure.sonic-buildimage |
|
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 PR has backport request for branch(es): 202605. ---Powered by SONiC BuildBot
|
|
The Tested branch section has been ticked and Test result is provided for branch(es): 202605. Added label(s): Tested for 202605 Branch. ---Powered by SONiC BuildBot
|
|
/azpw retry |
|
Retrying failed(or canceled) jobs... |
|
Retrying failed(or canceled) stages in build 1170168: ✅Stage Test:
|
dgsudharsan
left a comment
There was a problem hiding this comment.
Can you please add UT for lang model changes?
Ack, will be working on it |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Added |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Need to add logic such that We need this logic to be able to know when to use the ASIC type based check from sonic-net/sonic-sairedis#2001 and when to use the HWSKU config. |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azpw retry |
|
Retrying failed(or canceled) jobs... |
|
Retrying failed(or canceled) stages in build 1173234: ✅Stage Test:
|
|
/azpw retry |
|
Retrying failed(or canceled) jobs... |
|
Retrying failed(or canceled) stages in build 1173234: ✅Stage Test:
|
|
Will address failing CI when sonic-net/sonic-sairedis#2001 is merged |
|
/azpw retry |
|
Retrying failed(or canceled) jobs... |
|
Retrying failed(or canceled) stages in build 1173234: ✅Stage Test:
|
Adding a new HWSKU config to toggle per-port counter discovery when checking for counter to polls in syncd initialization. This config will be stored into CONFIG_DB and and used to decide what arguments to use to invoke syncd via syncd_init_common.sh Signed-off-by: Justin Wong <jvwong@arista.com>
Signed-off-by: Justin Wong <jvwong@arista.com>
Add the new entry enable_per_port_counter_discovery to be part of yang's device_metadata unit test. Signed-off-by: Justin Wong <jvwong@arista.com>
Cast the new enable_per_port_counter_discovery config file to all Arista HWSKUs as they all need the per-port counter discovery logic for counters to fully work. Signed-off-by: Justin Wong <jvwong@arista.com>
This reverts commit 9430c38. Broadcom ASICs no longer need a config file to use the per-port discovery code path. Retaining config in Arista-7060X6-64PE-B-C512S2 as an example for what the config should look like. Signed-off-by: Justin Wong <jvwong@arista.com>
Signed-off-by: Justin Wong <jvwong@arista.com>
b167199 to
604c3d0
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
/azpw retry |
|
Retrying failed(or canceled) jobs... |
|
Retrying failed(or canceled) stages in build 1185058: ✅Stage Test:
|
| {%if DEVICE_METADATA.localhost.supporting_bulk_counter_groups is defined and DEVICE_METADATA.localhost.supporting_bulk_counter_groups != '' -%} | ||
| "supporting_bulk_counter_groups": "{{ DEVICE_METADATA.localhost.supporting_bulk_counter_groups|join(',') }}", | ||
| {% endif -%} | ||
| "enable_per_port_counter_discovery": {% if DEVICE_METADATA.localhost.enable_per_port_counter_discovery|string|lower == "true" %}"true"{% else %}"false"{% endif %}, |
Adding a new HWSKU config
enable_per_port_counter_discoveryto be placed insonic-buildimage/device/...to toggle the per-port counter discovery feature when checking for counters to poll duringsyncd's initialization.This config will be stored into
CONFIG_DBand be used to decide what arguments to use to invokesyncdwith viasyncd_init_common.sh.An example is added in this change for
device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-C512S2.This is part 2 of 2 fix in addressing #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-sairedis#2002.
This change also requires the changes in sonic-net/sonic-sairedis#2000, sonic-net/sonic-sairedis#2001, and sonic-net/sonic-sairedis#2002 to work.
Why I did it
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 sonic-net/sonic-sairedis#2000) whenenable_per_port_counter_discoveryis populated in the HWSKU's config. This will be read fromsonic-buildimage/device...and then set intoDEVICE_METADATAinCONFIG_DB.Work item tracking
How I did it
syncdfor initialization.enable_per_port_counter_discoveryas a validCONFIG_DBentry in thedevice_metadatayang file.device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-C512S2How to verify it
(Please see the test result section below)
Which release branch to backport (provide reason below if selected)
Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type:
Tested branch
Test result
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.Description for the changelog
Add
enable_per_port_counter_discoveryconfig definitions and propogation logic.Link to config_db schema for YANG module changes
https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md#device-metadata
A picture of a cute animal (not mandatory but encouraged)