Skip to content

[cherry-pick 202511] test_qos_sai update for Cisco G200 (#20844)#23970

Open
wsycqyz wants to merge 1 commit into202511from
cherry/202511/20844
Open

[cherry-pick 202511] test_qos_sai update for Cisco G200 (#20844)#23970
wsycqyz wants to merge 1 commit into202511from
cherry/202511/20844

Conversation

@wsycqyz
Copy link
Copy Markdown
Contributor

@wsycqyz wsycqyz commented Apr 16, 2026

Description of PR

Summary:
Manual cherry-pick of #20844 to 202511 branch (auto cherry-pick had conflicts).

Fixed test_qos_sai failures for Cisco G200.

Original PR: #20844
202505 PR: #21162

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
  • 202511

Approach

What is the motivation for this PR?

Cherry-pick of #20844 to 202511 branch. The auto cherry-pick failed due to a conflict in tests_mark_conditions.yaml where the 202511 branch has additional t2_single_node_max/min topology entries not present in the original PR's base.

How did you do it?

Manual cherry-pick with conflict resolution. The conflict was in the testQosSaiDwrrWeightChange skip conditions — kept both the 202511-specific topology filter update and the new Cisco G200 skip condition from the original PR.

How did you verify/test it?

Verified by original PR author on Cisco 8122: test_qos_sai.py 100% passed (16 passed, 40 skipped).

Any platform specific information?

Cisco 8122 (G200).

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

Documentation

<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit
easier:
-->
<!--
- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context. Where should
reviewer start? background context?
- List any dependencies that are required for this change.
-->

Summary:
Fixes # (issue)
Fixed test_qos_sai failures for Cisco G200.
202505 PR: #21162

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

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

- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [x] 202505

To fix test_qos_sai failures for Cisco G200.

1, Drop threshold update
1) For egress lossy drop threshold, updated the formula with
egress_pool_reserved_memory and profile_reserved_memory, update lossy
drop threshold to next mantissa value - 40 buffers.
2) testQosSaiPfcXoffLimit test result flakiness, pkt num to trigger drop
is 174379~174380, not 174378, increased lossless_drop_tuning_pkts by 1.

2, testQosSaiPgSharedWatermark
1) Clear PG watermark by debug shell to workaround counterpoll issue.
2) Lossless: Increase upper bound margin to 6, added lower bound margin
3.
    3) Lossy: Increase upper bound margin to 14, lower bound margin 6.

3, testQosSaiQWatermarkAllPorts, decreased pkts_num_leak_out from 800 to
200, decrease pkt_count by 8 since lossy drop threshold is not accurate.

4, Other margin adjustments
    1) testQosSaiPfcXonLimit, Increased margin to 6.
    2) testQosSaiLossyQueue, increase pkt margin to 8.
3) testQosSaiQSharedWatermark lossless, increase pkts_num_margin to 2.
    4) testQosSaiQSharedWatermark lossy, increase pkts_num_margin to 9.
5) testQosSaiBufferPoolWatermark lossy, increase extra_cap_margin from
20 to 25.

5, Skipped DWRR cases. G200 SDK implementation changed, it doesn't
support port level api set_credit_eir_or_pir, it supports set_credit_pir
on each OQ but that is not applicable for WRR test.

6, Masked the failure of ip6tables cmd in ptf, ptf container doesn’t
have ip6tables tool installed.

The initial test result shows 6 cases passed, 12 failed, 1 error.
With this PR,  test_qos_sai.py 100% passed.

```
----------------------------------------- generated xml file: /run_logs/qos/test_qos_sai.xml ------------------------------------------
INFO:root:Can not get Allure report URL. Please check logs
------------------------------------------------------- live log sessionfinish --------------------------------------------------------
26/09/2025 17:53:15 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
======================================================= short test summary info =======================================================
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiPfcXoffLimit[single_asic-xoff_1]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiPfcXoffLimit[single_asic-xoff_2]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiPfcXonLimit[single_asic-xon_1]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiPfcXonLimit[single_asic-xon_2]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiBufferPoolWatermark[single_asic-wm_buf_pool_lossless]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiBufferPoolWatermark[single_asic-wm_buf_pool_lossy]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiLossyQueue[single_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiDscpQueueMapping[single_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiPgSharedWatermark[single_asic-wm_pg_shared_lossless]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiPgSharedWatermark[single_asic-wm_pg_shared_lossy]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiPgHeadroomWatermark[single_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiQSharedWatermark[single_asic-wm_q_shared_lossless]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiQSharedWatermark[single_asic-wm_q_shared_lossy]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiDscpToPgMapping[single_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiQWatermarkAllPorts[single_asic-wm_q_wm_all_ports]
SKIPPED [2] qos/test_qos_sai.py:420: Additional DSCPs are not supported on non-dual ToR ports
SKIPPED [4] qos/test_qos_sai.py:482: This test is only for Mellanox.
SKIPPED [2] qos/test_qos_sai.py:692: Additional DSCPs are not supported on non-dual ToR ports
SKIPPED [4] qos/test_qos_sai.py:775: Unsupported testbed type.
SKIPPED [1] qos/test_qos_sai.py:879: Headroom pool size is not enabled on this DUT
SKIPPED [2] qos/test_qos_sai.py:979: Shared reservation size test is not supported.
SKIPPED [1] qos/test_qos_sai.py:1091: Headroom pool size is not enabled on this DUT
SKIPPED [2] qos/test_qos_sai.py:1318: Unsupported testbed type.
SKIPPED [2] qos/test_qos_sai.py:1501: Skip this test since separated DSCP_TO_TC_MAP is not applied
SKIPPED [1] qos/test_qos_sai.py: Dot1p-queue mapping is only supported on backend.
SKIPPED [1] qos/test_qos_sai.py: Dot1p-PG mapping is only supported on backend.
SKIPPED [1] qos/test_qos_sai.py: Skip DWRR test on Cisco G200 platform.
SKIPPED [3] qos/test_qos_sai.py: Unsupported testbed type.
SKIPPED [2] qos/test_qos_sai.py:2047: For DSCP to PG mapping on IPinIP traffic , mellanox device has different behavior to community. For mellanox device, testQosSaiDscpToPgMapping can cover the scenarios / Unsupported testbed type.
SKIPPED [2] qos/test_qos_sai.py:2142: Skip this test since separated DSCP_TO_TC_MAP is not applied
SKIPPED [1] qos/test_qos_sai.py: Skip DWRR weight change test on Mellanox platform. / Unsupported testbed type.
SKIPPED [9] qos/test_qos_sai.py:2502: testQosSaiXonHysteresis case is only supported on cisco-8000 8102/8101/8111.
======================================= 16 passed, 40 skipped, 1 warning in 2612.96s (0:43:32) ========================================
sonic@sonic-ucs-m6-23:/data/tests$
```

Cisco 8122.

<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->

---------

Signed-off-by: Zhixin Zhu <zhixzhu@cisco.com>
@wsycqyz wsycqyz requested a review from XuChen-MSFT as a code owner April 16, 2026 02:22
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@wsycqyz
Copy link
Copy Markdown
Contributor Author

wsycqyz commented Apr 16, 2026

Cherry-pick Conflict Resolution Summary

There was only 1 conflict in the entire cherry-pick:

tests/common/plugins/conditional_mark/tests_mark_conditions.yaml

What conflicted: The testQosSaiDwrrWeightChange skip conditions list.

Side Line content
202511 branch (HEAD) "topo_name not in (constants['QOS_SAI_TOPO'] + ['t2_single_node_max', 't2_single_node_min']) and asic_type not in ['mellanox']"
PR #20844 (incoming) "topo_name not in constants['QOS_SAI_TOPO'] and asic_type not in ['mellanox']" + new line "asic_type in ['cisco-8000'] and platform.startswith('x86_64-8122_')"

Resolution: Kept the 202511 version of the existing line (with the extra t2_single_node topologies) and added the new Cisco G200 skip condition from PR #20844. Final result:

- "topo_name not in (constants['QOS_SAI_TOPO'] + ['t2_single_node_max', 't2_single_node_min']) and asic_type not in ['mellanox']"
- "asic_type in ['cisco-8000'] and platform.startswith('x86_64-8122_')"

The other 5 files (ptfhost_utils.py, qos_param_generator.py, qos_sai_base.py, test_qos_sai.py, sai_qos_tests.py) all merged cleanly with no conflicts.

Copy link
Copy Markdown
Contributor

@sonumm sonumm left a comment

Choose a reason for hiding this comment

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

The cherry-pick is a faithful port. The single conflict in tests_mark_conditions.yaml was resolved correctly — it preserves the 202511-specific t2_single_node_max/min topology entries while adding the new Cisco G200 DWRR skip. Safe to approve.

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.

5 participants