diff options
-rw-r--r-- | zebra/main.c | 4 | ||||
-rw-r--r-- | zebra/router-id.c | 3 | ||||
-rw-r--r-- | zebra/zebra_dplane.c | 4 | ||||
-rw-r--r-- | zebra/zebra_mpls.c | 8 | ||||
-rw-r--r-- | zebra/zebra_pw.c | 2 | ||||
-rw-r--r-- | zebra/zebra_rib.c | 6 | ||||
-rw-r--r-- | zebra/zebra_vrf.c | 2 | ||||
-rw-r--r-- | zebra/zserv.c | 4 | ||||
-rw-r--r-- | zebra/zserv.h | 4 |
9 files changed, 8 insertions, 29 deletions
diff --git a/zebra/main.c b/zebra/main.c index c9fc0f838..c605050c5 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -62,10 +62,6 @@ #define ZEBRA_PTM_SUPPORT -/* Zebra instance */ -struct zebra_t zebrad = { -}; - /* process id. */ pid_t pid; diff --git a/zebra/router-id.c b/zebra/router-id.c index 2775383eb..569ffbab4 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -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) { diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index cd6033dbf..15fcde2bb 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -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; } diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 6ce60c464..0aac7d7b1 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -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); diff --git a/zebra/zebra_pw.c b/zebra/zebra_pw.c index 83e1b9188..2d6ec4ec0 100644 --- a/zebra/zebra_pw.c +++ b/zebra/zebra_pw.c @@ -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 *); diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index b0c82a8a5..995cbf9d1 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -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); diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index 11578d82d..d18305495 100644 --- a/zebra/zebra_vrf.c +++ b/zebra/zebra_vrf.c @@ -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, diff --git a/zebra/zserv.c b/zebra/zserv.c index c6b0d84a1..e4fc348b1 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -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. */ diff --git a/zebra/zserv.h b/zebra/zserv.h index 4461ea5cd..f7c4e3df7 100644 --- a/zebra/zserv.h +++ b/zebra/zserv.h @@ -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; /* |