Skip to content

[inner hashing] extend inner hashing test with dynamic Policy Base Hashing configurations#4078

Merged
liat-grozovik merged 12 commits intosonic-net:masterfrom
AntonHryshchuk:inner_hashing_d_PBH
Nov 8, 2021
Merged

[inner hashing] extend inner hashing test with dynamic Policy Base Hashing configurations#4078
liat-grozovik merged 12 commits intosonic-net:masterfrom
AntonHryshchuk:inner_hashing_d_PBH

Conversation

@AntonHryshchuk
Copy link
Contributor

@AntonHryshchuk AntonHryshchuk commented Aug 19, 2021

Description of PR

Summary:
extending of inner hashing test with dynamic Policy Base Hashing configurations.

Include 4 parameterized tests:
outer_ipver - inner_ipver
ipv4 - ipv4
ipv6 - ipv4
ipv6 - ipv4
ipv6 - ipv6

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?

Validation of PBH feature

How did you verify/test it?

The test executed on different MLNX platforms, supported the PBH feature

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

t0

Documentation

https://github.com/anish-n/SONiC/blob/c27b933b0b3e7a13ebabc7b294ae15f7e5c6340e/doc/ecmp/inner_packet_hashing_test_plan.md

sonic-net/SONiC#824

… Hashing configurations

Signed-off-by: Anton <antonh@nvidia.com>
… Hashing configurations

Signed-off-by: Anton <antonh@nvidia.com>
… Hashing configurations

Signed-off-by: Anton <antonh@nvidia.com>
@AntonHryshchuk AntonHryshchuk requested a review from a team as a code owner August 19, 2021 06:38
@liat-grozovik
Copy link
Collaborator

@anish-n please help to review or assign a reviewer.
@AntonHryshchuk please check failures

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

@anish-n kindly reminder, please review or assign someone.
@nazariig please also review

"inner_src_ipv4": {"field": "INNER_SRC_IPV4", "sequence": "3", "mask": "255.255.255.255"},
"inner_dst_ipv4": {"field": "INNER_DST_IPV4", "sequence": "3", "mask": "255.255.255.255"},
"inner_src_ipv6": {"field": "INNER_SRC_IPV6", "sequence": "4", "mask": "ffff:ffff::"},
"inner_dst_ipv6": {"field": "INNER_DST_IPV6", "sequence": "4", "mask": "ffff:ffff::"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AntonHryshchuk this mask doesn't fit the IPv6 address range, so load balancing won't be working:

SRC_IPV6_RANGE = ['20D0:A800:0:00::', '20D0:A800:0:00::FFFF']
DST_IPV6_RANGE = ['20D0:A800:0:01::', '20D0:A800:0:01::FFFF']

Please fix the test logic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ipv6 mask changed to "::ffff:ffff"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anish-n please have a look

@nazariig
Copy link
Contributor

nazariig commented Sep 9, 2021

@anish-n kindly reminder, please review or assign someone.
@nazariig please also review

@liat-grozovik done

… Hashing configurations

Signed-off-by: Anton <antonh@nvidia.com>
@AntonHryshchuk
Copy link
Contributor Author

trying to rebuild

@roy-sror
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 4078 in repo Azure/sonic-mgmt

@liat-grozovik
Copy link
Collaborator

liat-grozovik commented Sep 12, 2021 via email

@azure-pipelines
Copy link

Command 'run

Get' is not supported by Azure Pipelines.



Supported commands

  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

@nazariig could you please help review following PR update?
@anish-n should you assign someone to review from the team?

mg_facts = duthost.get_extended_minigraph_facts(tbinfo)
for intf, index in mg_facts['minigraph_ptf_indices'].items():
if index in vlan_ptf_ports:
test_intfs.append(intf)
Copy link
Contributor

@anish-n anish-n Oct 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we may need validation to check if this works with other interface types like portchannels, Ethernet interface for comprehensive test coverage

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is dedicated to t0 topology.
I'm using here the ports which are src_ports in ptf test (vlan_ptf_ports).

To use other interface types, need to update the test to t1-lag topology(as an example).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No not necessary, you can take ports out of the vlan and configure them in a static portchannel or Ethernet interface and use that as the src port too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, it's a static(custom) config. Need to run the static test. This part of the code is related to dynamic config only.

Or maybe I don't quite understand what you mean.
In a dynamic test, take out some ports from vlan, create portchannel/s, add ports w/o vlan as members to portchannel/s, add these portchannel/s to pbh table?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I mean we can modify the switch config here in the dynamic test to cover the other L3 interface types like portchannel interface and validate hashing with that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand, it's mean to change the topology configurations especially for the test, and not use the base configurations
of topology with feature config only.
Also, it's not a simple change. Need time to design, implement, and testing.
I suggest creating the feature request for test extended with L3/PortChannel interfaces or/and supporting other topologies, on which the requirement will be implemented. Not block the test implementation and start to check the PBH feature in the regression.

Signed-off-by: Anton <antonh@nvidia.com>
Signed-off-by: Anton <antonh@nvidia.com>
Signed-off-by: Anton <antonh@nvidia.com>
Signed-off-by: Anton <antonh@nvidia.com>
@AntonHryshchuk
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 4078 in repo Azure/sonic-mgmt

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AntonHryshchuk
Copy link
Contributor Author

/azpw run


def config_ipv4_rules(duthost, inner_ipver):
config_vxlan_rule(duthost, " --ip-protocol {}", V4_ETHER_TYPE, "ipv4", inner_ipver)
config_nvgre_rule(duthost, " --ip-protocol {}", V4_ETHER_TYPE, "ipv4", inner_ipver)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we maybe lacking test coverage for matching on:
gre_key = h32 "/" h32 ; GRE key (32 bits)

So would suggest adding a 3rd random packet format with a gre_key match, that way we can get full test coverage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be covered in the next PR

@anish-n
Copy link
Contributor

anish-n commented Oct 21, 2021

As of now I found 2 places where we didn't have full coverage:

  1. Multiple interface types
    2.All possible match fields in pbh_rule

If you tell me any of the above are not needed for full coverage because it is covered in some way via other testing or implicit means, happy to close this. Otherwise would suggest incorporating these improvements. I won't block the PR on these comments, we can add it as a follow up PR, because this is a large change, but want to note these.

Once you close out the other open comments, happy to approve.

@liat-grozovik
Copy link
Collaborator

As of now I found 2 places where we didn't have full coverage:

  1. Multiple interface types
    2.All possible match fields in pbh_rule

If you tell me any of the above are not needed for full coverage because it is covered in some way via other testing or implicit means, happy to close this. Otherwise would suggest incorporating these improvements. I won't block the PR on these comments, we can add it as a follow up PR, because this is a large change, but want to note these.

Once you close out the other open comments, happy to approve.

@anish-n thanks for the valuable feedback on the coverage. I totally agree that the improvements are needed but no reason to block this PR. The improvements will be done by Anton on a different PR. We can discuss offline when it will be available.
If not other comments, please approve.
@AntonHryshchuk please make sure checkers are fully passing so we can merge it.

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anish-n
Copy link
Contributor

anish-n commented Oct 28, 2021

As of now I found 2 places where we didn't have full coverage:

  1. Multiple interface types
    2.All possible match fields in pbh_rule

If you tell me any of the above are not needed for full coverage because it is covered in some way via other testing or implicit means, happy to close this. Otherwise would suggest incorporating these improvements. I won't block the PR on these comments, we can add it as a follow up PR, because this is a large change, but want to note these.
Once you close out the other open comments, happy to approve.

@anish-n thanks for the valuable feedback on the coverage. I totally agree that the improvements are needed but no reason to block this PR. The improvements will be done by Anton on a different PR. We can discuss offline when it will be available. If not other comments, please approve. @AntonHryshchuk please make sure checkers are fully passing so we can merge it.

@liat-grozovik, @AntonHryshchuk awaiting closure of the other open comment, please mark resolved all incorporated comments. Will approve it then, thanks!

Signed-off-by: Anton <antonh@nvidia.com>
@AntonHryshchuk
Copy link
Contributor Author

@anish-n - the definition of OUTER_ENCAP_FORMATS updated, now it's defined only in conftest. Please review.

@liat-grozovik liat-grozovik merged commit 71cd0ca into sonic-net:master Nov 8, 2021
@AntonHryshchuk AntonHryshchuk deleted the inner_hashing_d_PBH branch December 6, 2021 11:35
AntonHryshchuk added a commit to AntonHryshchuk/sonic-mgmt that referenced this pull request Jan 4, 2022
…shing configurations (sonic-net#4078)

Extending of inner hashing test with dynamic Policy Base Hashing configurations.
Include 4 parameterized tests:
* outer_ipver - inner_ipver
* ipv4 - ipv4
* ipv6 - ipv4
* ipv6 - ipv4
* ipv6 - ipv6

- How did you verify/test it?
The test executed on different Nvidia platforms, supported the PBH feature

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

- Documentation
sonic-net/SONiC#824
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…lly (#24970)

#### Why I did it
src/sonic-swss
```
* 3c6ec95c - (HEAD -> 202511, origin/202511) [portsorch] fix crash when number of PGs returned 0 (sonic-net#4106) (29 hours ago) [mssonicbld]
* f4c0865a - [orchagent] support single ASIC VOQ Fixed-System (sonic-net#4105) (30 hours ago) [mssonicbld]
* 2a8deda1 - Change DB that DPU orchagents listens to for all orchs (sonic-net#4070) (2 days ago) [mssonicbld]
* 15e017e8 - [ssw][ha] add ACTION_COUNTER to acl table type (sonic-net#4078) (2 days ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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.

5 participants