Skip to content

Conversation

@mramezani95
Copy link
Contributor

@mramezani95 mramezani95 commented Oct 31, 2025

Description of PR

Summary:
Microsoft ADO ID: 35743773
This PR adds a new test to ensure that the TTL decap mode is set to pipe model for VxLAN tunnels. This means that when a T0 switch that is a VNet endpoint receives a VxLAN packet and decapsulates it, the TTL of the egress packet that is forwarded by the switch is set to the TTL of the inner ingress packet minus 1.

Type of change

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

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

What is the motivation for this PR?

On some platforms, the TTL decap mode is set to the uniform model by default, which means that the TTL of the egress packet is set to the TTL of the outer ingress packet minus 1. There is a PR to fix the default behavior on SWSS: 3963
This PR checks that the TTL decap mode is pipe model.

How did you do it?

We setup the T0 switch as a VNet endpoint and then send a VxLAN packet to it. The switch is supposed to decapsulate the ingress packet and then route the inner packet. We check that the TTL of the forwarded inner packet is modified as expected.

How did you verify/test it?

I ran the test on a device that used uniform model. Once with the fix in 3963 and once without it. The image version on the device was 202505.
Without the fix:

vxlan/test_vxlan_decap_ttl.py::test_vxlan_decap_ttl[v4-v4] FAILED     [ 25%]
vxlan/test_vxlan_decap_ttl.py::test_vxlan_decap_ttl[v6-v4] FAILED     [ 50%]
vxlan/test_vxlan_decap_ttl.py::test_vxlan_decap_ttl[v6-v6] FAILED     [ 75%]
vxlan/test_vxlan_decap_ttl.py::test_vxlan_decap_ttl[v4-v6] FAILED     [100%]

With the fix:

vxlan/test_vxlan_decap_ttl.py::test_vxlan_decap_ttl[v4-v4] PASSED     [ 25%]
vxlan/test_vxlan_decap_ttl.py::test_vxlan_decap_ttl[v6-v4] PASSED     [ 50%]
vxlan/test_vxlan_decap_ttl.py::test_vxlan_decap_ttl[v6-v6] PASSED     [ 75%]
vxlan/test_vxlan_decap_ttl.py::test_vxlan_decap_ttl[v4-v6] PASSED     [100%]

Any platform specific information?

Currently, this test runs only on certain Cisco switches. More platforms will be added once the fix in sonic-swss is merged.

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

T0 and its variations.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mramezani95
Copy link
Contributor Author

@prsunny Please review this PR. Thank you.

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.

2 participants