sonic-mgmt icon indicating copy to clipboard operation
sonic-mgmt copied to clipboard

[Dash] Relaxed match support

Open congh-nvidia opened this issue 1 year ago • 16 comments

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?

  1. 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).
  2. 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

congh-nvidia avatar Feb 05 '24 10:02 congh-nvidia

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.

congh-nvidia avatar Feb 23 '24 03:02 congh-nvidia

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.

congh-nvidia avatar Mar 18 '24 06:03 congh-nvidia

@nhe-NV @Yakiv-Huryk Please review, thanks.

congh-nvidia avatar Mar 18 '24 06:03 congh-nvidia

@roy-sror @nhe-NV please review, thanks.

congh-nvidia avatar Apr 10 '24 10:04 congh-nvidia

@Yakiv-Huryk OK to merge?

liat-grozovik avatar Apr 16 '24 13:04 liat-grozovik

@congh-nvidia can you handle the conflict so i can merge it?

liat-grozovik avatar May 07 '24 11:05 liat-grozovik

Hi @liat-grozovik , the conflict is resolved, please help merge. Thanks.

congh-nvidia avatar May 08 '24 11:05 congh-nvidia

Hi @liat-grozovik, could you please merge this? Thanks.

congh-nvidia avatar May 24 '24 07:05 congh-nvidia

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:

  1. 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.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

mssonicbld avatar Jun 07 '24 08:06 mssonicbld

@nhe-NV please add 202405 label. Hi @liat-grozovik, could you please merge this? Thanks

congh-nvidia avatar Jun 11 '24 04:06 congh-nvidia

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:

  1. 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.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

mssonicbld avatar Jul 01 '24 06:07 mssonicbld

/azpw run

congh-nvidia avatar Jul 02 '24 02:07 congh-nvidia

/AzurePipelines run

mssonicbld avatar Jul 02 '24 02:07 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 02 '24 02:07 azure-pipelines[bot]

Hi @liat-grozovik , could you please merge this? Thanks.

congh-nvidia avatar Jul 04 '24 04:07 congh-nvidia

Hi @wangxin could you please review and merge this?

congh-nvidia avatar Jul 08 '24 11:07 congh-nvidia

@congh-nvidia Please fix the conflict.

bingwang-ms avatar Jul 23 '24 15:07 bingwang-ms

@congh-nvidia Please fix the conflict.

@bingwang-ms Fixed and checkers all passed. Please help merge. Thanks.

congh-nvidia avatar Jul 25 '24 01:07 congh-nvidia

@congh-nvidia PR conflicts with 202405 branch

mssonicbld avatar Jul 30 '24 16:07 mssonicbld

Will manually cherry-pick to 202405.

congh-nvidia avatar Aug 06 '24 02:08 congh-nvidia

Cherry-pick to 202405: https://github.com/sonic-net/sonic-mgmt/pull/14059. @bingwang-ms please review.

congh-nvidia avatar Aug 09 '24 06:08 congh-nvidia