]> git.puffer.fish Git - mirror/frr.git/commit
lib: Add SRv6 flavors info to `seg6local` nexthop
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Mon, 20 Mar 2023 18:05:18 +0000 (19:05 +0100)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Mon, 11 Sep 2023 15:35:02 +0000 (17:35 +0200)
commit164bcddab782fba52d57387799cfef5641bedbbf
tree351aaa899e4740d433eeb6666da860c81aca7dd6
parentbf386acb93a1ceb8567734489378069c0732cd75
lib: Add SRv6 flavors info to `seg6local` nexthop

The RFC 8986 defines the SRv6 Network Programming concept and specifies
the base set of SRv6 behaviors that enables the creation of
interoperable overlays with underlay optimization. In addition, the RFC
8986 introduces the concept of "flavors", additional operations that can
modify or extend the existing SRv6 behaviors.

In the Linux kernel and in FRR, an SRv6 SID is implemented as a route
associated with a `seg6local` nexthop. A `seg6local` nexthop represents
an SRv6 behavior bound to a SID.

The Linux kernel already supports the ability to add a set of flavors
to a `seg6local` nexthop to modify or extend the associated behavior.

This commit aligns the `seg6local` nexthop implementation of FRR to the
Linux kernel. It extends the `seg6local` nexthop implementation by
adding a struct `seg6local_flavors_info` that encodes the SRv6
flavors information.

Currently, the `seg6local_flavors_info` data structure has three
members:
- `tlv_ops` indicates which flavors are enabled for the `seg6local`
  nexthop;
- `lcblock_len`is the length of the Locator-Block part of the SID;
- `lcnode_func_len` is the length of the combined Node and Function
  parts of the SID.

`lcblock_len` and `lcnode_func_len` define the SID structure. They are
required for some behaviors (e.g. NEXT-C-SID and REPLACE-C-SID). For
other flavors (e.g. PSP, USP, USD) these parameters are not required and
can be omitted.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
lib/srv6.h