]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Remove `struct zebra_t`
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 11 Jan 2019 20:43:17 +0000 (15:43 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 31 Jan 2019 14:20:46 +0000 (09:20 -0500)
This structure is unused anymore and does not belong in zserv.h

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/main.c
zebra/router-id.c
zebra/zebra_dplane.c
zebra/zebra_mpls.c
zebra/zebra_pw.c
zebra/zebra_rib.c
zebra/zebra_vrf.c
zebra/zserv.c
zebra/zserv.h

index c9fc0f8381436fddd7072ac2b06691b43d1aed98..c605050c57fe37ae2e70665573bfebc0cd974c49 100644 (file)
 
 #define ZEBRA_PTM_SUPPORT
 
-/* Zebra instance */
-struct zebra_t zebrad = {
-};
-
 /* process id. */
 pid_t pid;
 
index 2775383eb3b2f2ddfae2990fe2ada21c77680a4a..569ffbab411f80fd0bcf0ace9680a09e63993d87 100644 (file)
@@ -44,9 +44,6 @@
 #include "zebra/router-id.h"
 #include "zebra/redistribute.h"
 
-/* master zebra server structure */
-extern struct zebra_t zebrad;
-
 static struct connected *router_id_find_node(struct list *l,
                                             struct connected *ifc)
 {
index cd6033dbf95eb73c8a092a287c5c92dceacf1970..15fcde2bbcdee7504a5e028565caa3f321a1236f 100644 (file)
@@ -2052,7 +2052,7 @@ void zebra_dplane_shutdown(void)
 /*
  * Initialize the dataplane module during startup, internal/private version
  */
-static void zebra_dplane_init_internal(struct zebra_t *zebra)
+static void zebra_dplane_init_internal(void)
 {
        memset(&zdplane_info, 0, sizeof(zdplane_info));
 
@@ -2101,6 +2101,6 @@ void zebra_dplane_start(void)
  */
 void zebra_dplane_init(int (*results_fp)(struct dplane_ctx_q *))
 {
-       zebra_dplane_init_internal(&zebrad);
+       zebra_dplane_init_internal();
        zdplane_info.dg_results_cb = results_fp;
 }
index 6ce60c46416c2ccbacf3540e7070dc627b9a9881..0aac7d7b1253befcbf02ac59270ded3de5a7d1f5 100644 (file)
@@ -57,9 +57,6 @@ DEFINE_MTYPE_STATIC(ZEBRA, SNHLFE_IFNAME, "MPLS static nexthop ifname")
 
 int mpls_enabled;
 
-/* Default rtm_table for all clients */
-extern struct zebra_t zebrad;
-
 /* static function declarations */
 
 static void fec_evaluate(struct zebra_vrf *zvrf);
@@ -127,7 +124,6 @@ static zebra_snhlfe_t *snhlfe_add(zebra_slsp_t *slsp,
 static int snhlfe_del(zebra_snhlfe_t *snhlfe);
 static int snhlfe_del_all(zebra_slsp_t *slsp);
 static char *snhlfe2str(zebra_snhlfe_t *snhlfe, char *buf, int size);
-static int mpls_processq_init(struct zebra_t *zebra);
 
 
 /* Static functions */
@@ -1715,7 +1711,7 @@ static char *snhlfe2str(zebra_snhlfe_t *snhlfe, char *buf, int size)
 /*
  * Initialize work queue for processing changed LSPs.
  */
-static int mpls_processq_init(struct zebra_t *zebra)
+static int mpls_processq_init(void)
 {
        zrouter.lsp_process_q = work_queue_new(zrouter.master, "LSP processing");
        if (!zrouter.lsp_process_q) {
@@ -3063,7 +3059,7 @@ void zebra_mpls_init(void)
                return;
        }
 
-       if (!mpls_processq_init(&zebrad))
+       if (!mpls_processq_init())
                mpls_enabled = 1;
 
        hook_register(zserv_client_close, zebra_mpls_cleanup_fecs_for_client);
index 83e1b91888ec01fa5e1cbcdad379b4c3fa2df253..2d6ec4ec01db5a21858b2ff863cb45c97cc937b1 100644 (file)
@@ -42,8 +42,6 @@ DEFINE_HOOK(pw_uninstall, (struct zebra_pw * pw), (pw))
 
 #define MPLS_NO_LABEL MPLS_INVALID_LABEL
 
-extern struct zebra_t zebrad;
-
 static int zebra_pw_enabled(struct zebra_pw *);
 static void zebra_pw_install(struct zebra_pw *);
 static void zebra_pw_uninstall(struct zebra_pw *);
index b0c82a8a5757d7508b99bfc38a265748577e362e..995cbf9d1c3577404fc75bcbed4bf761efe4fbc0 100644 (file)
@@ -2321,10 +2321,8 @@ void meta_queue_free(struct meta_queue *mq)
 }
 
 /* initialise zebra rib work queue */
-static void rib_queue_init(struct zebra_t *zebra)
+static void rib_queue_init(void)
 {
-       assert(zebra);
-
        if (!(zrouter.ribq = work_queue_new(zrouter.master,
                                            "route_node processing"))) {
                flog_err(EC_ZEBRA_WQ_NONEXISTENT,
@@ -3322,7 +3320,7 @@ static int rib_dplane_results(struct dplane_ctx_q *ctxlist)
 /* Routing information base initialize. */
 void rib_init(void)
 {
-       rib_queue_init(&zebrad);
+       rib_queue_init();
 
        /* Init dataplane, and register for results */
        pthread_mutex_init(&dplane_mutex, NULL);
index 11578d82d32550f8df43fec9b97dd98f40175510..d18305495bc33bc1b59ce27aa7b102b8cf6e64cc 100644 (file)
@@ -42,8 +42,6 @@
 #include "zebra/zebra_netns_notify.h"
 #include "zebra/zebra_routemap.h"
 
-extern struct zebra_t zebrad;
-
 static void zebra_vrf_table_create(struct zebra_vrf *zvrf, afi_t afi,
                                   safi_t safi);
 static void zebra_rnhtable_node_cleanup(struct route_table *table,
index c6b0d84a1562601e84c922c31286732abad8f879..e4fc348b1af79c90c2624cd569e1a61fc3511417 100644 (file)
@@ -485,9 +485,9 @@ static void zserv_client_event(struct zserv *client,
  * with the message is executed. This proceeds until there are no more messages,
  * an error occurs, or the processing limit is reached.
  *
- * The client's I/O thread can push at most zebrad.packets_to_process messages
+ * The client's I/O thread can push at most zrouter.packets_to_process messages
  * onto the input buffer before notifying us there are packets to read. As long
- * as we always process zebrad.packets_to_process messages here, then we can
+ * as we always process zrouter.packets_to_process messages here, then we can
  * rely on the read thread to handle queuing this task enough times to process
  * everything on the input queue.
  */
index 4461ea5cd520f628f457227f5ebbb736a9bd91d0..f7c4e3df73d2e7689f5edee195be5e861b8b0a46 100644 (file)
@@ -173,10 +173,6 @@ struct zserv {
 DECLARE_HOOK(zserv_client_connect, (struct zserv *client), (client));
 DECLARE_KOOH(zserv_client_close, (struct zserv *client), (client));
 
-/* Zebra instance */
-struct zebra_t {
-};
-extern struct zebra_t zebrad;
 extern unsigned int multipath_num;
 
 /*