From 2d8a9c544bd9bdfc6a32910f593ab65fbab2036c Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Wed, 20 May 2020 11:23:36 -0400 Subject: [PATCH] zebra: remove unneeded nhg repalce boilerplate Remove some leftover boilerplate from the old replace code path. That code ended up in the add API so its no longer needed. Signed-off-by: Stephen Worley --- zebra/zebra_nhg.c | 6 ------ zebra/zebra_nhg.h | 11 +---------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 6d4a915673..d4d31d3ea2 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -2813,9 +2813,3 @@ struct nhg_hash_entry *zebra_nhg_proto_del(uint32_t id) return nhe; } -/* Replace NHE from upper level proto */ -struct nhg_hash_entry * -zebra_nhg_proto_replace(uint32_t id, struct nexthop_group *nhg, afi_t afi) -{ - return NULL; -} diff --git a/zebra/zebra_nhg.h b/zebra/zebra_nhg.h index 02858779b3..16474aada4 100644 --- a/zebra/zebra_nhg.h +++ b/zebra/zebra_nhg.h @@ -268,7 +268,7 @@ zebra_nhg_rib_find_nhe(struct nhg_hash_entry *rt_nhe, afi_t rt_afi); */ /* - * Add NHE. + * Add NHE. If already exists, Replace. * * Returns allocated NHE on success, otherwise NULL. */ @@ -276,7 +276,6 @@ struct nhg_hash_entry *zebra_nhg_proto_add(uint32_t id, int type, struct nexthop_group *nhg, afi_t afi); - /* * Del NHE. * @@ -286,14 +285,6 @@ struct nhg_hash_entry *zebra_nhg_proto_add(uint32_t id, int type, */ struct nhg_hash_entry *zebra_nhg_proto_del(uint32_t id); -/* - * Replace NHE. - * - * Returns new NHE on success, otherwise NULL. - */ -struct nhg_hash_entry * -zebra_nhg_proto_replace(uint32_t id, struct nexthop_group *nhg, afi_t afi); - /* Reference counter functions */ extern void zebra_nhg_decrement_ref(struct nhg_hash_entry *nhe); extern void zebra_nhg_increment_ref(struct nhg_hash_entry *nhe); -- 2.39.5