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 support for SRv6 SID Manager #15604
base: master
Are you sure you want to change the base?
Conversation
4008b0a
to
e308339
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
e308339
to
879e795
Compare
879e795
to
0c54998
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.
Documentation is missing yet. Another question: is this similar to the label allocation manager (synchronous)?
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
6a21fe3
to
19ce93d
Compare
there are some address sanitizer error : https://ci1.netdef.org/browse/FRR-PULLREQ3-3112/artifact/ASAN7/AddressSanitizerError/AddressSanitzer.txt , and it seems related to your dev. |
19ce93d
to
a76e142
Compare
@pguibert6WIND Thanks for the review. I fixed the errors reported by address sanitizer. |
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 think we'll need topo tests for this one (?) ... other than that, the code looks fine
@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). Please note, originally the SID manager, client daemon extension (BGP, IS-IS) and the topotest were in a single PR. |
a76e142
to
3b4977f
Compare
Add functionalities to manage SRv6 SID formats (allocate / free / register / unregister / lookup) and create two SID formats upon SRv6 Manager initialization: `uncompressed` and `usid-f3216`. In future commits, we will add the CLI to allow the user to choose between the two formats. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Add CLI commands to support overriding default configuration of the SID format. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Add CLI commands to support overriding default configuration of the SID format. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Add CLI commands to support overriding default configuration of the SID format. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
An SRv6 block is an IPv6 prefix from which SIDs are allocated. This commit adds support for SRv6 SID blocks. Specifically, it adds a data structure to store information about an SRv6 block (e.g., its occupancy status, which SIDs have been allocated and which are available, which SID format is used for that block, etc.). It also adds some functions to manage the block (allocate / free / lookup). These functions will be used in the next commits to support the allocation of SIDs from a block in the SID Manager. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Add the CLI to choose the SID format of a locator. When the SID format of a locator is changed, the SIDs allocated from that locator might no longer be valid (for example, because the new format might involve a different SID allocation schema). In such a case, it is necessary to notify all the zclients so that they can withdraw/uninstall the old SIDs that use the previous format and allocate/install/advertise the new SIDs based on the new format. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Add a data structure to represent an SRv6 SID context and the related management functions (allocate/free). Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Add a data structure to represent an SRv6 SID context and the related management functions (allocate/free). Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Add a new ZAPI operation, ZEBRA_SRV6_MANAGER_GET_LOCATOR, which allows a daemon to request information about a specific locator from the SRv6 SID Manager. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Add two new ZAPI operations: `ZEBRA_SRV6_MANAGER_GET_SRV6_SID` and `ZEBRA_SRV6_MANAGER_RELEASE_SRV6_SID`. These APIs allow a daemon to get and release an SRv6 SID, respectively. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Include block/node/function/argument lengthi when encoding/decoding an SRv6 locator. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
The previous commits introduced a new operation, `ZEBRA_SRV6_MANAGER_GET_LOCATOR`, allowing a daemon to request information about a specific SRv6 locator from the SRv6 SID Manager. This commit extends the SID Manager to respond to a `ZEBRA_SRV6_MANAGER_GET_LOCATOR` request and provide the requested locator information. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Add functions to allocate/release SRv6 SIDs. SIDs can be allocated either explicitly (allocate a specific SID) or dynamically (allocate any available SID). Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Previous commits introduced two new ZAPI operations, `ZEBRA_SRV6_MANAGER_GET_SRV6_SID` and `ZEBRA_SRV6_MANAGER_RELEASE_SRV6_SID`. These operations allow a daemon to interact with the SRv6 SID Manager to get and release an SRv6 SID, respectively. This commit extends the SID Manager by adding logic to process the requests `ZEBRA_SRV6_MANAGER_GET_SRV6_SID` and `ZEBRA_SRV6_MANAGER_RELEASE_SRV6_SID`, and allocate/release SIDs to requesting daemons. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Add a new ZAPI command `ZEBRA_SRV6_SID_NOTIFY` used by zebra to send asynchronous SRv6 SIDs notifications to zclients. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Send asynchronous notifications to zclients when an SRv6 SID is allocated/released and when a SID alloc/release operation fails. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Currently, when a locator is deleted in zebra, zebra notifies only the zclient that owns the locator. With the introduction of SID Manager, the locator is no longer owned by any client. Instead, the locator is owned by Zebra, and clients can allocate and release SIDs from the locator using the ZAPI ZEBRA_SRV6_MANAGER_GET_SID and ZEBRA_SRV6_MANAGER_RELEASE_SID. Therefore, when a locator is removed in Zebra, we need to notify all daemons so that they can release/uninstall the SIDs allocated by that locator. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
3b4977f
to
36bafce
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.
looks good
In the current FRR implementation, the SRv6 locator can only be used by one client at a time. This PR adds support for 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. The SID manager allows the SRv6 Locator to be shared among many clients such as IS-IS, BGP and others. The PR extends the BGP, IS-IS daemons to communicate with the SRv6 SID Manager to allocate/release SRv6 SIDs.
The SID Manager supports two SRv6 SID allocation schemes: