[vxlanorch] Fix Logic of Vxlan tunnel removal #995
Merged
lguohan merged 3 commits intosonic-net:masterfrom Jul 31, 2019
sdddean:master
Merged
[vxlanorch] Fix Logic of Vxlan tunnel removal #995lguohan merged 3 commits intosonic-net:masterfrom sdddean:master
lguohan merged 3 commits intosonic-net:masterfrom
sdddean:master
Conversation
…e tunnel_id and tunnel_term_id. Signed-off-by: sundandan <sundandan@asterfusion.com>
stcheng
suggested changes
Jul 26, 2019
orchagent/vxlanorch.cpp
Outdated
| { | ||
| sai_status_t status = sai_tunnel_api->remove_tunnel(tunnel_id); | ||
| if (status != SAI_STATUS_SUCCESS) | ||
| if(tunnel_id != SAI_NULL_OBJECT_ID) |
Contributor
There was a problem hiding this comment.
Add a space between if and (
Contributor
Author
There was a problem hiding this comment.
Add a space between
ifand(
OK
| { | ||
| sai_status_t status = sai_tunnel_api->remove_tunnel(tunnel_id); | ||
| if (status != SAI_STATUS_SUCCESS) | ||
| { |
Contributor
There was a problem hiding this comment.
Could you add an error message here?
Contributor
Author
There was a problem hiding this comment.
Could you add an error message here?
The "runtime_error" in the next line has thrown the error message.
Signed-off-by: sundandan <sundandan@asterfusion.com>
stcheng
approved these changes
Jul 26, 2019
Contributor
|
retest this please |
prsunny
reviewed
Jul 30, 2019
orchagent/vxlanorch.cpp
Outdated
| sai_status_t status = sai_tunnel_api->remove_tunnel_term_table_entry(term_table_id); | ||
| if (status != SAI_STATUS_SUCCESS) | ||
| { | ||
| throw std::runtime_error("Can't remove a tunnel term table object"); |
Contributor
Author
There was a problem hiding this comment.
I'm sorry, thank you!
Collaborator
|
Changes looks good to me. Minor comments! |
Signed-off-by: sundandan <sundandan@asterfusion.com>
prsunny
approved these changes
Jul 31, 2019
Contributor
|
retest this please |
tonytitus
pushed a commit
to tonytitus/sonic-swss
that referenced
this pull request
Jul 31, 2019
As the vxlan tunnel_id and tunnel_term_id are not created until the map entrys are added, in case of configuring the vxlan tunnel without map entry, and then it is invalid to remove it without validity checking. Signed-off-by: sundandan <sundandan@asterfusion.com>
EdenGri
pushed a commit
to EdenGri/sonic-swss
that referenced
this pull request
Feb 28, 2022
sonic-net#995) Root group name was changed from `cli` to `sonic_installer` in sonic-net/sonic-utilities#983. However, `verify-next-image` subcommand was being added in an already-open PR sonic-net/sonic-utilities#979 at the time. It did not get updated before merge. This aligns it with the new group name.
oleksandrivantsiv
pushed a commit
to oleksandrivantsiv/sonic-swss
that referenced
this pull request
Mar 1, 2023
…nic-net#995) * Put the downloaded swss common artifact in a separated directory while build sairedis target. * The downloaded swss common artifact is in a sub-directory of sairedis artifact, then it avoids overriding the previous swss common packages.
Janetxxx
pushed a commit
to Janetxxx/sonic-swss
that referenced
this pull request
Nov 10, 2025
As the vxlan tunnel_id and tunnel_term_id are not created until the map entrys are added, in case of configuring the vxlan tunnel without map entry, and then it is invalid to remove it without validity checking. Signed-off-by: sundandan <sundandan@asterfusion.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Add the validity checking before we call sai_api to remove tunnel_id and tunnel_term_id.
Why I did it
As the vxlan tunnel_id and tunnel_term_id are not created until the map entrys are added, in case of configuring the vxlan tunnel without map entry, and then it is invalid to remove it without validity checking.
How I verified it
Applied Vxlan tunnel configure without the map entry and then remove the tunnel, there are no errors.
Details if related