sonic-mgmt
sonic-mgmt copied to clipboard
[Dash] Relaxed match support
Description of PR
Summary: This PR contains the test plan and test implementation of the feature "Relaxed match support" for DPU. The feature is to support dynamic change of VXLAN UDP port on the DPU. The purpose of this test is to verify the functionality of dynamic VXLAN UDP port changing on DPU.
Type of change
- [ ] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [x] Test case(new/improvement)
Back port request
- [ ] 201911
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [ ] 202311
Approach
What is the motivation for this PR?
Provide the test plan and test implementation of the feature "Relaxed match support" for DPU.
How did you do it?
- Integrate the functionality test into the existing dash vnet test(https://github.com/sonic-net/sonic-mgmt/blob/master/tests/dash/test_dash_vnet.py).
- Add a new test file for the negative test case.
How did you verify/test it?
Run the tests on DPU setups, all passed.
Any platform specific information?
Only for DPU.
Supported testbed topology if it's a new test case?
dpu, dpu-1
Documentation
Test plan: docs/testplan/dash/Dash-Relaxed-Match-Support.md
Currently, configuring an invalid vxlan port will cause orchagent crash. The behavior is inherited from the switch, and it has not been decided whether it should be changed on DPU or not. If finally, it is decided to keep the same behavior with switch, the test case test_relaxed_match_invalid_port should be removed. I will move this draft to "ready for review" after the decision is made.
Currently, configuring an invalid vxlan port will cause orchagent crash. The behavior is inherited from the switch, and it has not been decided whether it should be changed on DPU or not. If finally, it is decided to keep the same behavior with switch, the test case test_relaxed_match_invalid_port should be removed. I will move this draft to "ready for review" after the decision is made.
It is decided not to change the behavior of changing the vxlan port to a invalid value. The negative test cases for invalid port is removed from test plan and test file.
@nhe-NV @Yakiv-Huryk Please review, thanks.
@roy-sror @nhe-NV please review, thanks.
@Yakiv-Huryk OK to merge?
@congh-nvidia can you handle the conflict so i can merge it?
Hi @liat-grozovik , the conflict is resolved, please help merge. Thanks.
Hi @liat-grozovik, could you please merge this? Thanks.
The pre-commit check detected issues in the files touched by this pull request. The pre-commit check is a mandatory check, please fix detected issues.
Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1
tests/dash/test_dash_vnet.py:7:1: F401 'time' imported but unused
flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped
To run the pre-commit checks locally, you can follow below steps:
- Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt docker container.
- Ensure that the
pre-commit
package is installed:
sudo pip install pre-commit
- Go to repository root folder
- Install the pre-commit hooks:
pre-commit install
- Use pre-commit to check staged file:
pre-commit
- Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>
@nhe-NV please add 202405 label. Hi @liat-grozovik, could you please merge this? Thanks
The pre-commit check detected issues in the files touched by this pull request. The pre-commit check is a mandatory check, please fix detected issues.
Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1
tests/dash/test_dash_vnet.py:7:1: F401 'time' imported but unused
flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped
To run the pre-commit checks locally, you can follow below steps:
- Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt docker container.
- Ensure that the
pre-commit
package is installed:
sudo pip install pre-commit
- Go to repository root folder
- Install the pre-commit hooks:
pre-commit install
- Use pre-commit to check staged file:
pre-commit
- Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>
/azpw run
/AzurePipelines run
Azure Pipelines successfully started running 1 pipeline(s).
Hi @liat-grozovik , could you please merge this? Thanks.
Hi @wangxin could you please review and merge this?
@congh-nvidia Please fix the conflict.
@congh-nvidia Please fix the conflict.
@bingwang-ms Fixed and checkers all passed. Please help merge. Thanks.
@congh-nvidia PR conflicts with 202405 branch
Will manually cherry-pick to 202405.
Cherry-pick to 202405: https://github.com/sonic-net/sonic-mgmt/pull/14059. @bingwang-ms please review.