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

[EVPN]Modified tunnel creation logic when creating tunnel in VRF-VNI map creation flow #2387

Closed
wants to merge 6 commits into from

Conversation

dgsudharsan
Copy link
Collaborator

What I did
To fix issue sonic-net/sonic-buildimage#11428
Modified the logic of tunnel map creation to create tunnel with tunnel map for vlan-vni map in addition to vrf-vni map when tunnel is created first time in the VRF-VNI map processing flow.

Why I did it
During the configuration phase when VRF-VNI map arrives before VLAN-VNI map, the tunnel is created without a tunnel map for vlan-vni membership. This is problematic when VLAN to VNI map arrives later, tunnel map entry cannot be created since the tunnel map doesn't exist and its a create only attribute in SAI.

How I verified it
Modified UT to add VRF-VNI map first and VLAN-VLAN map later

Details if related

…map creation flow

During the configuration phase when VRF-VNI map arrives before VLAN-VNI map, the tunnel is created without a tunnel map for vlan-vni membership. This is problematic when VLAN to VNI map arrives later, tunnel map entry cannot be created since the tunnel map doesn't exist and its a create only attribute in SAI.
Modified the logic of tunnel map creation to create tunnel with tunnel map for vlan-vni map in addition to vrf-vni map
@dgsudharsan
Copy link
Collaborator Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lgtm-com
Copy link

lgtm-com bot commented Jul 21, 2022

This pull request fixes 1 alert when merging 1d22020 into 33c420d - view on LGTM.com

fixed alerts:

  • 1 for FIXME comment

@prsunny
Copy link
Collaborator

prsunny commented Jul 21, 2022

@srj102 , please review

@tapashdas
Copy link
Contributor

Please add a new test case instead of altering existing one.

@lgtm-com
Copy link

lgtm-com bot commented Jul 22, 2022

This pull request introduces 3 alerts and fixes 1 when merging 8e4ab43 into e9984d8 - view on LGTM.com

new alerts:

  • 3 for Unused local variable

fixed alerts:

  • 1 for FIXME comment

@dgsudharsan
Copy link
Collaborator Author

Please add a new test case instead of altering existing one.

There are 4 tests that create vlan- vni map followed by vrf - vni map. All these test follow the same sequence for initialization. So I modified only one test to reverse the order.
This ensures all scenarios are covered in existing tests.
Adding new tests adds additional time for vs tests which already takes lots of time. So I reused the existing test.

Please also note that the test modified is in mellanox specific and so for the same test broadcom specific test is not modified which could also cover the scenario.

@lgtm-com
Copy link

lgtm-com bot commented Jul 23, 2022

This pull request fixes 1 alert when merging c68c238 into 4a6f940 - view on LGTM.com

fixed alerts:

  • 1 for FIXME comment

@dgsudharsan
Copy link
Collaborator Author

@tapashdas @srj102 @prsunny Please let me know if there are any more comments.

@dgsudharsan
Copy link
Collaborator Author

@tapashdas @srj102 @prsunny Please let me know if there are any more comments.

Hi @tapashdas , @prsunny , @srj102 Can you please review and signoff? This is a critical bugfix required for us.

tapashdas
tapashdas previously approved these changes Jul 28, 2022
…tunnel is not supported 2) Modified the tunnel counter polling interval to 10000 ms by default
@lgtm-com
Copy link

lgtm-com bot commented Aug 2, 2022

This pull request fixes 1 alert when merging eafa891 into 3161eaa - view on LGTM.com

fixed alerts:

  • 1 for FIXME comment

@lgtm-com
Copy link

lgtm-com bot commented Aug 2, 2022

This pull request fixes 1 alert when merging 29a3294 into 3161eaa - view on LGTM.com

fixed alerts:

  • 1 for FIXME comment

auto port_tunnel_name = tunnel_orch->getTunnelPortName(src_vtep, true);
gPortsOrch->addTunnel(port_tunnel_name, tunnel_obj->getTunnelId(), false);
gPortsOrch->getPort(port_tunnel_name,tunPort);
gPortsOrch->addBridgePort(tunPort);
Copy link
Collaborator

Choose a reason for hiding this comment

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

As discussed, lets move the bridgeport creation based on capability.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi Prince. I have added the check. I will look into the test failures and update.

@linux-foundation-easycla
Copy link

CLA Not Signed

@lgtm-com
Copy link

lgtm-com bot commented Aug 2, 2022

This pull request fixes 1 alert when merging 86f3ec3 into 3161eaa - view on LGTM.com

fixed alerts:

  • 1 for FIXME comment

@dgsudharsan dgsudharsan closed this Aug 3, 2022
liat-grozovik pushed a commit that referenced this pull request Aug 8, 2022
…map creation flow (#2404)

Same as PR #2387

- What I did
To fix issue sonic-net/sonic-buildimage#11428
Modified the logic of tunnel map creation to create tunnel with tunnel map for vlan-vni map in addition to vrf-vni map when tunnel is created first time in the VRF-VNI map processing flow.
Modified the tunnel stats interval to 10 sec
Modified the logic to create bridge port for p2mp tunnel only when p2p tunnel is not supported

- Why I did it
During the configuration phase when VRF-VNI map arrives before VLAN-VNI map, the tunnel is created without a tunnel map for vlan-vni membership. This is problematic when VLAN to VNI map arrives later, tunnel map entry cannot be created since the tunnel map doesn't exist and its a create only attribute in SAI.

- How I verified it
Modified UT to add VRF-VNI map first and VLAN-VLAN map later
yxieca pushed a commit that referenced this pull request Aug 8, 2022
…map creation flow (#2404)

Same as PR #2387

- What I did
To fix issue sonic-net/sonic-buildimage#11428
Modified the logic of tunnel map creation to create tunnel with tunnel map for vlan-vni map in addition to vrf-vni map when tunnel is created first time in the VRF-VNI map processing flow.
Modified the tunnel stats interval to 10 sec
Modified the logic to create bridge port for p2mp tunnel only when p2p tunnel is not supported

- Why I did it
During the configuration phase when VRF-VNI map arrives before VLAN-VNI map, the tunnel is created without a tunnel map for vlan-vni membership. This is problematic when VLAN to VNI map arrives later, tunnel map entry cannot be created since the tunnel map doesn't exist and its a create only attribute in SAI.

- How I verified it
Modified UT to add VRF-VNI map first and VLAN-VLAN map later
@dgsudharsan dgsudharsan deleted the evpn_vrf_map_fix branch March 9, 2023 02:02
lukasstockner pushed a commit to genesiscloud/sonic-swss that referenced this pull request Mar 31, 2023
…map creation flow (sonic-net#2404)

Same as PR sonic-net#2387

- What I did
To fix issue sonic-net/sonic-buildimage#11428
Modified the logic of tunnel map creation to create tunnel with tunnel map for vlan-vni map in addition to vrf-vni map when tunnel is created first time in the VRF-VNI map processing flow.
Modified the tunnel stats interval to 10 sec
Modified the logic to create bridge port for p2mp tunnel only when p2p tunnel is not supported

- Why I did it
During the configuration phase when VRF-VNI map arrives before VLAN-VNI map, the tunnel is created without a tunnel map for vlan-vni membership. This is problematic when VLAN to VNI map arrives later, tunnel map entry cannot be created since the tunnel map doesn't exist and its a create only attribute in SAI.

- How I verified it
Modified UT to add VRF-VNI map first and VLAN-VLAN map later
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.

6 participants