]> git.puffer.fish Git - mirror/frr.git/commit
lib: Add SRv6 flavors manipulation macros
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Sat, 15 Apr 2023 16:11:10 +0000 (18:11 +0200)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Mon, 11 Sep 2023 15:35:02 +0000 (17:35 +0200)
commitf26becb27ad64f10fb60e56ab60a0f4507436ef6
tree8c988b75d909a4413d8fe2fb6195de17ed52e943
parent164bcddab782fba52d57387799cfef5641bedbbf
lib: Add SRv6 flavors manipulation macros

`struct seg6local_context` contains a `struct seg6local_flavors_info`
that carries SRv6 flavors information. The `seg6local_flavors_info`
data structure contains a field `flv_ops` that indicates which flavors
are enabled for the `seg6local` nexthop. `flv_ops` is a bit-map where
each bit indicates if a particular SRv6 flavor is enabled (bit set to
1) or not (bit set to 0).

This commit defines some macros that can be used to manipulate the SRv6
flavors bit-map:
* CHECK_SRV6_FLV_OP(OPS,OP) - check if a particular flavor is enabled;
* SET_SRV6_FLV_OP(OPS,OP) - enable a particular flavor (OP);
* UNSET_SRV6_FLV_OP(OPS,OP) - disable a particular flavor (OP);
* RESET_SRV6_FLV_OP(OPS) - disable all SRv6 flavors.

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