-
Notifications
You must be signed in to change notification settings - Fork 547
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
[SRv6] Add support for SRv6 VPN #3293
base: master
Are you sure you want to change the base?
[SRv6] Add support for SRv6 VPN #3293
Conversation
/azp run Azure.sonic-swss |
Azure Pipelines successfully started running 1 pipeline(s). |
87f3488
to
f24fa65
Compare
f24fa65
to
80b439d
Compare
/azp run Azure.sonic-swss |
Commenter does not have sufficient privileges for PR 3293 in repo sonic-net/sonic-swss |
/azp run Azure.sonic-swss |
Commenter does not have sufficient privileges for PR 3293 in repo sonic-net/sonic-swss |
afc1311
to
290102b
Compare
How is this related to #3123? Is there any dependency which one to go first? |
@prsunny @kperumalbfn @lguohan Can you help to review and close this PR? |
15400fb
to
1d02012
Compare
@shuaishang could you rebase with the latest master branch and check all VS test failures. |
} | ||
else | ||
{ | ||
srv6_nh = k.is_srv6_nexthop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we include VPN SID for the mismatch? I believe there shouldn't be any mix of NHs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no "vpn_sid" field in "APP_NEXTHOP_GROUP_TABLE_NAME" for nhgorch.
So don't need to check mismatch for VPN SID.
8c5b903
to
61fdcef
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -115,7 +117,8 @@ struct NextHopKey | |||
{ | |||
if (srv6_nh) | |||
{ | |||
return ip_address.to_string() + NH_DELIMITER + srv6_segment + NH_DELIMITER + srv6_source; | |||
return ip_address.to_string() + NH_DELIMITER + srv6_segment + NH_DELIMITER + srv6_source + NH_DELIMITER | |||
+ srv6_vpn_sid + NH_DELIMITER; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @goomadao. But the key would be ending with the delimiter, is that ok?
else if (m_syncdNextHopGroups[it_nhg.first].ref_count == 0) | ||
{ | ||
removeNextHopGroup(it_nhg.first); | ||
} | ||
} | ||
|
||
/* Reduce reference for srv6 next hop group */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide the reason to decouple 'removeSrv6Nexthops' from 'removeNextHoproup'? How about handling NH removals in addRoutePost?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we need to remove srv6 related objects such as tunnels [maps [entries]], aggregate ids & references for sidlists besides the next hop [group] objects. NH removals are done in deleteSrv6Nexthop
called by removeSrv6Nexthops
.
|
||
/* Reduce reference for srv6 next hop group */ | ||
/* Later delete for increase refcnt early */ | ||
if (!m_bulkSrv6NhgReducedVec.empty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also for VPN NHs, should we also check context_index refcount to be zero?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context_index is always empty in this situation because vpn_sids(nexthopgroups) is owned by RouteOrch, not NhgOrch & Srv6Orch.
While deleting pic_context_id in doTaskPicContextTable
, zero check will be done for the refcount.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kperumalbfn can you review @goomadao 's response.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@abdosi please review and approve. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
What I did
[HLD] SRv6 VPN HLD
Why I did it
This PR is to support SRv6 VPN functions
How I verified it
Details if related
Depends on sonic-swss-common#919