Skip to content

Add v2r mapping for Switch Packet Integrity Drop counter#376

Closed
SuvarnaMeenakshi wants to merge 1 commit intosonic-net:masterfrom
SuvarnaMeenakshi:integrity_drop
Closed

Add v2r mapping for Switch Packet Integrity Drop counter#376
SuvarnaMeenakshi wants to merge 1 commit intosonic-net:masterfrom
SuvarnaMeenakshi:integrity_drop

Conversation

@SuvarnaMeenakshi
Copy link
Contributor

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:

    --- PASS: TestGnmiGet/get_COUNTERS:SWITCH_ID (0.00s)
    --- PASS: TestGnmiGet/get_COUNTERS:SWITCH_ID* (0.00s)
    --- PASS: TestGnmiGet/Invalid_fabric_port_key_getSWITCH_ID- (0.00s)
    --- PASS: TestGnmiGetMultiNs/get_COUNTERS:SWITCH_ID-asic0 (0.00s)
    --- PASS: TestGnmiGetMultiNs/get_COUNTERS:SWITCH_ID* (0.00s)
    --- PASS: TestGnmiGetMultiNs/Invalid_fabric_port_key_getSWITCH_ID (0.00s)

Verify on Chassis:

gnmi_get -target_addr localhost:50051 -xpath "COUNTERS/SWITCH*"  -xpath_target COUNTERS_DB -insecure 
COUNTERS/SWITCH*: [{"SWITCH_ID-asic0": {'SAI_SWITCH_STAT_PACKET_INTEGRITY_DROP': '0'}, {"SWITCH_ID-asic1": {'SAI_SWITCH_STAT_PACKET_INTEGRITY_DROP': '0'}} 

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mssonicbld
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vmittal-msft
Copy link
Contributor

Using PR - #423 to port these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants