-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bgpd: Extend BGP to communicate with the SRv6 SID Manager to allocate/release SRv6 SIDs #15676
Conversation
025a328
to
1426639
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
1426639
to
eea365a
Compare
eea365a
to
8a0bf18
Compare
8a0bf18
to
a1d9830
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
1 similar comment
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
a1d9830
to
ad2698a
Compare
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.
one really minor nit ... code looks okay to me, but it would be good to have @mjstapp at least look at the zebra bits as well
ad2698a
to
9b6ec7c
Compare
817303e
to
403d544
Compare
c6de540
to
5415f9c
Compare
@riw777 Many thanks for the review. I rebased the PR based on the merged SID manager. Can you please take a look again? |
3c6900e
to
7c2a296
Compare
ci:retry unrelated OSPF failure |
@cscarpitta , It was first mentioned in the topotest to better describe the context. Thanks |
Thanks for the comment. In this PR, we report issue in the FRR log when the user tries to allocate a SID function that is out of the valid range. I plan to submit also another PR to reject the configuration and notify the user. |
ci:retry unrelated ospf topotest failure |
Could you please create the new PR-placeholder ("to reject the configuration and notify the user) and cross-reference the two? |
ci:retry unrelated test failures |
7c2a296
to
cabe2ca
Compare
I suspect we're going to want a new topotest to cover this addition ... if it's possible to create one. @ton31337 thoughts? |
Hi @riw777 Many thanks for the review. We have another PR with the topotest (#15679). The topotest extensively tests the SID manager and the interaction with the client daemons (BGP, IS-IS). Originally the SID manager, client daemon extension (BGP, IS-IS) and the topotest were in a single PR. |
I'm kindof waiting on #15679 to pass before pushing this ... |
cabe2ca
to
ecbe55d
Compare
ci:retry CI failure is not related, rerunning |
Add an API to request information from the SRv6 SID Manager (zebra) regarding a specific SRv6 locator. Signed-off-by: Carmine Scarpitta <[email protected]>
Currently, when SRv6 is enabled in BGP, BGP requests a locator chunk from Zebra. Zebra assigns a locator chunk to BGP, and then BGP can allocate SIDs from the locator chunk. Recently, the implementation of SRv6 in Zebra has been improved, and a new API has been introduced for obtaining/releasing the SIDs. Now, the daemons no longer need to request a chunk. Instead, the daemons interact with Zebra to obtain information about the locator and subsequently to allocate/release the SIDs. This commit extends BGP to use the new SRv6 API. In particular, it removes the chunk throughout the BGP code and modifies BGP to request/save/advertise the locator instead of the chunk. Signed-off-by: Carmine Scarpitta <[email protected]>
This commit extends BGP to process locator information received from SRv6 Manager (zebra) and save the locator info in the SRv6 database. Signed-off-by: Carmine Scarpitta <[email protected]>
Add an API to get/release SRv6 SIDs through the SRv6 SID Manager. Signed-off-by: Carmine Scarpitta <[email protected]>
When SRv6 VPN is unconfigured in BGP, BGP needs to interact with SID Manager to release the SID and make it available to other daemons Signed-off-by: Carmine Scarpitta <[email protected]>
Currently, BGP allocates SIDs without interacting with Zebra. Recently, the SRv6 implementation has been improved. Now, the daemons need to interact with Zebra through ZAPI to obtain and release SIDs. This commit extends BGP to request SIDs from Zebra instead of allocating the SIDs on its own. Signed-off-by: Carmine Scarpitta <[email protected]>
Make the `sid_register()` function non-static to allow other BGP modules (e.g. bgp_zebra.c) to register SIDs. Signed-off-by: Carmine Scarpitta <[email protected]>
Zebra sends a `SRV6_SID_NOTIFY` notification to inform clients about the result of a SID alloc/release operation. This commit adds a handler to process a `SRV6_SID_NOTIFY` notification received from zebra. If the notification indicates that a SID allocation operation was successful, then it stores the allocated SID in the SRv6 database, installs the SID into the RIB, and advertises the SID to the other BGP routers. If the notification indicates that an operation has failed, it logs the error. Signed-off-by: Carmine Scarpitta <[email protected]>
Remove unused SRv6 code. Signed-off-by: Carmine Scarpitta <[email protected]>
In the near future, some daemons may only register SIDs. This may be the case for the pathd daemon when creating SRv6 binding SIDs. When a locator is getting deleted at ZEBRA level, the daemon may have an easy way to find out the SIds to unregister to. This commit proposes to add the locator name to the SID_SRV6_NOTIFY message whenever possible. Only case when an allocation failure happens, the locator will not be present. In all other places, the notify API at procol levels has the locator name extra-parameter. Signed-off-by: Philippe Guibert <[email protected]> Signed-off-by: Carmine Scarpitta <[email protected]>
ecbe55d
to
f686609
Compare
ci:retry |
This commit brings PR FRRouting/frr#15676 from FRR mainline to SONiC bgpd: Extend BGP to communicate with the SRv6 SID Manager to allocate/release SRv6 SIDs FRRouting/frr#15676 Signed-off-by: cscarpitta <[email protected]>
This commit brings PR FRRouting/frr#15676 from FRR mainline to SONiC bgpd: Extend BGP to communicate with the SRv6 SID Manager to allocate/release SRv6 SIDs FRRouting/frr#15676 Signed-off-by: cscarpitta <[email protected]>
PR #15604 introduces the SRv6 SID Manager, a zebra component responsible for SID allocation/management. The SRv6 SID Manager exposes a SID allocation/release APIs, allowing clients to request and release an SRv6 SID.
This PR extends the BGP daemon to communicate with the SRv6 SID Manager to allocate/release SRv6 SIDs.