diff options
author | Mark Stapp <mjs@voltanet.io> | 2018-09-12 20:42:03 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-09-20 00:29:55 +0200 |
commit | ea1c14f6801881b7d2e1b4035b8f085f6d663927 (patch) | |
tree | d53b21413eae16dff9403f05f965ef52786a7e2c /zebra/zebra_mpls_netlink.c | |
parent | Merge pull request #3017 from pacovn/devbuild_Wshadow_flag (diff) | |
download | frr-ea1c14f6801881b7d2e1b4035b8f085f6d663927.tar.xz frr-ea1c14f6801881b7d2e1b4035b8f085f6d663927.zip |
zebra: Create zebra_dplane.c and .h
Add first sketchy 'dplane' files.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_mpls_netlink.c')
-rw-r--r-- | zebra/zebra_mpls_netlink.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/zebra/zebra_mpls_netlink.c b/zebra/zebra_mpls_netlink.c index 245a77178..c4ab316d0 100644 --- a/zebra/zebra_mpls_netlink.c +++ b/zebra/zebra_mpls_netlink.c @@ -29,22 +29,22 @@ /* * Install Label Forwarding entry into the kernel. */ -enum dp_req_result kernel_add_lsp(zebra_lsp_t *lsp) +enum zebra_dplane_result kernel_add_lsp(zebra_lsp_t *lsp) { int ret; if (!lsp || !lsp->best_nhlfe) { // unexpected - kernel_lsp_pass_fail(lsp, DP_INSTALL_FAILURE); - return DP_REQUEST_FAILURE; + 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) ? DP_INSTALL_SUCCESS - : DP_INSTALL_FAILURE); + (!ret) ? ZEBRA_DPLANE_INSTALL_SUCCESS + : ZEBRA_DPLANE_INSTALL_FAILURE); - return DP_REQUEST_SUCCESS; + return ZEBRA_DPLANE_REQUEST_SUCCESS; } /* @@ -58,48 +58,48 @@ enum dp_req_result kernel_add_lsp(zebra_lsp_t *lsp) * through the metric field (before kernel-MPLS). This shouldn't be an issue * any longer, so REPLACE can be reintroduced. */ -enum dp_req_result kernel_upd_lsp(zebra_lsp_t *lsp) +enum zebra_dplane_result kernel_upd_lsp(zebra_lsp_t *lsp) { int ret; if (!lsp || !lsp->best_nhlfe) { // unexpected - kernel_lsp_pass_fail(lsp, DP_INSTALL_FAILURE); - return DP_REQUEST_FAILURE; + 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) ? DP_INSTALL_SUCCESS - : DP_INSTALL_FAILURE); + (!ret) ? ZEBRA_DPLANE_INSTALL_SUCCESS + : ZEBRA_DPLANE_INSTALL_FAILURE); - return DP_REQUEST_SUCCESS; + return ZEBRA_DPLANE_REQUEST_SUCCESS; } /* * Delete Label Forwarding entry from the kernel. */ -enum dp_req_result kernel_del_lsp(zebra_lsp_t *lsp) +enum zebra_dplane_result kernel_del_lsp(zebra_lsp_t *lsp) { int ret; if (!lsp) { // unexpected - kernel_lsp_pass_fail(lsp, DP_DELETE_FAILURE); - return DP_REQUEST_FAILURE; + 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, DP_DELETE_FAILURE); - return DP_REQUEST_FAILURE; + 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) ? DP_DELETE_SUCCESS - : DP_DELETE_FAILURE); + (!ret) ? ZEBRA_DPLANE_DELETE_SUCCESS + : ZEBRA_DPLANE_DELETE_FAILURE); - return DP_REQUEST_SUCCESS; + return ZEBRA_DPLANE_REQUEST_SUCCESS; } int mpls_kernel_init(void) |