-
Notifications
You must be signed in to change notification settings - Fork 73
Add v2r mapping for Switch Packet Integrity Drop counter #423
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
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Pull Request Overview
This PR adds support for the v2r mapping of the Switch Packet Integrity Drop counter by introducing new mapping files, updating the virtual DB translation functions, and extending unit tests.
- Adds mapping files that relate a switch identifier to its packet integrity drop OID.
- Updates the virtual database client and translation functions to support the new SWITCH* vpath.
- Extends unit tests to cover the new mapping and ensure proper response for both valid and invalid keys.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
testdata/COUNTERS_DEBUG_NAME_SWITCH_STAT_MAP.txt | New mapping file defining a switch-to-OID mapping. |
testdata/COUNTERS:oid:0x21000000000000.txt | New mapping file for SAI_SWITCH_STAT_PACKET_INTEGRITY_DROP counter. |
testdata/COUNTERS:SWITCH_wildcardasic0.txt | New asic-specific mapping file for switch wildcard queries. |
testdata/COUNTERS:SWITCH_wildcard.txt | New mapping file for switch wildcard queries. |
testdata/COUNTERS:SWITCH_ID.txt | New mapping file for switch keys with no asic appended. |
sonic_data_client/virtual_db.go | Implements the v2r mapping logic for switch packet integrity drop counters. |
sonic_data_client/db_client.go | Invokes new initialization for the switch stat mapping in the DB client. |
gnmi_server/server_test.go | Extends tests to load and validate the new switch mapping configurations. |
/azp run |
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@abdosi @zbud-msft please help review |
@vmittal-msft , please resolve conflicts |
Signed-off-by: Suvarna Meenakshi <[email protected]>
b03660e
to
6ad581d
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Porting Suvarna's PR - #376
Why I did it
Add v2r mapping to get SAI_SWITCH_STAT_PACKET_INTEGRITY_DROP counters for Chassis platform.
How I did it
Read COUNTERS_DEBUG_NAME_SWITCH_STAT_MAP to get OID and map to Counters so that telemetry can use "COUNTERS/SWITCH*" or "COUNTERS/SWITCH_ID" or "COUNTERS/SWITCH_ID-asic0" to get packet integrity drop counters.
How to verify it
Add unit-test:
Verify on Chassis:
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)