Skip to content
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

[QoS/test_buffer] [Mellanox] Enhance test_buffer #4350

Merged
merged 8 commits into from
Nov 17, 2021

Conversation

keboliu
Copy link
Contributor

@keboliu keboliu commented Sep 24, 2021

Signed-off-by: Kebo Liu kebol@nvidia.com

Description of PR

Summary:

Enhance the buffer test with:

  1. implemented the algorithm to calculate the headroom value based on the input port attributes
  2. for SONiC image version higher than 202106, compare the headroom against the calculated result based on the port attributes, for SONiC image version 202106 and before, keep the old way, comparing the values from pg_profile_lookup.ini

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911

Approach

What is the motivation for this PR?

To make the test more accurate regarding the headroom comparison, on new SONiC versions(later than 202106), use the same algorithm implemented in sonic-swss to calculate the expected headroom values instead of look up the pg_profile_lookup.ini. The relevant SONiC headroom calculation change is described in sonic-net/SONiC#870

How did you do it?

  1. implement the same headroom calculating algorithm as in the sonic-swss.
  2. compare the headroom values against the values calculated by the above new algorithm fruition

How did you verify/test it?

Run buffer regression test on various Mellanox platform

Any platform specific information?

This change only impacts the Mellanox platform

Supported testbed topology if it's a new test case?

Documentation

@lgtm-com
Copy link

lgtm-com bot commented Sep 24, 2021

This pull request introduces 5 alerts and fixes 1 when merging 52ba581 into b724f7a - view on LGTM.com

new alerts:

  • 4 for Unused local variable
  • 1 for Variable defined multiple times

fixed alerts:

  • 1 for Redundant assignment

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Kebo Liu <kebol@nvidia.com>
Signed-off-by: Kebo Liu <kebol@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Sep 30, 2021

This pull request introduces 5 alerts and fixes 1 when merging a28792a into e518208 - view on LGTM.com

new alerts:

  • 4 for Unused local variable
  • 1 for Variable defined multiple times

fixed alerts:

  • 1 for Redundant assignment

Signed-off-by: Kebo Liu <kebol@nvidia.com>
@keboliu keboliu marked this pull request as ready for review September 30, 2021 03:17
@keboliu keboliu requested a review from a team as a code owner September 30, 2021 03:17
@lgtm-com
Copy link

lgtm-com bot commented Sep 30, 2021

This pull request introduces 5 alerts when merging 21f8a7c into e518208 - view on LGTM.com

new alerts:

  • 4 for Unused local variable
  • 1 for Variable defined multiple times

Signed-off-by: Kebo Liu <kebol@nvidia.com>
@liat-grozovik
Copy link
Collaborator

@stephenxs could you please review the suggested change?
@neethajohn appreciate your feedback as well.

tests/qos/test_buffer.py Outdated Show resolved Hide resolved
Signed-off-by: Kebo Liu <kebol@nvidia.com>
@liat-grozovik
Copy link
Collaborator

@neethajohn could you please help to review?

tests/qos/test_buffer.py Outdated Show resolved Hide resolved
tests/qos/test_buffer.py Outdated Show resolved Hide resolved
tests/qos/test_buffer.py Outdated Show resolved Hide resolved
tests/qos/test_buffer.py Outdated Show resolved Hide resolved
tests/qos/test_buffer.py Outdated Show resolved Hide resolved
@neethajohn neethajohn merged commit 9882cb3 into sonic-net:master Nov 17, 2021
@keboliu keboliu deleted the peer-response-time branch November 18, 2021 01:20
AntonHryshchuk pushed a commit to AntonHryshchuk/sonic-mgmt that referenced this pull request Jan 4, 2022
Signed-off-by: Kebo Liu <kebol@nvidia.com>

Enhance the buffer test with:

* implemented the algorithm to calculate the headroom value based on the input port attributes
* for SONiC image version higher than 202106, compare the headroom against the calculated result based on the port attributes, for SONiC image version 202106 and before, keep the old way, comparing the values from pg_profile_lookup.ini

What is the motivation for this PR?
To make the test more accurate regarding the headroom comparison, on new SONiC versions(later than 202106), use the same algorithm implemented in sonic-swss to calculate the expected headroom values instead of look up the pg_profile_lookup.ini. The relevant SONiC headroom calculation change is described in sonic-net/SONiC#870

How did you do it?
* implement the same headroom calculating algorithm as in the sonic-swss.
* compare the headroom values against the values calculated by the above new algorithm fruition

How did you verify/test it?
Run buffer regression test on various Mellanox platform

Any platform specific information?
This change only impacts the Mellanox platform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants