[packet_trimming] Enable packet-trimming PTF coverage on the vpp platform - #26743
[packet_trimming] Enable packet-trimming PTF coverage on the vpp platform#26743aaronber0614 wants to merge 2 commits into
Conversation
…icient
- packet_trimming_helper.py: create queue{1,3}_{uplink,downlink}_lossy_profile
BUFFER_PROFILEs when absent (they ship only in real SN5640/7060X6 QoS
templates), so block-queue setup works on the VPP Force10-S6000 config; add
delete_buffer_queue_for_trim_queue to remove test-created BUFFER_QUEUE
trim-queue references.
- conftest.py: call delete_buffer_queue_for_trim_queue in teardown before
deleting trim_queue_test_profile, so `config load` (a merge) does not leave a
dangling BUFFER_QUEUE -> BUFFER_PROFILE leafref that fails post-test YANG
validation on platforms whose base config lacks the trim queue (VPP).
- tests_mark_conditions.yaml: exempt asic_type == 'vpp' from the hwsku skip and
add asic_type in ['vpp'] skips for the deferred asymmetric module and
symmetric cases (ACL, SRv6, counters x2, mirror, reload/reboot, stability and
port-admin toggles), so only the three in-scope symmetric cases run on VPP.
Validated on vms-kvm-vpp-t1-lag: the three in-scope cases pass with zero
setup/teardown errors and no manual redis-cli.
Tracking: sonic-net/sonic-buildimage#25789
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
…ardown Address code-review gaps M3 and M4 in the packet-trimming suite: - M3 (conditional_mark): add file-level "asic_type in ['vpp']" skips for test_packet_trimming_config_asymmetric.py and test_packet_trimming_config_symmetric.py so the config variants are skipped on sonic-vpp the same way the folder-level rule already skips the rest of the suite. A longer file-level key whose condition is false does not shadow the shorter folder-level rule, so non-VPP platforms are unaffected. - M4 (teardown cleanup): setup_trimming now records the blocking-queue BUFFER_QUEUE bindings it adds and the buffer profiles it creates on demand, and teardown removes the bindings unconditionally and deletes only the profiles it created. config load merges rather than replaces, so without this the added keys dangled on platforms (e.g. the VPP vs on the shared Force10-S6000 hwsku) whose base config lacks them. set_buffer_profile_for_block_queue / ensure_block_queue_buffer_profile now return whether they created the profile to drive this. Validated on the dev-VM: conditional_mark decisions correct across four platform scenarios (no shadowing regression); teardown leaves no leftover trim/block profiles or BUFFER_QUEUE bindings. Tracking: sonic-net/sonic-buildimage#25789 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Aaron Bernardino <aaronber@microsoft.com>
|
/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). |
|
@StormLiangMS @wangxin @yxieca A user wants to merge changes to the conditional mark files into |
|
Companion PRs (SONiC-VPP packet trimming, tracked in sonic-net/sonic-buildimage#25789):
Suggested review/merge order: HLD → sonic-platform-vpp → sonic-sairedis → sonic-mgmt. |
There was a problem hiding this comment.
Pull request overview
Enable the existing packet_trimming PTF test suite to run on the SONiC-VPP platform by making buffer/queue setup and teardown resilient to minimal VPP buffer configs, and by conditionally skipping VPP-deferred cases so supported stages can run cleanly.
Changes:
- Add on-demand creation and explicit teardown of missing blocking-queue buffer profiles and
BUFFER_QUEUEkeys to keep CONFIG_DB YANG-valid (notably on VPP minimal configs). - Add explicit teardown cleanup for trimming-queue
BUFFER_QUEUEkeys to avoid danglingBUFFER_QUEUE -> BUFFER_PROFILEleafrefs afterconfig load. - Update conditional marks to allow packet_trimming on
asic_type == 'vpp'while skipping deferred VPP cases.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/packet_trimming/packet_trimming_helper.py | Adds helpers to create missing blocking-queue buffer profiles and delete BUFFER_QUEUE/BUFFER_PROFILE keys during teardown; adds trim-queue BUFFER_QUEUE deletion helper. |
| tests/packet_trimming/conftest.py | Tracks and tears down buffer profiles/bindings created by the fixture to keep VPP CONFIG_DB clean after tests. |
| tests/common/plugins/conditional_mark/tests_mark_conditions.yaml | Adjusts skip gating to permit VPP runs and adds per-test skips for VPP-deferred scenarios. |
Suppressed comments (1)
tests/common/plugins/conditional_mark/tests_mark_conditions.yaml:3997
- Spelling: “persistance” should be “persistence” in the skip reason.
reason: "TH5 clears trim counters when packet trimming is turned off, skipping until trim counter persistance is supported. Trim counters are also deferred on sonic-vpp (tracking sonic-net/sonic-buildimage#25789)."
| packet_trimming: | ||
| skip: | ||
| reason: "Packet trimming is not supported on 202505. Packet trimming cases require PR https://github.com/sonic-net/sonic-buildimage/pull/22869, but KVM does not support it, so skip trimming case on KVM. Packet-trimming tests are only supported on certain Mellanox SN5640 and Arista 7060X6 SKUs." | ||
| reason: "Packet trimming is not supported on 202505. Packet trimming cases require PR https://github.com/sonic-net/sonic-buildimage/pull/22869, but KVM does not support it, so skip trimming case on KVM. Packet-trimming tests are only supported on certain Mellanox SN5640 and Arista 7060X6 SKUs. On sonic-vpp (asic_type 'vpp') the symmetric core trimming cases are enabled; deferred cases are skipped per-test (tracking sonic-net/sonic-buildimage#25789)." |
| pool = TRIM_QUEUE_PROFILE_CONFIG["pool"] | ||
| fields = f"pool {pool} size 1518 dynamic_th {DYNAMIC_TH}" | ||
| duthost.shell(f"redis-cli -n 4 hset 'BUFFER_PROFILE|{block_queue_profile}' {fields}") |
What / Why
Enables the existing
packet_trimmingtest suite on the VPP platform andextends the shared helper/fixtures for the SONiC-VPP datapath.
Part of the SONiC packet-trimming enablement tracked in
sonic-net/sonic-buildimage#25789.
Changes
tests/packet_trimming/packet_trimming_helper.pyandconftest.py:platform-aware helper/fixture support for the VPP admission datapath.
ansible/.../conditional_mark/tests_mark_conditions.yaml: mark the casesnot yet supported on VPP (deferred trim features) as skipped so the supported
stages run cleanly.
Testing
t1-lag-vpptestbed; deferred casesremain skipped via conditional marks.
🤖 Co-authored with GitHub Copilot.