zebra: Remove struct zebra_t

This structure is unused anymore and does not belong in zserv.h

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2019-01-11 15:43:17 -05:00
parent 5ec5a7160a
commit 2561d12e5d
9 changed files with 8 additions and 29 deletions

View File

@ -62,10 +62,6 @@
#define ZEBRA_PTM_SUPPORT
/* Zebra instance */
struct zebra_t zebrad = {
};
/* process id. */
pid_t pid;

View 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)
{

View 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;
}

View 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);

View 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 *);

View 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);

View 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,

View 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.
*/

View 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;
/*