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

Everflow T2 topo support and ipv6 egress tests #6225

Merged
merged 2 commits into from
Oct 12, 2022

Conversation

tcusto
Copy link
Contributor

@tcusto tcusto commented Aug 25, 2022

Description of PR

This change adds support for running everflow on T2 chassis with multiple line cards.

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012

Approach

What is the motivation for this PR?

Run everflow tests on T2 topology with chassis architecture. Also added Egress ACL/Egress mirroring tests to ipv6 test script, which were missing before.

How did you do it?

  • Created new function, gen_t2_setup_information and helper functions to find the T1 and T3 facing linecards in a chassis, and select the ports on them.
  • Updated the configuration code to put the configuration on the frontend linecards in a chassis. Also, for multiasic egress ACL, to configure the egress tables in the namespaces as well.
  • Made the namespace lookup dynamic, since different namespaces could be used on a card for a direction, as opposed to multiasic T1 topology where all upstream ports were on 1 namespace and downstream on another.
  • Modified the traffic test routines to handle different MAC addresses for packet ingress to the DUT vs egress, since the test would use multiple linecards.
  • Split up the duthost under test for T2, so that one duthost has the active everflow session, and the other is used to add the egress route for the everflow destination. The route is then shared via the intercard BGP to remote cards to activate the everflow session. Traffic flow is generally into a linecard which has everflow session active, hitting the ingress/egress ACL on that linecard, going through the recycle port, then being sent to a remote card for egress.
  • Added egress test case class to IPv6 test script, similar to structure of IPv4 script.
  • Added test case for port flap of everflow session destination. (this was a software issue that needed to be fixed)
  • Added test case for mirror destination route delete and recreate. (also a s/w issue that was fixed.)
  • Added test case to verify mirror session output when using local or remote ports as mirror session destination.

How did you verify/test it?

Ran against chassis with T2 min and full T2 topology.

test_verflow_ipv6.py:
=========================== short test summary info ============================
================== 40 passed, 106 warnings in 284.10 seconds ===================

test_everflow_testbed.py:
=========================== short test summary info ============================
SKIPPED [16] /data/tests/everflow/everflow_test_utilities.py:754: ingress ACL w/ egress Mirroring not supported, skipping
SKIPPED [4] /data/tests/everflow/test_everflow_testbed.py:404: Mirror port is always recycle port in T2, so the mirror port can't be controlled as in this test case.
SKIPPED [4] /data/tests/everflow/everflow_test_utilities.py:671: Skipping test since mirror policing is not supported on broadcom dnx platforms
SKIPPED [16] /data/tests/everflow/everflow_test_utilities.py:754: egress ACL w/ ingress Mirroring not supported, skipping
=========== 24 passed, 40 skipped, 1586 warnings in 2678.66 seconds ============

Any platform specific information?

I have only verified T2 multiasic cards.

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

T2.

Documentation

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 25, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: tcusto / name: Tom Custodio (858eed3)

@lgtm-com
Copy link

lgtm-com bot commented Aug 25, 2022

This pull request fixes 1 alert when merging 39d221c into 8f5c6b6 - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Aug 29, 2022

This pull request fixes 1 alert when merging 747dce9 into 4c8a35b - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@judyjoseph
Copy link
Contributor

@tcusto please resolve the conflicts.

@lgtm-com
Copy link

lgtm-com bot commented Sep 9, 2022

This pull request fixes 1 alert when merging 44084bd into c4e4498 - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Sep 13, 2022

This pull request introduces 4 alerts and fixes 1 when merging 5d76a42 into a5490f6 - view on LGTM.com

new alerts:

  • 4 for Variable defined multiple times

fixed alerts:

  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Sep 21, 2022

This pull request introduces 4 alerts and fixes 1 when merging 858eed3 into 9074e57 - view on LGTM.com

new alerts:

  • 4 for Variable defined multiple times

fixed alerts:

  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Sep 21, 2022

This pull request fixes 1 alert when merging fbb8674 into 9074e57 - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@judyjoseph
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@judyjoseph
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@judyjoseph
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@judyjoseph
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@judyjoseph
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).


logging.info("Expected inner packet: %s", mirror_packet.summary())
pytest_assert(inner_packet.pkt_match(mirror_packet), "Mirror payload does not match received packet")
else:
testutils.verify_no_packet_any(ptfadapter, expected_mirror_packet, dest_ports)

@staticmethod
def get_expected_mirror_packet(mirror_session, setup, duthost, mirror_packet, check_ttl):
def get_expected_mirror_packet(mirror_session, setup, duthost, mirror_packet, check_ttl, router_mac=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this additional argument router_mac ? As I see the original parameter is also set from the setup as following gre_pkt_src_mac = setup['router_mac']

Copy link
Contributor

@judyjoseph judyjoseph left a comment

Choose a reason for hiding this comment

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

LGTM, it would be great if we raise PR per testcase as the changes are huge.

@judyjoseph judyjoseph merged commit c3f0980 into sonic-net:master Oct 12, 2022
wangxin pushed a commit that referenced this pull request Oct 14, 2022
* Everflow T2 topo support and ipv6 egress tests
@StormLiangMS StormLiangMS mentioned this pull request Oct 18, 2022
6 tasks
StormLiangMS added a commit that referenced this pull request Oct 19, 2022
What is the motivation for this PR?
This PR #6225 introduced one issue for T0/T1. The pytest will be crashed when running everflow test.

The reason is because the implementation of one fixture, setup_recycle_port, which include the yield but not run into the yield for non t2 case, which will hit one known issue of pytest, which is fixed in newer version of pytest but not in what we are using now.
pytest-dev/pytest#7061

How did you do it?
Change the condition to make sure the yield would be executed

How did you verify/test it?
Run everflow test.

Any platform specific information?
Supported testbed topology if it's a new test case?
wangxin pushed a commit that referenced this pull request Oct 21, 2022
What is the motivation for this PR?
This PR #6225 introduced one issue for T0/T1. The pytest will be crashed when running everflow test.

The reason is because the implementation of one fixture, setup_recycle_port, which include the yield but not run into the yield for non t2 case, which will hit one known issue of pytest, which is fixed in newer version of pytest but not in what we are using now.
pytest-dev/pytest#7061

How did you do it?
Change the condition to make sure the yield would be executed

How did you verify/test it?
Run everflow test.

Any platform specific information?
Supported testbed topology if it's a new test case?
yxieca added a commit that referenced this pull request Oct 25, 2022
What is the motivation for this PR?
everflow test is failing after PR #6225.

How did you do it?
Topology type are more than t2/t0/t1. !(t2) doesn't mean either T0 or T1. This PR fixes the branch error.

How did you verify/test it?
Run everflow test on test that is not T0/T1/T2.

Signed-off-by: Ying Xie ying.xie@microsoft.com
yxieca added a commit that referenced this pull request Oct 25, 2022
What is the motivation for this PR?
everflow test is failing after PR #6225.

How did you do it?
Topology type are more than t2/t0/t1. !(t2) doesn't mean either T0 or T1. This PR fixes the branch error.

How did you verify/test it?
Run everflow test on test that is not T0/T1/T2.

Signed-off-by: Ying Xie ying.xie@microsoft.com
StormLiangMS added a commit to StormLiangMS/sonic-mgmt that referenced this pull request Oct 26, 2022
@StormLiangMS StormLiangMS mentioned this pull request Oct 26, 2022
6 tasks
yxieca pushed a commit that referenced this pull request Oct 26, 2022
* Revert "[everflow] address testbed setup type checking issue (#6609)"

This reverts commit b55fe7f.

* Revert "everflow test case fix (#6561)"

This reverts commit b497aa0.

* Revert "Everflow T2 topo support and ipv6 egress tests (#6225)"

This reverts commit c3f0980.
yxieca pushed a commit that referenced this pull request Oct 26, 2022
* Revert "[everflow] address testbed setup type checking issue (#6609)"

This reverts commit b55fe7f.

* Revert "everflow test case fix (#6561)"

This reverts commit b497aa0.

* Revert "Everflow T2 topo support and ipv6 egress tests (#6225)"

This reverts commit c3f0980.
allen-xf pushed a commit to allen-xf/sonic-mgmt that referenced this pull request Oct 28, 2022
* Everflow T2 topo support and ipv6 egress tests
allen-xf pushed a commit to allen-xf/sonic-mgmt that referenced this pull request Oct 28, 2022
What is the motivation for this PR?
This PR sonic-net#6225 introduced one issue for T0/T1. The pytest will be crashed when running everflow test.

The reason is because the implementation of one fixture, setup_recycle_port, which include the yield but not run into the yield for non t2 case, which will hit one known issue of pytest, which is fixed in newer version of pytest but not in what we are using now.
pytest-dev/pytest#7061

How did you do it?
Change the condition to make sure the yield would be executed

How did you verify/test it?
Run everflow test.

Any platform specific information?
Supported testbed topology if it's a new test case?
allen-xf pushed a commit to allen-xf/sonic-mgmt that referenced this pull request Oct 28, 2022
What is the motivation for this PR?
everflow test is failing after PR sonic-net#6225.

How did you do it?
Topology type are more than t2/t0/t1. !(t2) doesn't mean either T0 or T1. This PR fixes the branch error.

How did you verify/test it?
Run everflow test on test that is not T0/T1/T2.

Signed-off-by: Ying Xie ying.xie@microsoft.com
allen-xf pushed a commit to allen-xf/sonic-mgmt that referenced this pull request Oct 28, 2022
* Revert "[everflow] address testbed setup type checking issue (sonic-net#6609)"

This reverts commit b55fe7f.

* Revert "everflow test case fix (sonic-net#6561)"

This reverts commit b497aa0.

* Revert "Everflow T2 topo support and ipv6 egress tests (sonic-net#6225)"

This reverts commit c3f0980.
judyjoseph added a commit to judyjoseph/sonic-mgmt that referenced this pull request Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants