Skip to content

Support multi-chip in packet trimming tests with refactor#21318

Merged
bingwang-ms merged 4 commits intosonic-net:masterfrom
rgarofano-arista:refactor-packet-trimming
Dec 2, 2025
Merged

Support multi-chip in packet trimming tests with refactor#21318
bingwang-ms merged 4 commits intosonic-net:masterfrom
rgarofano-arista:refactor-packet-trimming

Conversation

@rgarofano-arista
Copy link
Copy Markdown
Contributor

@rgarofano-arista rgarofano-arista commented Nov 13, 2025

Description of PR

Summary:
Packet trimming configuration depends on the chip, but currently everything is based on constants. In order to support multiple chips we should refactor all packet trimming configuration to retrieve values through functions that check the asic name in duthost.

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
  • 202412
  • 202505

Approach

What is the motivation for this PR?

Packet trimming tests today are written with only small set of chips in mind. The test uses constants for all configuration values. In an effort to support packet trimming on Arista Quicksilver512, we found these constants did not work to configure the chip.

How did you do it?

Refactored any config related constants into functions that are accessed through the class PacketTrimmingConfig. These static methods require duthost to be passed in such that values returned can be based on duthost.get_asic_name().

How did you verify/test it?

We have been running packet trimming tests internally with this refactor and have sorted out any failures related to this refactor.

Any platform specific information?

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

Documentation

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

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.

@r12f r12f added Request for msft-202412 Branch Request for 202511 branch Request to backport a change to 202511 branch labels Nov 25, 2025
"Trim sent counter on switch level is not equal to the sum of trim sent counter on port "
"level")

trim_queue = PacketTrimmingConfig.get_trim_queue(duthost)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please also update tests/generic_config_updater/test_packet_trimming_config_symmetric.py and tests/generic_config_updater/test_packet_trimming_config_asymmetric.py

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

GCU update PR - #21439

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@kperumalbfn
Copy link
Copy Markdown
Collaborator

@r12f could you add to 202412

@bingwang-ms bingwang-ms merged commit a006eea into sonic-net:master Dec 2, 2025
15 checks passed
dcaugher pushed a commit to dcaugher/sonic-mgmt that referenced this pull request Dec 8, 2025
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Dan Caugherty <dcaugher@cisco.com>
nissampa pushed a commit to nissampa/sonic-mgmt_dpu_test that referenced this pull request Dec 9, 2025
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Nishanth Sampath Kumar <nissampa@cisco.com>
@weiguo-nvidia
Copy link
Copy Markdown
Contributor

Hi @rgarofano-arista @vmittal-msft
Could you help merge this PR to 2511 branch? Thanks!

@r12f
Copy link
Copy Markdown
Collaborator

r12f commented Dec 11, 2025

hi @vmittal-msft , do you mind to help us with 202511 pickup?

selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Dec 11, 2025
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
echuawu pushed a commit to echuawu/sonic-mgmt that referenced this pull request Dec 12, 2025
saravanan-nexthop pushed a commit to saravanan-nexthop/sonic-mgmt that referenced this pull request Dec 15, 2025
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Saravanan <saravanan@nexthop.ai>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 16, 2025
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Aharon Malkin <amalkin@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
vrajeshe pushed a commit to Akshath-17/sonic-mgmt that referenced this pull request Jan 4, 2026
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Venkata Gouri Rajesh Etla <vrajeshe@cisco.com>
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 8, 2026
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202511: #21870

venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
yifan-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Jan 14, 2026
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: YiFan Wang <yifan@nexthop.ai>
vmittal-msft pushed a commit that referenced this pull request Jan 14, 2026
…21870)

* Support multi-chip in packet trimming tests

Co-authored-by: Ryan Garofano <rgarofano@arista.com>
PriyanshTratiya pushed a commit to PriyanshTratiya/sonic-mgmt that referenced this pull request Jan 21, 2026
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
lakshmi-nexthop pushed a commit to lakshmi-nexthop/sonic-mgmt that referenced this pull request Jan 28, 2026
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Lakshmi Yarramaneni <lakshmi@nexthop.ai>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Jan 29, 2026
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Yael Tzur <ytzur@nvidia.com>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Feb 6, 2026
lakshmi-nexthop pushed a commit to lakshmi-nexthop/sonic-mgmt that referenced this pull request Feb 11, 2026
…21318) (sonic-net#21870)

* Support multi-chip in packet trimming tests

Co-authored-by: Ryan Garofano <rgarofano@arista.com>
Signed-off-by: Lakshmi Yarramaneni <lakshmi@nexthop.ai>
rraghav-cisco pushed a commit to rraghav-cisco/sonic-mgmt that referenced this pull request Feb 13, 2026
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
anilal-amd pushed a commit to anilal-amd/anilal-forked-sonic-mgmt that referenced this pull request Feb 19, 2026
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Zhuohui Tan <zhuohui.tan@amd.com>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Mar 17, 2026
…21318)

* Support multi-chip in packet trimming tests

Signed-off-by: Abhishek <abhishek@nexthop.ai>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants