-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add Srv6 static config HLD #1860
base: master
Are you sure you want to change the base?
Conversation
doc/srv6/srv6_static_config_hld.md
Outdated
func_len = flen ; bit length of function portion in address, default 16 | ||
arg_len = alen ; bit length of argument portion in address, default 0 | ||
action = behavior ; behaviors defined for the SID | ||
vrf = VRF_TABLE.key ; Optional, VRF name for decapsulation actions |
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.
Let add comment applicable only for UDT46. If not define default VRF will be used.
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.
added
doc/srv6/srv6_static_config_hld.md
Outdated
arg_len = alen ; bit length of argument portion in address, default 0 | ||
action = behavior ; behaviors defined for the SID | ||
vrf = VRF_TABLE.key ; Optional, VRF name for decapsulation actions | ||
adj = address, ; Optional, list of adjacencies for cross-connect actions |
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.
we can remove this as we are not planning to test it anyways. This can be extended. in future as needed.
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.
removed
doc/srv6/sonic-srv6.yang
Outdated
} | ||
|
||
leaf action { | ||
type enumeration { |
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.
This might restrict the static configuration only for the 3 types below. Is the plan to support only these 3 types for now and later extend it?
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.
Yes, currently we only plan to support these 3 types of action.
|
||
|
||
## 3.2 Bgpcfgd changes | ||
|
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.
Can you please capture the FRR configuration sample. It would be good if you can provide sonic field to FRR configuration mapping.
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 still some ongoing discussion on the details of the new FRR configuration CLI. We'd better add the config sample and mapping later.
doc/srv6/srv6_static_config_hld.md
Outdated
Specifically, there is no mechamism in SONiC allowing SDN controllers or users to directly add configuration for SRv6 without involving BGP. | ||
|
||
In this document, we first define a new **SRV6_MY_SID_TABLE** table in CONFIG_DB that serves as the configuration source of SRv6 in SONiC. | ||
Then, we design a new SRv6 Manager module in bgpcfgd to subscribe to the **SRV6_MY_SID_TABLE** table and compile changes in CONFIG_DB to changes in the configurations of FRR. |
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.
Need to mention about the sonic specific patch to support action field in FRR as by default FRR doesn't support it.
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.
I added a note
@dgsudharsan : Regarding supporting below requirement for DT46 End behavior do we need something like this in Config DB schema for MY_SID_TABLE ? We need OA to read this to create tunnel with the correct attribute. What do you suggest ?
|
``` | ||
|
||
|
||
## 3.2 Bgpcfgd changes |
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.
We're already using frrcfgd for SRv6, I would suggest to use frrcfgd for static SRv6 also for consistency, if there is any reason to use bpgcfgd, please state here.
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.
Hi Venkatsen,
The primary reason is that we don't use frrcfgd in our daily operations. Since bgpcfgd has been leveraged to do static route configuration, we think it is not inappropriate to use bgpcfgd for static SRv6 configuration.
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.
@eddieruan-alibaba FYI.
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 discuss it in Routing WG? @BYGX-wcr @venkatmahalingam @lguohan
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.
Yes, it would be helpful for the WG to understand/aware the new changes coming in for static SRv6.
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.
Azure Networking has an event tonight starting at 6pm so I am unable to join this week's routing WG meeting. May we discuss this in next week's routing WG meeting? I can start an email thread about this topic. @venkatmahalingam, may you share your email address with me?
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.
doc/srv6/srv6_static_config_hld.md
Outdated
+--rw sonic-srv6 | ||
+--rw SRV6_MY_SID | ||
| +--rw SRV6_MY_SID_LIST* [ip-address] | ||
| +--rw ip-address inet:ipv6-address |
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.
Can't we have same ipv6 address exist across VRFs? should use VRF as a key instead of field in the table?
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.
This table defines the MY_SID_LIST which should only have one instance in the current system. The VRF field is used to specify which VRF should be used for look up after the SRv6 functions decapsulates the packet. It is not used to specify which VRF the SID belongs to.
|
||
# About this Manual | ||
|
||
This document provides general information about the design of the enhancements in SONiC to support static configuration of Segmentation Routing over IPv6 protocol, which is crucial for SRv6 SDN deployment (without usage of BGP). |
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.
Are we adding support only for end-point behaviors? how about steering the traffic to SRv6 at the head-end?
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.
Yes. Right now, we only intend to add support for end-point behaviors because the traffic steering is done on the NICs in our use scenarios.
doc/srv6/sonic-srv6.yang
Outdated
|
||
leaf action { | ||
type enumeration { | ||
enum uN; |
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.
This means that you support only uSID not regular end.dt6, end.dt46..etc, correct?, we should mention clearly in the HLD that static SRv6 supports only uSID based handling now.
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.
I added a table for the current list of supported behaviors. Feel free to extend the list after you add the necessary support and tests.
doc/srv6/srv6_static_config_hld.md
Outdated
# 1 Introuduction and Scope | ||
|
||
This document describes the high-level design of the new features in SONiC to support SRv6 SDN. | ||
The new features include the addtion of a new table in CONFIG_DB to allow static configuration of SRv6 and the enhancement of bgpcfgd to program FRR with input from CONFIG_DB. |
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.
Hi @BYGX-wcr, thanks for the HLD to support SRv6 uSID static configuration.
The static SRv6 uSID configuration model in FRR as follows:
- Configure an SRv6 locator and identify its parameters (name, prefix, block-len, node-len, func-bits). The CLI for this is already in FRR mainline.
- Configure a static SRv6 SID under the SRv6 locator and identify its parameters (behavior, vrf, etc.). The CLI for this is being added in this FRR PR (Add CLI about locator and related funcs FRRouting/frr#16894)
In the current HLD, the configuration model is different and hence can’t be mapped to the current SRv6 uSID configuration model in FRR.
To resolve this, I would propose the following:
- Create a new table (SRV6_MY_LOCATOR) for the SRv6 locator config and its parameters (name, prefix, block-len, node-len, func-bits).
- In the SRV6_MY_SID_TABLE, you add the locator as new parameter for the SID. The locator parameter points to one of the locators in SRV6_MY_LOCATOR via the locator’s name. This way you can map the config to FRR config.
FRR inherits the (block-len, node-len, func-bits) of the locator and install the static SID into SONiC APPL_DB via fpm-sonic-dplane. This is already mainline in FRR and SONiC.
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.
The locator PR is added via sonic-net/sonic-buildimage#20954 to frrcfgd.
The sample config db json could be found at
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.
@ahsalam: I understand the logic being used by SRV6_MY_LOCATOR. However our current config db schema is good enough to program FRR. We do not want indirection logic using 2 different config tables. If you see in below example we have all the information to program frr. We will parse ipv6 address and extract the opcode prefix
to FRR. Keeping one table in synch with APP_DB format is easier for us.
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.
@ahsalam / @eddieruan-alibaba : We also planning to remove vrf
from config db schema as our current use case is to use SAI_MY_SID_ENTRY_ATTR_TUNNEL_ID
for uDT46 usecase. Currently Tunnel Decap Schema
SONiC/doc/decap/subnet_decap_HLD.md
Line 149 in 56a689c
### TUNNEL_DECAP_TERM_TABLE |
SAI_MY_SID_ENTRY_ATTR_VRF
.
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.
DT46 will use default VRF. Our use case is not a typical L3VPN use case.
/azp run |
No pipelines are associated with this pull request. |
/azp run |
No pipelines are associated with this pull request. |
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.
/azp run |
No pipelines are associated with this pull request. |
/azp run |
No pipelines are associated with this pull request. |
|(Negative case) add config for a SID with an unsupported action in CONFIG_DB | verify that the configuration did not get into FRR config | | ||
|delete config for a SID with uN action in CONFIG_DB | verify the locator config entry is deleted in FRR config| | ||
|delete config for a SID with uDT46 action in CONFIG_DB | verify the opcode config entry for the uDT46 action is deleted in FRR config| | ||
|
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.
@BYGX-wcr : can we add some failure UT case also. What will happen if bgpcfgd gets exception and exited ? I assume bgp/swss/syncd docker restart and everything should get reprommed but lets add the test case to confirm.
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.
Do you mean when bgpcfgd restarts, the SRv6 manager should retrieve all existing MY_SID config from CONFIG_DB and program them to FRR?
/azp run |
No pipelines are associated with this pull request. |
@abdosi @eddieruan-alibaba @venkatmahalingam @dgsudharsan @ahsalam @cscarpitta , I have updated the HLD per Routing WG's discussion |
/azp run |
No pipelines are associated with this pull request. |
/azp run |
No pipelines are associated with this pull request. |
|
||
# About this Manual | ||
|
||
This document provides general information about the design of the enhancements in SONiC to support static configuration of Segmentation Routing over IPv6 protocol, which is crucial for SRv6 SDN deployment (without usage of BGP). |
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.
Nit:
s/Segmentation Routing/Segment Routing
/azp run |
No pipelines are associated with this pull request. |
This PR proposes to add a High-level Design document for changes in SONiC to support static configuration of Segment-routing over IPv6. Besides, a YANG model specification for the new table in CONFIG_DB is also defined.
Implementation PRs: