]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Remove cleanup and nhg workqueue boilerplate
authorStephen Worley <sworley@cumulusnetworks.com>
Fri, 4 Oct 2019 18:32:26 +0000 (14:32 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:13:43 +0000 (11:13 -0400)
This code was from a strategies we elected not to use and
can safely be removed.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
zebra/main.c
zebra/zebra_nhg.c
zebra/zebra_nhg.h
zebra/zebra_router.c

index e57b84c8f6f72d98cc73524b975678918beef58b..334354eaae87997778115ec8a1b46d1d844ef67b 100644 (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);
index f4fc06efc9538e6cfc00449f0fb0878696fc9089..44524ec507c557a6288a6b6d7613a45d5e795bcb 100644 (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;
index d3c63cff3035b42779c46156b2951ef2b2f03909..e5eb51862880adae730730db1ad70863cc138bb5 100644 (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);
index d6ec6ac1658e10eb14f836061b70db3e96949508..f52249ad8b2b2069c3799d7c7f080b3792b7e6e9 100644 (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);
-}