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

Inner packet hashing community test #3320

Merged
merged 5 commits into from
Jul 19, 2021
Merged

Conversation

anish-n
Copy link
Contributor

@anish-n anish-n commented Apr 13, 2021

Description of PR

Introduces a test similar to the hash_test in SONiC, but for hashing based on the inner packet tuples. The test validates that packets are ECMP'd across multiple nexthops in an balanced way using the inner tuples only.

Summary:
Fixes # (issue)

Type of change

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

Approach

What is the motivation for this PR?

To test packet hashing based on the inner packet tuples instead of the standard outer packet tuples. The test checks the distribution of packets is as expected, and that each of the inner packet hash parameters(inner src ip, dst ip, src port, dst port and ip proto) leads to a variation of ports hashed to, ie: ECMP spreading. The test also validates, as an optional mode, symmetric hashing: 2 directions of a flow end up on the same next-hop.

Note: The test assumes that inner hashing is configured on DUT prior to the test, in the future once inner hashing becomes a configuration parameter via config db, the test will be enhanced with configuration abilities. Feature which will expose this via configuration: sonic-net/SONiC#773

How did you do it?

PTF test which generates inner packet tuples

How did you verify/test it?

Developed the test and ran it on a DUT configured with inner hashing

Any platform specific information?

Supported on select Mellanox DUTs for now, other platforms may be added as they are tested

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

T0
Other topologies may be added as they are tested.

Documentation

Test Plan: sonic-net/SONiC#759
Inner hashing feature configuration: sonic-net/SONiC#773

@anish-n anish-n requested a review from a team as a code owner April 13, 2021 01:01
@anish-n anish-n changed the title Test inner packet hashing Inner packet hashing community test Apr 13, 2021
@lgtm-com
Copy link

lgtm-com bot commented Apr 13, 2021

This pull request introduces 2 alerts when merging 87e46e8 into da9aed4 - view on LGTM.com

new alerts:

  • 1 for Unused local variable
  • 1 for Unused import

@anish-n
Copy link
Contributor Author

anish-n commented Apr 13, 2021

Hi @nazariig requesting your review on this PR, thanks!

@lgtm-com
Copy link

lgtm-com bot commented Jul 15, 2021

This pull request introduces 2 alerts when merging eb04be6 into a7d70fe - view on LGTM.com

new alerts:

  • 1 for Unused local variable
  • 1 for Unused import

@yxieca yxieca merged commit a513265 into sonic-net:master Jul 19, 2021
@bingwang-ms
Copy link
Collaborator

@anish-n I noticed that the test cases were consistently failing in our nightly test. Is it because the setup is missing?

Note: The test assumes that inner hashing is configured on DUT prior to the test, in the future once inner hashing becomes a configuration parameter via config db, the test will be enhanced with configuration abilities. 

vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
Description of PR
Introduces a test similar to the hash_test in SONiC, but for hashing based on the inner packet tuples. The test validates that packets are ECMP'd across multiple nexthops in an balanced way using the inner tuples only.

Summary:

Approach
What is the motivation for this PR?
To test packet hashing based on the inner packet tuples instead of the standard outer packet tuples. The test checks the distribution of packets is as expected, and that each of the inner packet hash parameters(inner src ip, dst ip, src port, dst port and ip proto) leads to a variation of ports hashed to, ie: ECMP spreading. The test also validates, as an optional mode, symmetric hashing: 2 directions of a flow end up on the same next-hop.

Note: The test assumes that inner hashing is configured on DUT prior to the test, in the future once inner hashing becomes a configuration parameter via config db, the test will be enhanced with configuration abilities. Feature which will expose this via configuration: sonic-net/SONiC#773

How did you do it?
PTF test which generates inner packet tuples

How did you verify/test it?
Developed the test and ran it on a DUT configured with inner hashing

Any platform specific information?
Supported on select Mellanox DUTs for now, other platforms may be added as they are tested

Supported testbed topology if it's a new test case?
T0
Other topologies may be added as they are tested.
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