[COPP] Improve RX PPS Calcuation for COPP Tests #21705
Open
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
The current calculation method for the RX PPS rate for the COPP tests is not very accurate (in some cases 130-150% above nominal) due to the reliance of sampling received packets at the ptf container on the testbed server after sending the packet stream, while also using a timeout to wait for said packets to finish arriving. This does not capture the in-flight RX PPS rate, but rather takes an average outside of the actual packet transmission window, and incurs additional inaccuracies due to the wait time at the end.
A more accurate approach implemented here is to take two snapshots of the RX packet count at the NN agent on the dut itself while the packet stream is already running, and calculate the difference.
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
To fix neighbor_miss tests failing for TH5 duts on 202412, and enhance the COPP tests overall for more accurate results.
How did you do it?
Updated the calculation method used to get the RX PPS rate for the COPP tests.
How did you verify/test it?
Ran the copp tests and verified that the resulting RX PPS values were within range.