summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_mpls_netlink.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2018-11-26 22:08:55 +0100
committerMark Stapp <mjs@voltanet.io>2019-01-22 21:07:24 +0100
commitfc60837278118e1475d49b5c32a0ae6a528073a5 (patch)
tree4f91658a5ef84cf6016d39a6867a253795140644 /zebra/zebra_mpls_netlink.c
parentzebra: remove use of sync LSP update apis (diff)
downloadfrr-fc60837278118e1475d49b5c32a0ae6a528073a5.tar.xz
frr-fc60837278118e1475d49b5c32a0ae6a528073a5.zip
zebra: openbsd LSP update code
Finish the LSP update code for the async dataplane for the openbsd platform. Remove synch apis now that we've converted to the async code path. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_mpls_netlink.c')
-rw-r--r--zebra/zebra_mpls_netlink.c74
1 files changed, 1 insertions, 73 deletions
diff --git a/zebra/zebra_mpls_netlink.c b/zebra/zebra_mpls_netlink.c
index 63f518ffc..d8b5ef4ce 100644
--- a/zebra/zebra_mpls_netlink.c
+++ b/zebra/zebra_mpls_netlink.c
@@ -28,78 +28,6 @@
#include "zebra/zebra_mpls.h"
/*
- * Install Label Forwarding entry into the kernel.
- */
-enum zebra_dplane_result kernel_add_lsp(zebra_lsp_t *lsp)
-{
- int ret;
-
- if (!lsp || !lsp->best_nhlfe) { // unexpected
- kernel_lsp_pass_fail(lsp, ZEBRA_DPLANE_INSTALL_FAILURE);
- return ZEBRA_DPLANE_REQUEST_FAILURE;
- }
-
- ret = netlink_mpls_multipath(RTM_NEWROUTE, lsp);
-
- kernel_lsp_pass_fail(lsp,
- (!ret) ? ZEBRA_DPLANE_INSTALL_SUCCESS
- : ZEBRA_DPLANE_INSTALL_FAILURE);
-
- return ZEBRA_DPLANE_REQUEST_SUCCESS;
-}
-
-/*
- * Update Label Forwarding entry in the kernel. This means that the Label
- * forwarding entry is already installed and needs an update - either a new
- * path is to be added, an installed path has changed (e.g., outgoing label)
- * or an installed path (but not all paths) has to be removed. This performs
- * a REPLACE operation, internally.
- */
-enum zebra_dplane_result kernel_upd_lsp(zebra_lsp_t *lsp)
-{
- int ret;
-
- if (!lsp || !lsp->best_nhlfe) { // unexpected
- kernel_lsp_pass_fail(lsp, ZEBRA_DPLANE_INSTALL_FAILURE);
- return ZEBRA_DPLANE_REQUEST_FAILURE;
- }
-
- ret = netlink_mpls_multipath(RTM_NEWROUTE, lsp);
-
- kernel_lsp_pass_fail(lsp,
- (!ret) ? ZEBRA_DPLANE_INSTALL_SUCCESS
- : ZEBRA_DPLANE_INSTALL_FAILURE);
-
- return ZEBRA_DPLANE_REQUEST_SUCCESS;
-}
-
-/*
- * Delete Label Forwarding entry from the kernel.
- */
-enum zebra_dplane_result kernel_del_lsp(zebra_lsp_t *lsp)
-{
- int ret;
-
- if (!lsp) { // unexpected
- kernel_lsp_pass_fail(lsp, ZEBRA_DPLANE_DELETE_FAILURE);
- return ZEBRA_DPLANE_REQUEST_FAILURE;
- }
-
- if (!CHECK_FLAG(lsp->flags, LSP_FLAG_INSTALLED)) {
- kernel_lsp_pass_fail(lsp, ZEBRA_DPLANE_DELETE_FAILURE);
- return ZEBRA_DPLANE_REQUEST_FAILURE;
- }
-
- ret = netlink_mpls_multipath(RTM_DELROUTE, lsp);
-
- kernel_lsp_pass_fail(lsp,
- (!ret) ? ZEBRA_DPLANE_DELETE_SUCCESS
- : ZEBRA_DPLANE_DELETE_FAILURE);
-
- return ZEBRA_DPLANE_REQUEST_SUCCESS;
-}
-
-/*
* LSP forwarding update using dataplane context information.
*/
enum zebra_dplane_result kernel_lsp_update(struct zebra_dplane_ctx *ctx)
@@ -125,7 +53,7 @@ enum zebra_dplane_result kernel_lsp_update(struct zebra_dplane_ctx *ctx)
/* Invalid op? */
goto done;
- ret = netlink_mpls_multipath_ctx(cmd, ctx);
+ ret = netlink_mpls_multipath(cmd, ctx);
done: