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

[SRv6] Add SRv6 control plane test case #16516

Merged
merged 7 commits into from
Jan 21, 2025
Merged

Conversation

BYGX-wcr
Copy link
Contributor

Description of PR

Summary: Add a control plane test case to verify that SRv6 static SIDs gets programmed correctly from CONFIG_DB to APPL_DB.
Fixes # (issue)

Type of change

  • Bug fix
  • [] Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202412

Approach

What is the motivation for this PR?

Verify the functionality of SRv6 in Control Plane

How did you do it?

Add two test cases to test the configuration of uN and uDT46 SIDs.

How did you verify/test it?

Run it on VS testbed

Any platform specific information?

VS by now

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

T0 only by now

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BYGX-wcr BYGX-wcr requested a review from Yakiv-Huryk January 14, 2025 23:07
duthost.command("sonic-db-cli CONFIG_DB HSET SRV6_MY_SIDS\\|loc1\\|fcbb:bbbb:1:1:: action uN")
time.sleep(WAIT_TIME)

frr_config = duthost.command("vtysh -c \"show running-config\"")["stdout"]
Copy link
Contributor

Choose a reason for hiding this comment

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

let's make this test case multi-asic aware for future proof.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated


# add Vrf1 config
duthost.command("config vrf add Vrf1")
duthost.command("sysctl -w net.vrf.strict_mode=1")
Copy link
Contributor

Choose a reason for hiding this comment

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

for sonic testing do we need this >

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, without this setting. uDT46 SID will not get programmed into kernel and APPL_DB

Copy link

Choose a reason for hiding this comment

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

Yes, this is needed.
‑ By default, FRR tries to install all routes in the Linux kernel before installing in SONiC
‑ In order to have the SID programmed into SONiC APPL DB, they must be successfully programmed in the Linux Kernel first

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ahsalam
Copy link

ahsalam commented Jan 20, 2025

The changes in this PR (sonic-net/sonic-buildimage#21467) are required here.

import pytest

pytestmark = [
pytest.mark.topology('t0')
Copy link
Contributor

Choose a reason for hiding this comment

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

let's add t1 also

Copy link
Contributor

Choose a reason for hiding this comment

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

also i think we need to add vs also

abdosi
abdosi previously approved these changes Jan 21, 2025
Copy link
Contributor

@abdosi abdosi left a comment

Choose a reason for hiding this comment

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

Just change the marker to include t1 also

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BYGX-wcr
Copy link
Contributor Author

Just change the marker to include t1 also

updated

@abdosi abdosi merged commit d9d3854 into sonic-net:master Jan 21, 2025
16 checks passed
wangxin pushed a commit that referenced this pull request Jan 22, 2025
What is the motivation for this PR?
Script srv6/test_srv6_static_config.py was added in PR #16516, and it fails to run on kvm testbed. We temporarily skip this test in PR testing using conditional mark.

How did you do it?
We temporarily skip this test in PR testing using conditional mark.

How did you verify/test it?
Test by pipeline itself to see if this script can be skipped on kvm testbed.
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.

5 participants