Skip to content

[vpp] VXLAN L3 dataplane test enablement - #26220

Merged
yejianquan merged 15 commits into
sonic-net:masterfrom
aaronber0614:vpp-vxlan-enablement
Sep 17, 2026
Merged

yejianquan merged 15 commits into
sonic-net:masterfrom
aaronber0614:vpp-vxlan-enablement

Conversation

@aaronber0614

@aaronber0614 aaronber0614 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Enable the L3 VXLAN test cases on the sonic-vpp platform and make the
hash-distribution checks statistically robust on the vpp dataplane.

Part of sonic-net/sonic-buildimage#25777

This is the test layer (layer 4) of a cross-repo feature and MUST merge after
the dataplane and SAI layers are in a built sonic-vpp image, otherwise the
newly-enabled tests fail in CI. Landing order:

  1. [vpp] VXLAN L3 dataplane: inner-aware encap hash, underlay ECMP, source-independent decap (patches 0015-0017) sonic-platform-vpp#262 - VPP patches (first)
  2. [vpp] saivpp VXLAN L3 decap: source-independent decap, inner source MAC, BD teardown fix sonic-sairedis#1996 - saivpp adaptation
  3. sonic-buildimage submodule bump (auto via mssonicbld)
  4. this PR - tests (last)

Note for reviewers: the t1-lag-vpp Elastictest leg on this PR is
currently expected to fail. The PR CI builds a sonic-vpp KVM image from
master buildimage, whose platform/vpp and src/sonic-sairedis
submodules do not yet contain the dataplane (#262) and saivpp (#1996)
changes these tests exercise. Once #262 and #1996 merge and mssonicbld
advances the submodule pointers, the rebuilt image carries the VNET-decap
dataplane and this leg passes (validated locally: test_vnet_decap 4/4,
test_vxlan_multiple_tunnels 16/16 on a full image built from the paired
PRs).

Changes:

  • conditional_mark (tests_mark_conditions.yaml and
    tests_mark_conditions_sonic_vpp.yaml) plus per-test skip markers in
    test_vnet_decap.py and test_vxlan_bfd_tsa.py: remove the asic_type vpp skip
    so test_vxlan_ecmp (random_hash and entropy), test_vnet_decap, and
    test_vxlan_bfd_tsa run on sonic-vpp. Originally from
    debug vxlan vpp tests #25480 by Chenyang Wang; authorship preserved.
  • test_vxlan_ecmp.py: statistically-justified tolerance and packet-count for the
    random_hash and entropy distribution checks, paired with the VPP-side
    load-balance tolerance change so the 2-endpoint splits pass reliably rather
    than flaking at a too-tight bound.

Supersedes debug PR #25480.

Type of change

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

Back port request

  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605

Approach

What is the motivation for this PR?

The L3 VXLAN test cases were skipped on the vpp platform. With the dataplane
(patches 0015-0017) and saivpp decap support in place, enable them and make the
hash-distribution checks statistically robust so they do not flake.

How did you do it?

Removed the asic_type vpp skip conditions for the VXLAN tests and raised the
packet-count/tolerance on the random_hash and entropy distribution checks in
test_vxlan_ecmp.py.

How did you verify/test it?

Validated on a t1-lag-vpp testbed against a sonic-vpp image built from the
paired PRs: fib/test_fib.py 16/16 hashing pass; vxlan/test_vxlan_ecmp.py
random_hash and entropy pass; test_vnet_decap and test_vxlan_bfd_tsa green.

cyw233 and others added 3 commits July 15, 2026 17:33
Remove the asic_type vpp skip conditions for the VXLAN test cases
(test_vxlan_ecmp random_hash and entropy, test_vnet_decap,
test_vxlan_bfd_tsa) so they run on the sonic-vpp platform.

Originally from sonic-net#25480 by Chenyang Wang.

Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
…t-count

test_vxlan_random_hash validates a 3-way overlay ECMP distribution. The
PTF sends 3*packet_count packets and checks each next-hop is within
(1 +/- tolerance)*packet_count. Per next-hop the count is Binomial with
std/mean = sqrt(2/(3*packet_count)) = ~2.6% at packet_count=1000, so the
default 3% tolerance was only ~1.1 sigma and flaked on a healthy
dataplane (buckets:256, ~0.4% systematic skew).

Raise packet_count to 2000 and pass a per-test tolerance of 0.07
(~3.8 sigma margin) so sampling noise no longer fails the test while a
genuine >7% imbalance still does. The per-test tolerance avoids loosening
the stricter global distribution checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3446b9ac-fa7f-4d26-914b-a4f076c603aa
Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
Drop the stray executable bit on the ECMP test module; it is a plain pytest
file, not a script.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3446b9ac-fa7f-4d26-914b-a4f076c603aa
Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@github-actions

Copy link
Copy Markdown

@StormLiangMS @wangxin @yxieca A user wants to merge changes to the conditional mark files into master. Please review.

…ount

Test_VxLAN_entropy verifies inner-field (src-port/src-ip) hash entropy across
a destination with exactly two endpoints. At packet_count=1000 with
tolerance=0.03 the pass band is only ~1.34 sigma of the 2-way binomial split,
so a correct ~50/50 hash still fails intermittently (observed 942/1000 on
IPv6 combos). This is test flakiness, not a hashing defect.

Halve the relative variance by sending 2000 packets/endpoint and widen the
inner-field tolerance to 0.07 (~4.4 sigma), mirroring the already-merged
Test_VxLAN_ecmp_random_hash tolerance change. The underlying inner-aware
flow hash keeps distributing correctly; this only removes the false failures.

Validated on a t1-lag-vpp testbed: the previously flaky entropy cases
(test_vxlan_random_src_port, test_vxlan_varying_src_ip, all encap combos)
pass reliably after the change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3446b9ac-fa7f-4d26-914b-a4f076c603aa
Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
@aaronber0614
aaronber0614 force-pushed the vpp-vxlan-enablement branch from 4039ab7 to 83194a5 Compare July 16, 2026 16:19
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

Bring the VXLAN test-enablement branch up to date with sonic-net/sonic-mgmt
master and re-run the current Azure.sonic-mgmt pipeline.

Resolve the tests_mark_conditions.yaml conflict on
vxlan/test_vxlan_multiple_tunnels.py: keep master's updated platform
allow-list and skip block, and exempt sonic-vpp from the skip via
"asic_type not in ['vpp']" instead of commenting the whole entry out. This
enables the test on sonic-vpp without re-enabling it on the platforms master
just excluded.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3446b9ac-fa7f-4d26-914b-a4f076c603aa
Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@aaronber0614
aaronber0614 force-pushed the vpp-vxlan-enablement branch from 3ee289c to 1822a86 Compare July 20, 2026 22:07
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@aaronber0614
aaronber0614 marked this pull request as ready for review July 20, 2026 22:07
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Wire the two tests this PR un-skips on vpp into the t1-lag-vpp PR test
list so they actually execute in CI. Without this, the conditional_mark
un-skip for test_vxlan_multiple_tunnels.py and the bfd_tsa tolerance
branch are no-ops because neither test is in the run list.

Both are validated PASS on a full sonic-vpp image built from the paired
dataplane PRs (test_vxlan_multiple_tunnels 16/16, test_vxlan_bfd_tsa
24/24). Landing order (sonic-platform-vpp -> sonic-sairedis ->
buildimage submodule bump -> this PR) guarantees the dataplane is
present before these run in master.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3446b9ac-fa7f-4d26-914b-a4f076c603aa
Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
Copilot AI review requested due to automatic review settings July 21, 2026 22:32
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@github-actions
github-actions Bot requested a review from xwjiang-ms July 21, 2026 22:32
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@aaronber0614

Copy link
Copy Markdown
Contributor Author

Heads up on the t1-lag-vpp Elastictest failure. It is a PR ordering artifact, not a test or code bug.

This PR enables the L3 VXLAN tests on vpp (test_vxlan_multiple_tunnels.py, test_vnet_decap.py, test_vxlan_bfd_tsa.py via conditional_mark). Those tests exercise source-independent VXLAN decap and VNET transit re-encap, which is a dataplane feature that lands in two other PRs:

sonic-net/sonic-platform-vpp#262 (VPP patches 0015 and 0017)
sonic-net/sonic-sairedis#1996 (saivpp decap-any)

Co-authored with CoPilot

# Conflicts:
#	.azure-pipelines/pr_test_scripts.yaml
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Resolve conflict in
tests/common/plugins/conditional_mark/tests_mark_conditions_sonic_vpp.yaml:
master reorganized the file (added bgp/gnmi entries, dropped the Subport and
Telemetry blocks) while this PR removes the three VPP VXLAN skip stanzas
(Test_VxLAN_ecmp_random_hash, Test_VxLAN_entropy, Test_VxLAN_underlay_ecmp) to
enable those tests on asic_type vpp. Took master's version and re-applied the
three-stanza removal, so the net change to that file is exactly the PR's intent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

…ded in master image (no functional change)

Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

…ded in master image (no functional change)

Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

… functional change)

Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Feed now serves image 1221594 (sairedis d1bf5653c, includes sonic-sairedis#1996);
t1-lag-vpp runs already resolve to it. No functional change.

Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@aaronber0614

Copy link
Copy Markdown
Contributor Author

/azp run Azure.sonic-mgmt

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@yejianquan yejianquan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@yejianquan
yejianquan disabled auto-merge September 17, 2026 08:04
@yejianquan
yejianquan merged commit fb3af5d into sonic-net:master Sep 17, 2026
28 of 30 checks passed
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.

6 participants