Skip to content
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

isisd: Extend IS-IS to communicate with the SRv6 SID Manager to allocate/release SRv6 SIDs #15677

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

cscarpitta
Copy link
Contributor

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 IS-IS daemon to communicate with the SRv6 SID Manager to allocate/release SRv6 SIDs.

@frrbot frrbot bot added the isis label Apr 3, 2024
@cscarpitta cscarpitta changed the title isisd: Extend BGP to communicate with the SRv6 SID Manager to allocate/release SRv6 SIDs isisd: Extend IS-IS to communicate with the SRv6 SID Manager to allocate/release SRv6 SIDs Apr 3, 2024
int isis_zebra_srv6_manager_connect(void)
{
/* Connect to label manager. */
if (zclient_sync->sock <= 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean sid manager ? comment is wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pguibert6WIND

Thanks for the review.

Based on the feedback of the community, I have updated the SID Manager to make the API asynchronous. So, this function no longer exists.

}

sr_debug("ISIS-SRv6: Successfully connected to the SRv6 Manager");

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the internal code is not sending an SRV6 message kind.
This kind of API can be used for whatever manager, be it SRv6 or MPLS.
Can we rename isis_zebra_srv6_manager_xxx to isis_zebra_sid_manager_ready (as the sync socket is dedicated to mpls labels already)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the feedback of the community, I have updated the SID Manager to make the API asynchronous. So, this function no longer exists.

@riw777 riw777 self-requested a review April 9, 2024 14:28
@github-actions github-actions bot added size/XXL and removed size/XL labels May 3, 2024
@frrbot frrbot bot added the libfrr label May 8, 2024
@cscarpitta cscarpitta force-pushed the isis-srv6-sid-manager branch 3 times, most recently from 26384be to f0f3d86 Compare May 8, 2024 16:26
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>
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>
Add an API to request information from the SRv6 SID Manager (zebra)
regarding a specific SRv6 locator.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Add an API to get/release SRv6 SIDs through the SRv6 SID Manager.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Currently, when SRv6 is enabled in IS-IS, IS-IS requests a locator chunk
from Zebra. Zebra assigns a locator chunk to IS-IS, and then IS-IS 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 IS-IS to use the new SRv6 API. In particular, it
removes the chunk throughout the IS-IS code and modifies IS-IS to
request/save/advertise the locator instead of the chunk.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Add a new function to copy an SRv6 locator.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
This commit extends IS-IS to process locator information received from
SRv6 Manager (zebra) and save the locator info in the SRv6 database.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Currently, IS-IS 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 IS-IS to request SIDs from Zebra instead of
allocating the SIDs on its own.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Currently, IS-IS 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 IS-IS to release SIDs to Zebra when they are no
longer needed.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
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 IS-IS
routers.

If the notification indicates that an operation has failed, it logs the
error.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Remove unused SRv6 code.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Recently, the implementation of SRv6 in Zebra has been improved.
Consequently, now the SRv6 Manager (Zebra) assigns different SIDs. This
commit modifies the SRv6 topotests to ensure that the topotest expects
the SIDs that SRv6 Manager actually assigns.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants