Skip to content

Commit

Permalink
Inner packet hashing community test (sonic-net#3320)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
anish-n authored and vmittal-msft committed Sep 28, 2021
1 parent 48ec913 commit 82295f4
Show file tree
Hide file tree
Showing 2 changed files with 691 additions and 0 deletions.
Loading

0 comments on commit 82295f4

Please sign in to comment.