Conversation
|
added more reviewers |
|
Reviewed in Routing WG weekly meeting 06082023: |
| if (fvField(i) == "seg_src") | ||
| srv6_source = fvValue(i); | ||
|
|
||
| if (fvField(i) == "vpn_sid" && fvValue(i) != "") |
There was a problem hiding this comment.
Could you update these new fields in doc/swss-schema.md
| srv6_source = fvValue(i); | ||
|
|
||
| if (fvField(i) == "vpn_sid" && fvValue(i) != "") | ||
| { |
There was a problem hiding this comment.
Does this code change handle SRV6 policy referenced in HLD? There is no reference to SRv6_POLICY_TABLE table?
There was a problem hiding this comment.
This PR only includes SRv6 VPN feature, no SRv6 Policy.
| NextHopKey(const std::string &str) : | ||
| vni(0), mac_address() | ||
| vni(0), mac_address(), | ||
| srv6_vpn_sid(""), |
There was a problem hiding this comment.
can we move the vpn_sid to the end of NH key without affecting the non-VPN NH key?
There was a problem hiding this comment.
It will not affect non-VPN NH key, however I moved srv6_vpn_sid to end of NH key.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| uint32_t Srv6Orch::getAggId(const NextHopGroupKey &nhg) | ||
| { | ||
| SWSS_LOG_ENTER(); | ||
| static uint32_t g_agg_id = 1; |
There was a problem hiding this comment.
instead of having static g_agg_id inside a member function, can we move this to srv6Orch object?
It will be better to use some sort of index allocator instead of looping over the indices to determine the free index. Index allocator will be better for performance.
There was a problem hiding this comment.
Fixed, changed to member "m_srv6_agg_id".
There was a problem hiding this comment.
Since there is no "index allocator" library in orch and we don't want to introduce dependency by new library, we write this simple function to get the id. And in our system level test, there is no performance issue. Is it ok to keep this function?
| { | ||
| if (!deleteSrv6Vpn(sr_nh, getAggId(it_nhg))) | ||
| { | ||
| SWSS_LOG_ERROR("Failed to delete SRV6 vpn %s", sr_nh.to_string(false, true).c_str()); |
There was a problem hiding this comment.
We can also include prefix aggId in the error log for better debugging
There was a problem hiding this comment.
Fixed, add it in "createSrv6Vpn/deleteSrv6Vpn" error log.
| void Srv6Orch::increasePrefixAggIdRefCount(const NextHopGroupKey &nhg) | ||
| { | ||
| SWSS_LOG_ENTER(); | ||
| string k = nhg.get_srv6_vpn_key(); |
There was a problem hiding this comment.
When the set of NHs are same, but the order of NHs in NHG key are different, does it have a different key? If so, we will use different prefix_agg_id. Could you please clarify this case?
There was a problem hiding this comment.
It should be treated as same key, I fixed it.
Appreciated for your review comments~
|
@prsunny @kperumalbfn |
| tunnel_map_entry_attr.value.u32 = prefix_agg_id; | ||
| tunnel_map_entry_attrs.push_back(tunnel_map_entry_attr); | ||
|
|
||
| IpAddress vpn_sid(nh.srv6_vpn_sid); |
There was a problem hiding this comment.
Do we have any sonic-utility CLI to dump these map entries? We have VLAN-->VNI, VRF-->VNI map entries under 'show vxlan'. We could have one more for SRV6 tunnel map entries.
There was a problem hiding this comment.
sure, I can add the CLI in sonic-utility after this PR merged.
@shuaishang Please check the sanity failures and update the branch. Added one comment, pls check. |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 2793 in repo sonic-net/sonic-swss |
|
there isn't any unit test code for such pr? @prsunny , what is our guidance for the unit test coverage for such pr? |
lguohan
left a comment
There was a problem hiding this comment.
please add unit test coverage to be 90%
sonic-swss tests are in a separate PR - #2766 @shuaishang It will be better to merge these two PRs. |
Agree, the test and PR must be together and in same PR. |
|
@kperumalbfn @prsunny |
@kperumalbfn @prsunny could you please help to check? any more comments? |
|
@kperumalbfn Any more comments? |
|
@shuaishang Any plan for SRV6 sonic-mgmt tests? If so, please add those PRs. |
@kperumalbfn No plan yet since the SONiC VS (linux) can't support SRv6 VPN packet yet.. |
What I did
HLD: SRv6 VPN HLD for 202305 release
Why I did it
This PR is to support SRv6 VPN functions
It depends on SAI 1.12. opencomputeproject/SAI #1744
How I verified it
pytest test_srv6.py
PS: to reduce the PR size, i created another PR #2766 for vs test.
Details if related