diff options
| author | Sebastien Merle <sebastien@netdef.org> | 2020-07-20 13:43:54 +0200 |
|---|---|---|
| committer | Sebastien Merle <sebastien@netdef.org> | 2020-08-07 11:08:49 +0200 |
| commit | 31f937fb43f4920d14de6193de440279fbd5d99e (patch) | |
| tree | 166a67318cfb4177398a40baca7d8fb4029fd10b /lib/nexthop.h | |
| parent | b112b1abb4c9b9d4b234b46b1db05de9293a48ef (diff) | |
lib, zebra: Add SR-TE policy infrastructure to zebra
For the sake of Segment Routing (SR) and Traffic Engineering (TE)
Policies there's a need for additional infrastructure within zebra.
The infrastructure in this PR is supposed to manage such policies
in terms of installing binding SIDs and LSPs. Also it is capable of
managing MPLS labels using the label manager, keeping track of
nexthops (for resolving labels) and notifying interested parties about
changes of a policy/LSP state. Further it enables a route map mechanism
for BGP and SR-TE colors such that learned BGP routes can be mapped
onto SR-TE Policies.
This PR does not introduce any usable features by now, it is just
infrastructure for other upcoming PRs which will introduce 'pathd',
a new SR-TE daemon.
Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
Diffstat (limited to 'lib/nexthop.h')
| -rw-r--r-- | lib/nexthop.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h index ed40cc7eed..cadcea1f41 100644 --- a/lib/nexthop.h +++ b/lib/nexthop.h @@ -98,6 +98,7 @@ struct nexthop { */ #define NEXTHOP_FLAG_RNH_FILTERED (1 << 5) /* rmap filtered, used by rnh */ #define NEXTHOP_FLAG_HAS_BACKUP (1 << 6) /* Backup nexthop index is set */ +#define NEXTHOP_FLAG_SRTE (1 << 7) /* SR-TE color used for BGP traffic */ #define NEXTHOP_IS_ACTIVE(flags) \ (CHECK_FLAG(flags, NEXTHOP_FLAG_ACTIVE) \ @@ -141,6 +142,9 @@ struct nexthop { union { vni_t vni; } nh_encap; + + /* SR-TE color used for matching SR-TE policies */ + uint32_t srte_color; }; /* Utility to append one nexthop to another. */ |
