Skip to content

Support range-based QUEUE config keys in qos_sai_base.py.#24656

Open
bchovva wants to merge 1 commit into
sonic-net:masterfrom
bchovva:qos-queue-change-marvell
Open

Support range-based QUEUE config keys in qos_sai_base.py.#24656
bchovva wants to merge 1 commit into
sonic-net:masterfrom
bchovva:qos-queue-change-marvell

Conversation

@bchovva
Copy link
Copy Markdown

@bchovva bchovva commented May 15, 2026

Description of PR

Add a helper to resolve CONFIG_DB queue keys that may be stored either as single-queue entries or as queue ranges in tests/qos/qos_sai_base.py.

Summary:
Fixes # (issue)

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?

The existing QosSaiBase code hard-codes the CONFIG_DB queue key format as QUEUE|| (e.g., QUEUE|Ethernet0|3). This breaks when the CONFIG_DB uses range-based queue keys (e.g., QUEUE|Ethernet0|0-2), causing QoS SAI tests to fail on platforms that store queue configurations using ranges.

How did you do it?

Added a new helper method _get_queue_config_key(dut_asic, port, queue) to the QosSaiBase class in tests/qos/qos_sai_base.py that:

Queries all QUEUE||* keys from CONFIG_DB
Supports legacy per-queue keys (e.g., QUEUE|Ethernet0|3)
Supports range-based keys (e.g., QUEUE|Ethernet0|0-2) by checking if the queue index falls within the range
Returns the matching key, or None (with an assert) if no matching key is found
The existing code that fetches the scheduler field was updated to call this helper before the Redis lookup, replacing the hard-coded key format.

How did you verify/test it?

Validated the changes in tests with t0 topology
Ran the testcase qos/test_qos_sai.py::TestQosSai::testQosSaiDwrrWeightChange
Confirmed no regressions in existing functionality

Any platform specific information?

NA

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

NA

Documentation

Add a helper to resolve CONFIG_DB queue keys that may be stored either as
single-queue entries or as queue ranges.

Signed-off-by: Bhavana Chovva <bchovva@marvell.com>
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 15, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: bchovva / name: Bhavana Chovva (ab23cd7)

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld added Request for 202505 branch Request for 202511 branch Request to backport a change to 202511 branch labels May 15, 2026
@mssonicbld
Copy link
Copy Markdown
Collaborator

This PR has backport request for branch(es): 202505,202511.
Added label(s) for branch(es) 202505,202511.

---Powered by SONiC BuildBot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Request for 202505 branch Request for 202511 branch Request to backport a change to 202511 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants