Skip to content

[switchorch] Implement VXLAN src port range feature #1959

Merged
prsunny merged 2 commits intosonic-net:masterfrom
ayurkiv-nvda:vxlan_src_azure
Nov 5, 2021
Merged

[switchorch] Implement VXLAN src port range feature #1959
prsunny merged 2 commits intosonic-net:masterfrom
ayurkiv-nvda:vxlan_src_azure

Conversation

@ayurkiv-nvda
Copy link
Contributor

Signed-off-by: Andriy Yurkiv ayurkiv@nvidia.com

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"
    }
]

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>
@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.

… and rename variable

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>
@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
@ayurkiv-nvda ayurkiv-nvda deleted the vxlan_src_azure branch January 22, 2025 17:00
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
* Implement VXLAN src port range feature configuring
Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.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.

2 participants