[vpp] VXLAN L3 dataplane test enablement - #26220
Conversation
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>
|
/azp run |
|
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. |
|
@StormLiangMS @wangxin @yxieca A user wants to merge changes to the conditional mark files into |
…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>
4039ab7 to
83194a5
Compare
|
/azp run |
|
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>
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
3ee289c to
1822a86
Compare
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
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>
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Enables L3 VXLAN dataplane test coverage on the SONiC-VPP platform and reduces flakiness in VXLAN ECMP distribution assertions by increasing sample size and loosening tolerance bounds.
Changes:
- Enable VXLAN tests on
asic_type=vppby relaxing conditional-mark skips and platform guards. - Make VXLAN ECMP random-hash / entropy distribution checks statistically more robust (higher packet count, higher tolerance).
- Add newly-enabled VXLAN tests to the
t1-lag-vppPR pipeline leg.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/vxlan/test_vxlan_ecmp.py | Increase packet_count and tolerance for random-hash and entropy checks to reduce distribution-test flakiness. |
| tests/vxlan/test_vxlan_bfd_tsa.py | Allow VPP asic type to use the standard tolerance path (enables test execution on VPP). |
| tests/vxlan/test_vnet_decap.py | Allow VPP asic type past the ASIC gating so VNET decap tests can run on VPP. |
| tests/common/plugins/conditional_mark/tests_mark_conditions.yaml | Adjust skip condition so test_vxlan_multiple_tunnels can run on VPP even when platform isn’t in the allowlist. |
| tests/common/plugins/conditional_mark/tests_mark_conditions_sonic_vpp.yaml | Remove the VPP-specific conditional-mark skips for VXLAN ECMP/entropy/underlay-ECMP tests (now enabled on VPP). |
| .azure-pipelines/pr_test_scripts.yaml | Add VXLAN multiple-tunnels and BFD TSA tests to the t1-lag-vpp PR test list. |
…p stanzas - test_vnet_decap.py: the skip message still said the test only runs on Cisco-8000 and Mellanox, but it now also runs on vpp. Update the text so it matches the gating condition. - tests_mark_conditions_sonic_vpp.yaml: delete the VXLAN skip stanzas that were disabled by commenting them out. Leaving commented YAML as dead configuration makes it unclear what is active; the tests they gated now run on vpp, so remove the stanzas entirely. 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>
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
tests/vxlan/test_vxlan_ecmp.py:1505
- The new statistical rationale comment has an incorrect std/mean formula for per-nexthop counts in an N-way ECMP split. For a multinomial with p=1/N, std/mean = sqrt((N-1)/packet_count) (N cancels), not sqrt((N-1)/(N*packet_count)). This also makes the stated sigma margins incorrect and could mislead future tuning of packet_count/tolerance.
# Overlay ECMP distribution over N nexthops is multinomial: each
# nexthop's received count has std/mean = sqrt((N-1)/(N*packet_count)).
# With N=3 and packet_count=1000 that is ~2.6%, so the default 3%
# tolerance is only ~1.1 sigma and this check flakes on a perfectly
# healthy dataplane. Send more packets (better resolution) and use a
.azure-pipelines/pr_test_scripts.yaml:734
- The t1-lag-vpp test list contains duplicate entries (vnet_bgp_route_precedence and vxlan_route_advertisement), which can cause the same tests to run twice and unnecessarily extend CI runtime. Since this list is being edited, please deduplicate it.
- vxlan/test_vnet_bgp_route_precedence.py
- vxlan/test_vxlan_multi_tunnel.py
- vxlan/test_vxlan_route_advertisement.py
- vxlan/test_vxlan_multiple_tunnels.py
- vxlan/test_vxlan_bfd_tsa.py
|
Reviewed together with sonic-platform-vpp#262 and sonic-sairedis#1996. The enablement side looks good, and un-skipping The statistics check outI worked through the justification in the A quick Monte-Carlo over the actual pass condition (test fails if any nexthop falls outside the band), assuming idealised per-packet hashing:
So this isn't papering over a marginal check — the old parameters were genuinely unusable for any hash that behaves randomly, and 7% still catches a real >7% imbalance. Worth noting this interacts with patch 0016 in #262: at the default VPP multipath tolerance a 3-way group quantizes to 16 buckets (~6% inherent skew), so on VPP the old 3% assertion could not have passed regardless of packet count. Suggestion: scope the relaxation to VPPThe tolerance and
MinorThe two Copilot comments above (the The failing |
Reviewer feedback on sonic-net#26220: the tolerance (0.03 -> 0.07) and packet_count (1000 -> 2000) changes on the random-hash and entropy distribution checks were unconditional, so they also loosened the assertion and doubled the runtime for cisco-8000, mellanox, vs and marvell-teralynx, which pass at the tighter 3% / 1000. Only VPP needs the relaxation: its underlay ECMP uses a coarse 16-bucket multipath split (sonic-platform-vpp patch 0016) giving ~6% inherent distribution skew, which combined with the multinomial variance of these checks cannot pass the 3% assertion. Add dedicated per-asic keys ecmp_hash_tolerance / ecmp_hash_packet_count in setUp (0.07/2000 for vpp, 0.03/1000 otherwise) and read them at the call sites, leaving the other platforms' sensitivity and runtime untouched. Signed-off-by: Aaron Bernardino <aaronber@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3446b9ac-fa7f-4d26-914b-a4f076c603aa
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Thanks @yejianquan. Pushed Scope to VPP. You're right that the tolerance (0.03 → 0.07) and if asic_type == "vpp":
data['ecmp_hash_tolerance'] = 0.07
data['ecmp_hash_packet_count'] = 2000
else:
data['ecmp_hash_tolerance'] = 0.03
data['ecmp_hash_packet_count'] = 1000and read them at the random-hash and entropy call sites. I used dedicated keys rather than overloading Copilot comments. Resolved both — the t1-lag-vpp leg. Confirmed — expected red until #262 and sonic-sairedis#1996 land and the submodules advance; not a real regression. Co-authored by CoPilot |
|
Thanks — I checked if asic_type == "vpp":
data['ecmp_hash_tolerance'] = 0.07
data['ecmp_hash_packet_count'] = 2000
else:
data['ecmp_hash_tolerance'] = 0.03
data['ecmp_hash_packet_count'] = 1000Introducing dedicated No further comments from me on this PR. The remaining One cross-PR note so it isn't lost in the merge sequencing: I've flagged what I believe is a real gap in sonic-sairedis#1996 (the map-entry-granularity early return in |
…path sonic-platform-vpp is dropping patch 0016, so the VPP underlay keeps the default multipath_next_hop_error_tolerance of 0.1. A 3-way overlay ECMP group then lands on a 16-bucket 6/5/5 load-balance split, so the busiest next-hop deterministically receives 6/16 * 3 = 1.125x its ideal share (~12.5% skew) before any hash noise, independent of packet count. Give the random-hash check (tc11) its own ecmp_random_hash_tolerance of 0.20 (vpp) to clear that structural skew with ~4 sigma of headroom while still catching a grossly broken hash. The 2-way entropy groups are a power of 2 and split evenly, so they keep the tight 0.07 tolerance. Non-VPP ASICs are unchanged at 0.03 / 1000 packets. Validated on the t1-lag-vpp testbed: Test_VxLAN_ecmp_random_hash and Test_VxLAN_entropy pass 20/20 across all four encap types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3446b9ac-fa7f-4d26-914b-a4f076c603aa
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
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:
Changes:
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.
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
Back port request
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.