mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 07:37:29 +00:00
zebra: Remove unused return codes in zebra_mpls.c
There are some return codes for functions that are not really used. Clean them up. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
a310ebc114
commit
1548fbbc44
@ -2492,7 +2492,6 @@ static void zread_mpls_labels_add(ZAPI_HANDLER_ARGS)
|
|||||||
{
|
{
|
||||||
struct stream *s;
|
struct stream *s;
|
||||||
struct zapi_labels zl;
|
struct zapi_labels zl;
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* Get input stream. */
|
/* Get input stream. */
|
||||||
s = msg;
|
s = msg;
|
||||||
@ -2510,12 +2509,7 @@ static void zread_mpls_labels_add(ZAPI_HANDLER_ARGS)
|
|||||||
if (zapi_labels_validate(&zl) < 0)
|
if (zapi_labels_validate(&zl) < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ret = mpls_zapi_labels_process(true, zvrf, &zl);
|
mpls_zapi_labels_process(true, zvrf, &zl);
|
||||||
if (ret < 0) {
|
|
||||||
if (IS_ZEBRA_DEBUG_RECV)
|
|
||||||
zlog_debug("%s: Error processing zapi request",
|
|
||||||
__func__);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2532,7 +2526,6 @@ static void zread_mpls_labels_delete(ZAPI_HANDLER_ARGS)
|
|||||||
{
|
{
|
||||||
struct stream *s;
|
struct stream *s;
|
||||||
struct zapi_labels zl;
|
struct zapi_labels zl;
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* Get input stream. */
|
/* Get input stream. */
|
||||||
s = msg;
|
s = msg;
|
||||||
@ -2547,12 +2540,7 @@ static void zread_mpls_labels_delete(ZAPI_HANDLER_ARGS)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (zl.nexthop_num > 0) {
|
if (zl.nexthop_num > 0) {
|
||||||
ret = mpls_zapi_labels_process(false /*delete*/, zvrf, &zl);
|
mpls_zapi_labels_process(false /*delete*/, zvrf, &zl);
|
||||||
if (ret < 0) {
|
|
||||||
if (IS_ZEBRA_DEBUG_RECV)
|
|
||||||
zlog_debug("%s: Error processing zapi request",
|
|
||||||
__func__);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
mpls_lsp_uninstall_all_vrf(zvrf, zl.type, zl.local_label);
|
mpls_lsp_uninstall_all_vrf(zvrf, zl.type, zl.local_label);
|
||||||
|
|
||||||
|
@ -2747,7 +2747,7 @@ static bool ftn_update_nexthop(bool add_p, struct nexthop *nexthop,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
void mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
||||||
struct prefix *prefix, uint8_t route_type,
|
struct prefix *prefix, uint8_t route_type,
|
||||||
unsigned short route_instance)
|
unsigned short route_instance)
|
||||||
{
|
{
|
||||||
@ -2761,7 +2761,7 @@ int mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
|||||||
/* Lookup table. */
|
/* Lookup table. */
|
||||||
table = zebra_vrf_table(afi, SAFI_UNICAST, zvrf_id(zvrf));
|
table = zebra_vrf_table(afi, SAFI_UNICAST, zvrf_id(zvrf));
|
||||||
if (!table)
|
if (!table)
|
||||||
return -1;
|
return;
|
||||||
|
|
||||||
/* Lookup existing route */
|
/* Lookup existing route */
|
||||||
rn = route_node_get(table, prefix);
|
rn = route_node_get(table, prefix);
|
||||||
@ -2772,7 +2772,7 @@ int mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (re == NULL)
|
if (re == NULL)
|
||||||
return -1;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Nexthops are now shared by multiple routes, so we have to make
|
* Nexthops are now shared by multiple routes, so we have to make
|
||||||
@ -2801,8 +2801,6 @@ int mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
|||||||
zebra_nhg_free(new_nhe);
|
zebra_nhg_free(new_nhe);
|
||||||
|
|
||||||
rib_queue_add(rn);
|
rib_queue_add(rn);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2884,7 +2882,7 @@ static bool ftn_update_znh(bool add_p, enum lsp_types_t type,
|
|||||||
* There are several changes that need to be made, in several zebra
|
* There are several changes that need to be made, in several zebra
|
||||||
* data structures, so we want to do all the work required at once.
|
* data structures, so we want to do all the work required at once.
|
||||||
*/
|
*/
|
||||||
int mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
|
void mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
|
||||||
const struct zapi_labels *zl)
|
const struct zapi_labels *zl)
|
||||||
{
|
{
|
||||||
int i, counter, ret = 0;
|
int i, counter, ret = 0;
|
||||||
@ -2906,7 +2904,7 @@ int mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
|
|||||||
/* Lookup table. */
|
/* Lookup table. */
|
||||||
lsp_table = zvrf->lsp_table;
|
lsp_table = zvrf->lsp_table;
|
||||||
if (!lsp_table)
|
if (!lsp_table)
|
||||||
return -1;
|
return;
|
||||||
|
|
||||||
/* Find or create LSP object */
|
/* Find or create LSP object */
|
||||||
tmp_ile.in_label = zl->local_label;
|
tmp_ile.in_label = zl->local_label;
|
||||||
@ -3070,8 +3068,6 @@ znh_done:
|
|||||||
|
|
||||||
if (new_nhe)
|
if (new_nhe)
|
||||||
zebra_nhg_free(new_nhe);
|
zebra_nhg_free(new_nhe);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -261,13 +261,13 @@ void zebra_mpls_print_fec(struct vty *vty, struct zebra_vrf *zvrf,
|
|||||||
* Handle zapi request to install/uninstall LSP and
|
* Handle zapi request to install/uninstall LSP and
|
||||||
* (optionally) FEC-To-NHLFE (FTN) bindings.
|
* (optionally) FEC-To-NHLFE (FTN) bindings.
|
||||||
*/
|
*/
|
||||||
int mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
|
void mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
|
||||||
const struct zapi_labels *zl);
|
const struct zapi_labels *zl);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Uninstall all NHLFEs bound to a single FEC.
|
* Uninstall all NHLFEs bound to a single FEC.
|
||||||
*/
|
*/
|
||||||
int mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
void mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
||||||
struct prefix *prefix, uint8_t route_type,
|
struct prefix *prefix, uint8_t route_type,
|
||||||
unsigned short route_instance);
|
unsigned short route_instance);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user