From ea6b290bf6a29aa06888c93dae9bec4581ce686f Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Thu, 8 Aug 2019 15:57:13 -0300 Subject: lib, zebra: add new MPLS zapi message with route replace semantics This new message makes it possible to install/reinstall LSPs with multiple nexthops using a single ZAPI message. Signed-off-by: Renato Westphal --- zebra/zebra_mpls.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'zebra/zebra_mpls.h') diff --git a/zebra/zebra_mpls.h b/zebra/zebra_mpls.h index e8ab46a8d8..157f43ca98 100644 --- a/zebra/zebra_mpls.h +++ b/zebra/zebra_mpls.h @@ -272,6 +272,13 @@ int mpls_ftn_update(int add, struct zebra_vrf *zvrf, enum lsp_types_t type, union g_addr *gate, ifindex_t ifindex, uint8_t route_type, unsigned short route_instance, mpls_label_t out_label); +/* + * Uninstall all NHLFEs bound to a single FEC. + */ +int mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type, + struct prefix *prefix, uint8_t route_type, + unsigned short route_instance); + /* * Install/update a NHLFE for an LSP in the forwarding table. This may be * a new LSP entry or a new NHLFE for an existing in-label or an update of @@ -291,10 +298,10 @@ int mpls_lsp_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type, union g_addr *gate, ifindex_t ifindex); /* - * Uninstall all LDP NHLFEs for a particular LSP forwarding entry. - * If no other NHLFEs exist, the entry would be deleted. + * Uninstall all NHLFEs for a particular LSP forwarding entry. */ -void mpls_ldp_lsp_uninstall_all(struct hash_bucket *bucket, void *ctxt); +int mpls_lsp_uninstall_all_vrf(struct zebra_vrf *zvrf, enum lsp_types_t type, + mpls_label_t in_label); /* * Uninstall all Segment Routing NHLFEs for a particular LSP forwarding entry. -- cgit v1.2.3