Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[switchorch] Implement VXLAN src port range feature #1959

Merged
merged 2 commits into from
Nov 5, 2021

Conversation

ayurkiv-nvda
Copy link
Contributor

Signed-off-by: Andriy Yurkiv [email protected]

What I did
Added ability to configure UDP VXLAN src port range with help of new added parameters (vxlan_sport and vxlan_mask)
Сorresponding SAI attributes: SAI_SWITCH_TUNNEL_ATTR_VXLAN_UDP_SPORT and SAI_SWITCH_TUNNEL_ATTR_VXLAN_UDP_SPORT_MASK

Why I did it
Implemented configuration of VXLAN src port feature according to requirements

How I verified it
Use appropriate VS test

sudo pytest --dvsname=vs tests/test_switch.py::TestSwitch::test_switch_attribute -v -s

Create json file with params.
Use swssconfig to enable feature and write config params to APP_DB : swssconfig /etc/swss/config.d/switch.json
Details if related

switch.json:
[
    {
        "SWITCH_TABLE:switch": {
			"vxlan_sport": "0xFFA0",
			"vxlan_mask": "3"
        },
        "OP": "SET"
    }
]

@ayurkiv-nvda
Copy link
Contributor Author

Creating draft PR because SAI is not yet merged and without it compilation will fail

@ayurkiv-nvda ayurkiv-nvda changed the title Implement VXLAN src port range feature configuring [switchorch] Implement VXLAN src port range feature Nov 1, 2021
@ayurkiv-nvda ayurkiv-nvda marked this pull request as ready for review November 1, 2021 16:58
@ayurkiv-nvda
Copy link
Contributor Author

Hello @prsunny .
Could you please take a look? Thanks.

orchagent/switchorch.h Outdated Show resolved Hide resolved
orchagent/switchorch.cpp Outdated Show resolved Hide resolved
@prsunny prsunny merged commit c91a7f2 into sonic-net:master Nov 5, 2021
liat-grozovik pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Feb 13, 2022
…eature (#9956)

- Why I did it
Need to remove old static configs from sai.profile files.
New implementation: sonic-net/sonic-swss#1959
New configuration: #9658

- How I did it
Remove SAI_VXLAN_SRCPORT_RANGE_ENABLE=1 lines from files per HWSKU

- How to verify it
When static config is removed following test will fail (src port will be in range 0-255)

py.test vxlan/test_vnet_vxlan.py --inventory "../ansible/inventory, ../ansible/veos" --host-pattern (testbed)-t0 --module-path ../ansible/library/ --testbed (testbed)-t0 --testbed_file ../ansible/testbed.csv --allow_recover --assert plain --log-cli-level info --show-capture=no -ra --showlocals --disable_loganalyzer --skip_sanity --upper_bound_udp_port 65535 --lower_bound_udp_port 64128
judyjoseph pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Feb 14, 2022
…eature (#9956)

- Why I did it
Need to remove old static configs from sai.profile files.
New implementation: sonic-net/sonic-swss#1959
New configuration: #9658

- How I did it
Remove SAI_VXLAN_SRCPORT_RANGE_ENABLE=1 lines from files per HWSKU

- How to verify it
When static config is removed following test will fail (src port will be in range 0-255)

py.test vxlan/test_vnet_vxlan.py --inventory "../ansible/inventory, ../ansible/veos" --host-pattern (testbed)-t0 --module-path ../ansible/library/ --testbed (testbed)-t0 --testbed_file ../ansible/testbed.csv --allow_recover --assert plain --log-cli-level info --show-capture=no -ra --showlocals --disable_loganalyzer --skip_sanity --upper_bound_udp_port 65535 --lower_bound_udp_port 64128
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.

2 participants