Skip to content

VNET/Vxlan Test#763

Merged
prsunny merged 7 commits intosonic-net:masterfrom
prsunny:master
Feb 4, 2019
Merged

VNET/Vxlan Test#763
prsunny merged 7 commits intosonic-net:masterfrom
prsunny:master

Conversation

@prsunny
Copy link
Copy Markdown
Contributor

@prsunny prsunny commented Dec 22, 2018

Description of PR

Support for VNet/Vxlan test cases. This is an initial commit, and more cases would be subsequently added.

Type of change

  • [] Bug fix
  • [] Testbed and Framework(new/improvement)
  • [Y] Test case(new/improvement)

Approach

The test checks vxlan encapsulation/decapsulation for the dataplane.

How did you do it?

The test checks packet send from VM, Server and between Servers to verify various encap/decap functionality

How did you verify/test it?

Run PTF tests

Any platform specific information?

Applicable for platforms supporting Vxlan

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

t0/t0-64

Documentation

https://github.com/Azure/SONiC/blob/gh-pages/doc/vxlan/Vxlan_hld.md

import subprocess
from pprint import pprint

class VNET(BaseTest):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I understand the config is static in the test. set before the tests starts and remains unchanged until the end od the test. How about adding dynamicity to the test. that is, adding /removing routes during the test?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I agree that adding some state transition coverage would make the test cases stronger.

@dsetia-bfn
Copy link
Copy Markdown

In FromServer, where a tagged packet is sent, packet length needs to be adjusted:

        dl_vlan_enable=True,
        vlan_vid=test['vlan'],
        pktlen=104,       <=================== new
        ip_dst=test['dst'],

Copy link
Copy Markdown

@dsetia-bfn dsetia-bfn left a comment

Choose a reason for hiding this comment

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

  1. Take into account change in packet size due to additional VLAN header
  2. Expect don't fragment bit in IP header to be set in encap case.

Copy link
Copy Markdown

@dsetia-bfn dsetia-bfn left a comment

Choose a reason for hiding this comment

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

Looks good. Verified

@prsunny prsunny merged commit 2dfcf70 into sonic-net:master Feb 4, 2019
wangxin pushed a commit to wangxin/sonic-mgmt that referenced this pull request Oct 27, 2025
…acket trimming GCU tests for Broadcom ASICs (sonic-net#763)

<!--
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:
-->
### Description of PR
<!--
- 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:
Microsoft ADO ID: 34612856
This PR sets trim size to 206 and trim queue index to 7 in Generic Config Updater (GCU) tests for Broadcom ASICs.

### Type of change

<!--
- 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

### Back port request
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [x] 202505

### Approach
#### What is the motivation for this PR?
Broadcom ASICs currently only support trimmed packet size of 206 bytes and trim queue index of 7. It is possible to config other values from the SONiC CLI, but the Broadcom SAI will report the following errors:
```
ERR syncd#syncd: [none] SAI_API_SWITCH:brcm_sai_set_switch_attribute:7929 Packet trim size can not be changed from 206 to 256
ERR syncd#syncd: [none] SAI_API_SWITCH:brcm_sai_set_switch_attribute:7881 Packet trim queue index can not be changed from 7 to 6
```

#### How did you do it?
If the GCU tests are run on a device with Broadcom ASIC, we always set trim size to 206 and trim queue index to 7.

#### How did you verify/test it?
Tested on a switch with Broadcom ASIC on which the above SAI errors were reported without these changes.
```
generic_config_updater/test_packet_trimming_config_symmetric.py::test_packet_trimming_config_sym PASSED [100%]
generic_config_updater/test_packet_trimming_config_asymmetric.py::test_packet_trimming_config_asym PASSED [100%]
```

#### Any platform specific information?
The changes only apply to Broadcom ASICs.

#### Supported testbed topology if it's a new test case?
N/A

### Documentation
<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->
N/A
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
[ci]: download artifacts from master branch (sonic-net#768)
Do not create fabric port if mapping is not available (sonic-net#769)
[syncd] Comparison logic log also current attr value on set operation (sonic-net#763)
Add fabric port test to vslib (sonic-net#737)
[ci]: use sonicbld pool (sonic-net#766)
[tests] Remove exit command blocking all tests to run (sonic-net#765)
[vslib]: adapt macsec sai 1.7.1 (sonic-net#755)
Add support for SAI_SWITCH_ATTR_AVAILABLE_IPMC_ENTRY needed by CRM (sonic-net#756)

Signed-off-by: Danny Allen <daall@microsoft.com>
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