[action] [PR:13848] [Snappi] Support for DUT statistics - Interface counters, PFC counters, and Queue counters. #14429
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
Support to pull the DUT statistics, namely interface counters, PFC counters and Queue counters.
This support will enable users to pull the DUT statistics run-time and capture them in form of dictionary for further processing.
Summary:
Fixes # (issue)
#13843
Type of change
Back port request
Approach
What is the motivation for this PR?
Currently, there is no one stop-place to fetch the DUT statistics and use them for verification, especially the SNAPPI testcases. There should be some way to pull the DUT statistics ( at least important ones) and use them for verification.
How did you do it?
Clear counters:
Common function to clear interface, PFC and queue counter stats.
Interface counters:
Ability to fetch the interface counters for a given DUT and port. Returns dictionary with keys - Rx and Tx packet count, Rx and Tx failures (Error + drops + ovr), and Rx and Tx throughput in Mbps.
PFC counters:
Ability to fetch the PFC counters for a given DUT and port. Returns dictionary with keys - Rx and Tx PFC for the given DUT, port and priority.
Queue counters:
Ability to fetch the Queue counters for a given DUT and port. Internally calls get_egress_queue_count for all the priorities. Returns dictionary with as key with transmitted packets as counter.
How did you verify/test it?
These functions are called as part of new testcases for PFC-ECN.
These are then used to create CSV with raw DUT statistics and then to summarize the test in the end.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation