Skip to content

[snappi-T2] Update ecn helpers to use asic_value for fetching config_facts#19589

Merged
yejianquan merged 1 commit intosonic-net:masterfrom
vkjammala-arista:fix-dequeue-ecn-test
Jul 31, 2025
Merged

[snappi-T2] Update ecn helpers to use asic_value for fetching config_facts#19589
yejianquan merged 1 commit intosonic-net:masterfrom
vkjammala-arista:fix-dequeue-ecn-test

Conversation

@vkjammala-arista
Copy link
Copy Markdown
Contributor

@vkjammala-arista vkjammala-arista commented Jul 14, 2025

Description of PR

Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # #19590

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
  • msft-202405

Approach

What is the motivation for this PR?

Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?

Pass asic_value parameter to the config helper methods.

How did you verify/test it?

With the fix test is not hitting Failed to configure WRED/ECN at the DUT

Any platform specific information?

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

Documentation

…facts

Couple of ecn config helper methods are not using asic_value (which refers to
asic where underlying port belongs to, in case of multi-asic devices) to fetch
config_facts, thus causing config_facts to be fetched from
linecard namespace (instead of asic namespace) which doesn't have
qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures
with "Failed to configure WRED/ECN at the DUT".
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sdszhang
Copy link
Copy Markdown
Contributor

sdszhang commented Jul 23, 2025

@vkjammala-arista @kenneth-arista can you share the test result with 202405 image.

@vkjammala-arista
Copy link
Copy Markdown
Contributor Author

vkjammala-arista commented Jul 25, 2025

Hi @sdszhang, test_red_accuracy_with_snappi.py which was failing earlier with

    @pytest.mark.parametrize("multidut_port_info", MULTIDUT_PORT_INFO[MULTIDUT_TESTBED])
    def test_red_accuracy(request,
    ...
    ...
>       ip_pkts_list = run_ecn_test(api=snappi_api,
                                    testbed_config=testbed_config,
                                    port_config_list=port_config_list,
                                    conn_data=conn_graph_facts,
                                    fanout_data=fanout_graph_facts_multidut,
                                    dut_port=snappi_ports[0]['peer_port'],
                                    lossless_prio=lossless_prio,
                                    prio_dscp_map=prio_dscp_map,
                                    iters=num_iterations,
                                    snappi_extra_params=snappi_extra_params)
        ...
        ...
        # Configure WRED/ECN thresholds
        logger.info("Configuring WRED and ECN thresholds")
        config_result = config_wred(host_ans=egress_duthost,
                                    kmin=snappi_extra_params.ecn_params["kmin"],
                                    kmax=snappi_extra_params.ecn_params["kmax"],
                                    pmax=snappi_extra_params.ecn_params["pmax"])
>       pytest_assert(config_result is True, 'Failed to configure WRED/ECN at the DUT')
E       Failed: Failed to configure WRED/ECN at the DUT

With the fix, no failure is seen.

+---------------------------------------------------+------------------------------------------------+----------------------------------------+---------+----------------------------+----------------+---------+
| filename                                          | classname                                      | testname                               | status  | start                      | duration       | message |
+---------------------------------------------------+------------------------------------------------+----------------------------------------+---------+----------------------------+----------------+---------+
| snappi_tests/ecn/test_red_accuracy_with_snappi.py | snappi_tests.ecn.test_red_accuracy_with_snappi | test_red_accuracy[multidut_port_info0] | success | 2025-07-23 15:36:50.704090 | 0:06:15.219039 |         |
| snappi_tests/ecn/test_red_accuracy_with_snappi.py | snappi_tests.ecn.test_red_accuracy_with_snappi | test_red_accuracy[multidut_port_info1] | success | 2025-07-23 15:43:05.924698 | 0:05:03.160649 |         |
| snappi_tests/ecn/test_red_accuracy_with_snappi.py | snappi_tests.ecn.test_red_accuracy_with_snappi | test_red_accuracy[multidut_port_info2] | success | 2025-07-23 15:48:09.087462 | 0:11:06.253588 |         |
+---------------------------------------------------+------------------------------------------------+----------------------------------------+---------+----------------------------+----------------+---------+
07:01:28 snappi_api.warning                       L1426 WARNING| Capture was not stopped for this port Port 0
PASSED                                                                                             [ 33%]
snappi_tests/ecn/test_red_accuracy_with_snappi.py::test_red_accuracy[multidut_port_info1]
--------------------------------------------- live log call ----------------------------------------------
07:06:26 snappi_api.warning                       L1426 WARNING| Capture was not stopped for this port Port 0
PASSED                                                                                             [ 66%]
snappi_tests/ecn/test_red_accuracy_with_snappi.py::test_red_accuracy[multidut_port_info2]
--------------------------------------------- live log call ----------------------------------------------
07:11:24 snappi_api.warning                       L1426 WARNING| Capture was not stopped for this port Port 0
PASSED                                                                                             [100%]                                                                                                             ------------------------------------------- live log teardown --------------------------------------------```

@sdszhang sdszhang moved this from In Progress to To be Merged in SONiC Snappi Jul 30, 2025
Copy link
Copy Markdown
Contributor

@sdszhang sdszhang left a comment

Choose a reason for hiding this comment

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

lgtm

@yejianquan yejianquan merged commit 9ee5f7c into sonic-net:master Jul 31, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from To be Merged to Done in SONiC Snappi Jul 31, 2025
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jul 31, 2025
…facts (sonic-net#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # sonic-net#19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202505: #19951

mssonicbld pushed a commit that referenced this pull request Jul 31, 2025
…facts (#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # #19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com
nissampa pushed a commit to nissampa/sonic-mgmt_dpu_test that referenced this pull request Aug 7, 2025
…facts (sonic-net#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # sonic-net#19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com
ashutosh-agrawal pushed a commit to ashutosh-agrawal/sonic-mgmt that referenced this pull request Aug 14, 2025
…facts (sonic-net#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # sonic-net#19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to msft-202405: Azure/sonic-mgmt.msft#680

vidyac86 pushed a commit to vidyac86/sonic-mgmt that referenced this pull request Oct 23, 2025
…facts (sonic-net#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # sonic-net#19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
…facts (sonic-net#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # sonic-net#19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com

Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 16, 2025
…facts (sonic-net#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # sonic-net#19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
…facts (sonic-net#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # sonic-net#19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Aharon Malkin <amalkin@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
…facts (sonic-net#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # sonic-net#19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
…facts (sonic-net#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # sonic-net#19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
…facts (sonic-net#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # sonic-net#19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
…facts (sonic-net#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # sonic-net#19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Yael Tzur <ytzur@nvidia.com>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Mar 27, 2026
…facts (sonic-net#19589)

Description of PR
Summary: [snappi-T2] Update ecn helpers to use asic_value for fetching config_facts
Fixes # sonic-net#19590

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
 msft-202405
Approach
What is the motivation for this PR?
Couple of ecn config helper methods are not using asic_value (which refers to asic where underlying port belongs to, in case of multi-asic devices) to fetch config_facts, thus causing config_facts to be fetched from linecard namespace (instead of asic namespace) which doesn't have qos config (WRED_PROFILE, BUFFER_PROFILE etc) and causing test failures with Failed to configure WRED/ECN at the DUT.

How did you do it?
Pass asic_value parameter to the config helper methods.

How did you verify/test it?
With the fix test is not hitting Failed to configure WRED/ECN at the DUT

signed-off-by: jianquanye@microsoft.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants