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

Merged
merged 10 commits into from
Jul 2, 2024

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
@cscarpitta cscarpitta force-pushed the isis-srv6-sid-manager branch from fd8f752 to b8d6e76 Compare May 3, 2024 14:58
@github-actions github-actions bot added size/XXL and removed size/XL labels May 3, 2024
@cscarpitta cscarpitta force-pushed the isis-srv6-sid-manager branch from b8d6e76 to 0b6ee2e Compare May 8, 2024 15:28
@frrbot frrbot bot added the libfrr label May 8, 2024
@cscarpitta cscarpitta force-pushed the isis-srv6-sid-manager branch 5 times, most recently from 5e3c023 to 888816b Compare May 10, 2024 17:07
@cscarpitta cscarpitta force-pushed the isis-srv6-sid-manager branch 2 times, most recently from 98a2d1e to 558c93a Compare June 7, 2024 10:46
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Add an API to request information from the SRv6 SID Manager (zebra)
regarding a specific SRv6 locator.

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]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[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 IS-IS
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]>
The locator is no longer split in multiple chunks.

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]>
@cscarpitta
Copy link
Contributor Author

@riw777 I rebased the PR based on the merged SID manager. Can you please take a look?

Copy link
Contributor

@dmytroshytyi-6WIND dmytroshytyi-6WIND left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

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

looks good

@riw777 riw777 merged commit 410947f into FRRouting:master Jul 2, 2024
10 checks passed
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.

4 participants