Add packet trimming testplan#17850
Conversation
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
|
Hi @BYGX-wcr @kperumalbfn @xwjiang-ms , Could you help review the packet trimming test plan, thanks! |
| 4) "48" | ||
| 5) "queue_index" | ||
| 6) "6" | ||
| ``` |
There was a problem hiding this comment.
@SavchukRomanLv Good to see you :)
Please add a note on how the congestion is triggered as the base condition in PTF testing
There was a problem hiding this comment.
We can block the egress queue to create congestion. I have add the steps in the test cases
1. Create scheduler and apply it to the egress queue.
`sonic-db-cli CONFIG_DB hset "SCHEDULER|SCHEDULER_BLOCK_DATA_PLANE" "type" DWRR "weight" 15 "pir" 1`
`sonic-db-cli CONFIG_DB hset 'QUEUE|Ethernet96|0' scheduler SCHEDULER_BLOCK_DATA_PLANE`
2. Send packets to make the buffer full.
| 2. Packet trimming only supports "Lossy Queue" and it is configured only on the egress queue. | ||
| 3. Packet trimming only supports config reload and cold reboot, does not support warm/fast reboot. | ||
| 4. After packet is trimmed, the `checksum` and `IP length` fields in IP header is not recalculated. | ||
| 5. Trimmed packet counters for PORT/QUEUE levels are not supported. |
There was a problem hiding this comment.
Why trim packet counters are not supported??
There was a problem hiding this comment.
In show queue counters, we can see the packet counters, which include normal forwarded packets and trimmed packets.
But the counters can not distinguish which packets are trimmed and which are normally forwarded.
admin@router:~$ show queue counters Ethernet96
Last cached time was 2025-04-15T02:06:38.079938
Ethernet96 Last cached time was 2025-04-15T02:06:38.079938
Port TxQ Counter/pkts Counter/bytes Drop/pkts Drop/bytes
---------- ----- -------------- --------------- ----------- ------------
Ethernet96 UC0 0 0 95,365 N/A <<< Queue is full
Ethernet96 UC1 0 0 0 N/A
Ethernet96 UC2 0 0 0 N/A
Ethernet96 UC3 0 0 0 N/A
Ethernet96 UC4 0 0 0 N/A
Ethernet96 UC5 0 0 0 N/A
Ethernet96 UC6 95,365 24,794,900 0 N/A <<< The trimmed packet are sent from another queue base on the config TRIM_QUEUE value
Ethernet96 UC7 184 17,230 0 N/A
There was a problem hiding this comment.
@weiguo-nvidia Some SKUs support trim counters, could you add the trim counter check for those SKUs?
There was a problem hiding this comment.
@weiguo-nvidia Some SKUs support trim counters, could you add the trim counter check for those SKUs?
Added trim counter check in Test Case 2: Verify Packet Size After Trimming and added command and output examples.
| 1. Packet trimming only supports IPv4 and IPv6 unicast packets. The ARP/NDP/ECMP are not supported. Any encap/decap packets (e.g., VxLAN, GRE, MPLS) are not supported. | ||
| 2. Packet trimming only supports "Lossy Queue" and it is configured only on the egress queue. | ||
| 3. Packet trimming only supports config reload and cold reboot, does not support warm/fast reboot. | ||
| 4. After packet is trimmed, the `checksum` and `IP length` fields in IP header is not recalculated. |
There was a problem hiding this comment.
Add a condition check for queue drop counters and queue trim counters
There was a problem hiding this comment.
I have added a step to check the queue counter.
There was a problem hiding this comment.
@weiguo-nvidia pls check the HLD - https://github.com/sonic-net/SONiC/pull/1898/files
show queue counters shows trim packets counters in the dropped queue.
There was a problem hiding this comment.
thanks for your reminding, I found the command portstat -i Ethernet0 --trim and updated the document.
|
|
||
| --- | ||
|
|
||
| ## Test Case 9: Verify Trimming During Multiple Egress Port Admin Toggle |
There was a problem hiding this comment.
Verify packet trimming config toggle from trim-->drop-->trim
There was a problem hiding this comment.
I have updated the case to verify trimming function after each config toggle.
|
|
||
| ## Test Case 9: Verify Trimming During Multiple Egress Port Admin Toggle | ||
| **Objective**: Validate trimming functions when repeatedly enabling/disabling egress ports. | ||
| **Test Steps**: |
There was a problem hiding this comment.
Verify packet trimming functionality along with WRED ECN marking for queue tail drop packets.
There was a problem hiding this comment.
Will check this field
| 5) "queue_index" | ||
| 6) "6" | ||
| ``` | ||
| 4. Configure trimming via config_db. |
There was a problem hiding this comment.
Verify for both V4 and V6 traffic
There was a problem hiding this comment.
Yes, all the test should cover ipv4_tcp / ipv4_udp / ipv6_tcp / ipv6_udp packets. I have added notes in the testcase
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
6288b82 to
c59ad84
Compare
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
c59ad84 to
0beb18b
Compare
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
0beb18b to
6b869ce
Compare
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
| - Verify the SRv6 DECAP packet is trimmed, verify the trimmed packet size is correct. | ||
| - Verify SRv6 packet decapsulation success. | ||
| - Verify the DSCP value is not updated in the packet. | ||
| (The DSCP value of the outer header of the SRv6 packet is updated by trimming, and the DSCP value of the inner header is not updated. After decapsulation, the outer header is discarded, leaving only the inner packet. Therefore, the DSCP value of the inner header is not updated.) |
There was a problem hiding this comment.
Please add GCU test case to update the switch trim configs and queue profile update
There was a problem hiding this comment.
@weiguo-nvidia could you please add GCU test cases as well
There was a problem hiding this comment.
@weiguo-nvidia could you please add GCU test cases as well
Add a new case to test the GCUs that have been added to the test plan.
| 5. Verify no crashes/core dumps observed. | ||
|
|
||
| --- | ||
|
|
There was a problem hiding this comment.
Please add snappi tests to include line rate packet trim testing
There was a problem hiding this comment.
line rate packet trim testing
For functional test, it is hard to send line rate testing. Block the queue to simulate the scenario where the buffer is full.
| 1. Configure packet trimming in global level and set `packet_discard_action=trim` in buffer profile. | ||
| 2. Create ACL rules to disable trimming action for specific flows. | ||
| ```json | ||
| "ACL_RULE": { |
There was a problem hiding this comment.
Add for V6 ACLs as well
There was a problem hiding this comment.
Add for V6 ACLs as well
Added IPv6 ACL config and sent IPv6 packet as well
|
|
||
|
|
||
|
|
||
| # 3. Packet Flow |
There was a problem hiding this comment.
Please include that this test plan intends to cover only static DSCP and Queue mode.
There was a problem hiding this comment.
Please include that this test plan intends to cover only static DSCP and Queue mode.
Added the instructions.
| 4. Verify the packets are dropped (not trimmed). | ||
| 5. Verify ACL disable trim action counter increments. | ||
| 6. Send packets with src_ip `1.1.1.2` (not matched ACL rule) to DUT and exceeding buffer threshold. | ||
| 7. Verfiy the packet is trimmed. |
There was a problem hiding this comment.
verify trim for same traffic matching ACL after deleting ACL rule or ACL table
There was a problem hiding this comment.
verify trim for same traffic matching ACL after deleting ACL rule or ACL table
Added this step.
6b869ce to
7ce63a3
Compare
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
7ce63a3 to
597d478
Compare
|
/azp run |
Thanks! I will update the test script. No need update for the current test plan PR |
|
Hi @kperumalbfn Can you help to review the PR again? |
|
Hi @r12f @bingwang-ms @yxieca |
|
@r12f @kperumalbfn Can you please help review? |
| **Test Steps**: | ||
| 1. Configure packet trimming in global level and set `"dscp_value": "48"`, `"size": "256"`. | ||
| 2. Create a buffer profile setting `packet_discard_action=trim` and apply buffer profile. | ||
| 3. Create egress queue congestion. |
There was a problem hiding this comment.
By default, most of the trim eligible queues have WRED enabled. So most of the ingress traffic should be with ECN enabled. Please check.
There was a problem hiding this comment.
Yes, you are correct. I have added the notes If the queue has WRED enabled, the packet should have ECN enabled in the testplan
|
|
||
| --- | ||
|
|
||
| ## Test Case 12: Verify Trimming in Generic Config Updater Test |
There was a problem hiding this comment.
Could you also add one test case for strict queue configured on the trim queue?
There was a problem hiding this comment.
@kperumalbfn This is a new reuqirements, not only to udpate the test plan, we also need to plan effort to update the test case. We will take into internal to review how and when could we commit it, and besides this one, do you still have some other comments? If not can we have merge this one, and update the new requirement later?
8e2733e to
7c04def
Compare
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
|
@yxieca Could you merge packet trimming testplan |
|
@weiguo-nvidia In the next update, could you add test case to include 4K packet size. |
The 4K trimmed packet test already exist in the "Test Case 2: Verify Packet Size After Trimming" of the test plan. |
What is the motivation for this PR? Introduce packet trimming test plan
What is the motivation for this PR? Introduce packet trimming test plan
What is the motivation for this PR? Introduce packet trimming test plan
What is the motivation for this PR? Introduce packet trimming test plan Signed-off-by: opcoder0 <[email protected]>
What is the motivation for this PR? Introduce packet trimming test plan Signed-off-by: Guy Shemesh <[email protected]>
What is the motivation for this PR? Introduce packet trimming test plan Signed-off-by: Aharon Malkin <[email protected]>
What is the motivation for this PR? Introduce packet trimming test plan Signed-off-by: Guy Shemesh <[email protected]>
What is the motivation for this PR? Introduce packet trimming test plan
What is the motivation for this PR? Introduce packet trimming test plan Signed-off-by: Guy Shemesh <[email protected]>
What is the motivation for this PR? Introduce packet trimming test plan Signed-off-by: Yael Tzur <[email protected]>
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Introduce packet trimming test plan
How did you do it?
Testplan document had been created
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation