summaryrefslogtreecommitdiff
path: root/isisd/isis_srv6.c
AgeCommit message (Collapse)Author
2025-01-18lib, isisd: Move DEFAULT_SRV6_IFNAME to global srv6.h headerYuqing Zhao
This commit moves DEFAULT_SRV6_IFNAME from isis_srv6.h to srv6.h because there are other daemons that might want to use it (e.g. staticd). Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2024-09-01*: Create termtable specific temp memoryDonald Sharp
When trying to track down a MTYPE_TMP memory leak it's harder to search for it when you happen to have some usage of ttable_dump. Let's just give it it's own memory type so that we can avoid confusion in the future. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-06-18isisd: Cleanup related to SRv6Carmine Scarpitta
Remove unused SRv6 code. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-06-18isisd: Release SRv6 SIDs to SID ManagerCarmine Scarpitta
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>
2024-06-18isisd: Request SRv6 SIDs to SID ManagerCarmine Scarpitta
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>
2024-06-18isisd: Deal with SRv6 locator instead of chunkCarmine Scarpitta
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>
2024-04-22isisd: fix renaming backup define for ENDX SIDPhilippe Guibert
The define has inheritated from a wrong naming in sr-mpls. Fix this by renaming ISIS_SRV6_LAN_BACKUP to ISIS_SRV6_ADJ_BACKUP. Fixes: 2566656a6f50 ("isisd: Add data structure for SRv6 Adjacency SIDs") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-11-03isisd: Fix style warnings reported by CICarmine Scarpitta
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2023-11-03isisd: Fix openfabric crashCarmine Scarpitta
`isis_srv6_area_init` should not use `yang_get_default_*` functions for fabricd. Fixes: https://github.com/FRRouting/frr/issues/14722 Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2023-09-11isisd: Make SRv6 interface configurableCarmine Scarpitta
Add CLI command and functions to configure the interface used for installing SRv6 SIDs into Linux data plane Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Make SRv6 Node MSDs customizableCarmine Scarpitta
Add CLI commands to customize SRv6 Node MSD values. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Initialize/free SRv6 adjacency SIDs listCarmine Scarpitta
Initialize/free SRv6 adjacency SIDs list when an IS-IS area is created/destroyed. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Extend `sid_exist` to consider adj SIDsCarmine Scarpitta
The function `sid_exist` verifies if a given SRv6 SID has already been allocated for a given IS-IS area. This commit extends `sid_exist` to also consider adjacency SIDs when checking for the existence of the SID. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add support for SRv6 Adjacency SIDsCarmine Scarpitta
An SRv6 adjacency SID is a SID that is associated with a particular adjacency. Adjacency SIDs are advertised using the SRv6 End.X SID Sub-TLV (RFC 9352 section #8.1) or SRv6 LAN End.X SID Sub-TLV (RFC 9352 section #8.2). This commit defines the following Adj SIDs management functions: * srv6_endx_sid_add_single: add a new SRv6 Adjacency SID * srv6_endx_sid_del: delete an SRv6 Adjacency SID * isis_srv6_endx_sid_find: lookup SRv6 End.X SID by type It also attaches some callbacks to the hooks isis_adj_state_change_hook, isis_adj_ip_enabled_hook, isis_adj_ip_disabled_hook, which are responsible for installing/removing an SRv6 Adjacency SID automatically when the state of an IS-IS adjacency changes. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add func to fill in SID Struct Sub-Sub-TLVCarmine Scarpitta
Add a function to fill in an SRv6 SID Structure Sub-Sub-TLV with information from an SRv6 SID (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add func to fill in an SRv6 End SID Sub-TLVCarmine Scarpitta
Add a function to fill in an SRv6 End SID Sub-TLV with information from an SRv6 End SID (RFC 9352 section #7.2). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add function to fill in an SRv6 Locator TLVCarmine Scarpitta
Add a function to fill in an SRv6 Locator TLV with information from an SRv6 locator (RFC 9352 section #7.1). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Remove SRv6 End SIDs after locator unsetCarmine Scarpitta
When an SRv6 locator is unset, remove all the SRv6 End SIDs allocated from that locator. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add function to allocate an SRv6 SIDCarmine Scarpitta
Add a function to allocate an SRv6 SID from an SRv6 locator chunk owned by IS-IS. The chunk must be allocated by a previous call to `isis_zebra_srv6_manager_get_locator_chunk()`. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add SRv6 SIDs to SRv6 configurationCarmine Scarpitta
Add the list of SRv6 SIDs allocated by the IS-IS instance to the per-area SRv6 configuration. The list is area-specific. Each IS-IS area has its own SRv6 SIDs list. The list is initialized when an IS-IS area is created and freed when an IS-IS area is destroyed. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add function to free an SRv6 SIDCarmine Scarpitta
Add a function to free an SRv6 SID. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add new memtype for IS-IS SRv6 SIDCarmine Scarpitta
Define a new memtype `MTYPE_ISIS_SRV6_SID` used to allocate objects of type `IS-IS SRv6 SID`. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add func to unset the SRv6 locatorCarmine Scarpitta
Add a function to unset the SRv6 locator for a specific IS-IS area. This function calls `isis_zebra_srv6_manager_release_locator_chunk()` to ask zebra to release the locator chunk owned by IS-IS and removes the chunk from the area's chunks list. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add SRv6 locator chunks to SRv6 configCarmine Scarpitta
Add a list of SRv6 locator chunks allocated to a specific IS-IS area. The list is initialized when the IS-IS area is created and freed when the IS-IS area is destroyed. Subsequent commits will introduce the possibility to allocate and release locator chunks. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11isisd: Add CLI command to show SRv6 node infoCarmine Scarpitta
Add a CLI command to print SRv6 capabilities, algorithms and MSDs supported by the IS-IS nodes. Example: r1# show isis segment-routing srv6 node Area FOO: IS-IS L1 SRv6-Nodes: IS-IS L2 SRv6-Nodes: System ID Algorithm SRH Max SL SRH Max End Pop SRH Max H.encaps SRH Max End D ----------------------------------------------------------------------------------------- 1111.1111.1111 SPF 16 0 1 2 2222.2222.2222 SPF 16 0 1 2 Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Add support for SRv6 MSDsCarmine Scarpitta
Add Maximum SRv6 SID Depths (MSDs) parameters as per RFC 9352 section #4 to the per-area IS-IS SRv6 Data Base. Currently the MSD values are hardcoded. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Add function to terminate the SRv6 moduleCarmine Scarpitta
`isis_srv6_area_term()` cleans up SRv6 information for a specific IS-IS area. This commit adds a new function `isis_srv6_term()` that will be used to perform global SRv6 cleanup. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Add function to initialize the SRv6 moduleCarmine Scarpitta
`isis_srv6_area_init()` initializes SRv6 information for a specific IS-IS area. This commit adds a new function `isis_srv6_init()` that will be used to perform global SRv6 initialization. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Init SRv6 enabled flag to its default valueCarmine Scarpitta
When SRv6 is initialized on a given IS-IS area, set the administrative enabled status to the default value defined by the YANG model. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Add func to terminate SRv6 for a given areaCarmine Scarpitta
Add function to terminate SRv6 for a given IS-IS area. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Add function to initialize SRv6 DBCarmine Scarpitta
Add function to initialize per-area SRv6 DB (`area->srv6db`). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04isisd: Add isis_srv6.[c, h] filesCarmine Scarpitta
Add `isis_srv6.c` and `isis_srv6.h` files needed to support SRv6 in IS-IS (as per RFC 9352). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>