zebra: Remove cleanup and nhg workqueue boilerplate

This code was from a strategies we elected not to use and
can safely be removed.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
Stephen Worley 2019-10-04 14:32:26 -04:00
parent 53ac1fbbe0
commit fefa080e3c
4 changed files with 0 additions and 36 deletions

View File

@ -166,7 +166,6 @@ static void sigint(void)
if (zrouter.lsp_process_q)
work_queue_free_and_null(&zrouter.lsp_process_q);
zebra_router_cleanup();
vrf_terminate();
ns_walk_func(zebra_ns_early_shutdown);

View File

@ -1834,25 +1834,6 @@ void zebra_nhg_uninstall_kernel(struct nhg_hash_entry *nhe)
zebra_nhg_handle_uninstall(nhe);
}
static void zebra_nhg_uninstall_created(struct hash_bucket *bucket, void *arg)
{
struct nhg_hash_entry *nhe = NULL;
nhe = (struct nhg_hash_entry *)bucket->data;
if (ZEBRA_NHG_CREATED(nhe))
zebra_nhg_uninstall_kernel(nhe);
}
void zebra_nhg_cleanup_tables(struct hash *hash)
{
/*
* TODO: These should only be uninstalled via route cleanup path?
*/
return;
hash_iterate(hash, zebra_nhg_uninstall_created, NULL);
}
void zebra_nhg_dplane_result(struct zebra_dplane_ctx *ctx)
{
enum dplane_op_e op;

View File

@ -169,9 +169,6 @@ struct nhg_ctx {
};
void zebra_nhg_init(void);
void zebra_nhg_terminate(void);
extern void nhg_connected_free(struct nhg_connected *dep);
extern struct nhg_connected *nhg_connected_new(struct nhg_hash_entry *nhe);
@ -263,8 +260,6 @@ extern uint8_t zebra_nhg_nhe2grp(struct nh_grp *grp, struct nhg_hash_entry *nhe,
void zebra_nhg_install_kernel(struct nhg_hash_entry *nhe);
void zebra_nhg_uninstall_kernel(struct nhg_hash_entry *nhe);
void zebra_nhg_cleanup_tables(struct hash *hash);
/* Forward ref of dplane update context type */
struct zebra_dplane_ctx;
void zebra_nhg_dplane_result(struct zebra_dplane_ctx *ctx);

View File

@ -271,14 +271,3 @@ void zebra_router_init(void)
hash_create_size(8, zebra_nhg_id_key, zebra_nhg_hash_id_equal,
"Zebra Router Nexthop Groups ID index");
}
/**
* zebra_router_cleanup() - Perform any cleanup actions before termination
*
* Right now this is just being used to clear the nexthops we installed in
* the kernel on shutdown before the routes are cleaned via vrf_terminated().
*/
void zebra_router_cleanup(void)
{
zebra_nhg_cleanup_tables(zrouter.nhgs_id);
}