mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 17:18:56 +00:00
zebra: Move lsp_process_q to zrouter
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
ea45a4e7db
commit
e2353ec265
@ -167,8 +167,8 @@ static void sigint(void)
|
|||||||
if (zvrf)
|
if (zvrf)
|
||||||
SET_FLAG(zvrf->flags, ZEBRA_VRF_RETAIN);
|
SET_FLAG(zvrf->flags, ZEBRA_VRF_RETAIN);
|
||||||
}
|
}
|
||||||
if (zebrad.lsp_process_q)
|
if (zrouter.lsp_process_q)
|
||||||
work_queue_free_and_null(&zebrad.lsp_process_q);
|
work_queue_free_and_null(&zrouter.lsp_process_q);
|
||||||
vrf_terminate();
|
vrf_terminate();
|
||||||
|
|
||||||
ns_walk_func(zebra_ns_early_shutdown);
|
ns_walk_func(zebra_ns_early_shutdown);
|
||||||
|
@ -1075,13 +1075,13 @@ static int lsp_processq_add(zebra_lsp_t *lsp)
|
|||||||
if (CHECK_FLAG(lsp->flags, LSP_FLAG_SCHEDULED))
|
if (CHECK_FLAG(lsp->flags, LSP_FLAG_SCHEDULED))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (zebrad.lsp_process_q == NULL) {
|
if (zrouter.lsp_process_q == NULL) {
|
||||||
flog_err(EC_ZEBRA_WQ_NONEXISTENT,
|
flog_err(EC_ZEBRA_WQ_NONEXISTENT,
|
||||||
"%s: work_queue does not exist!", __func__);
|
"%s: work_queue does not exist!", __func__);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
work_queue_add(zebrad.lsp_process_q, lsp);
|
work_queue_add(zrouter.lsp_process_q, lsp);
|
||||||
SET_FLAG(lsp->flags, LSP_FLAG_SCHEDULED);
|
SET_FLAG(lsp->flags, LSP_FLAG_SCHEDULED);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1717,19 +1717,19 @@ static char *snhlfe2str(zebra_snhlfe_t *snhlfe, char *buf, int size)
|
|||||||
*/
|
*/
|
||||||
static int mpls_processq_init(struct zebra_t *zebra)
|
static int mpls_processq_init(struct zebra_t *zebra)
|
||||||
{
|
{
|
||||||
zebra->lsp_process_q = work_queue_new(zrouter.master, "LSP processing");
|
zrouter.lsp_process_q = work_queue_new(zrouter.master, "LSP processing");
|
||||||
if (!zebra->lsp_process_q) {
|
if (!zrouter.lsp_process_q) {
|
||||||
flog_err(EC_ZEBRA_WQ_NONEXISTENT,
|
flog_err(EC_ZEBRA_WQ_NONEXISTENT,
|
||||||
"%s: could not initialise work queue!", __func__);
|
"%s: could not initialise work queue!", __func__);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
zebra->lsp_process_q->spec.workfunc = &lsp_process;
|
zrouter.lsp_process_q->spec.workfunc = &lsp_process;
|
||||||
zebra->lsp_process_q->spec.del_item_data = &lsp_processq_del;
|
zrouter.lsp_process_q->spec.del_item_data = &lsp_processq_del;
|
||||||
zebra->lsp_process_q->spec.errorfunc = NULL;
|
zrouter.lsp_process_q->spec.errorfunc = NULL;
|
||||||
zebra->lsp_process_q->spec.completion_func = &lsp_processq_complete;
|
zrouter.lsp_process_q->spec.completion_func = &lsp_processq_complete;
|
||||||
zebra->lsp_process_q->spec.max_retries = 0;
|
zrouter.lsp_process_q->spec.max_retries = 0;
|
||||||
zebra->lsp_process_q->spec.hold = 10;
|
zrouter.lsp_process_q->spec.hold = 10;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -81,6 +81,9 @@ struct zebra_router {
|
|||||||
|
|
||||||
/* Meta Queue Information */
|
/* Meta Queue Information */
|
||||||
struct meta_queue *mq;
|
struct meta_queue *mq;
|
||||||
|
|
||||||
|
/* LSP work queue */
|
||||||
|
struct work_queue *lsp_process_q;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct zebra_router zrouter;
|
extern struct zebra_router zrouter;
|
||||||
|
@ -175,9 +175,6 @@ DECLARE_KOOH(zserv_client_close, (struct zserv *client), (client));
|
|||||||
|
|
||||||
/* Zebra instance */
|
/* Zebra instance */
|
||||||
struct zebra_t {
|
struct zebra_t {
|
||||||
/* LSP work queue */
|
|
||||||
struct work_queue *lsp_process_q;
|
|
||||||
|
|
||||||
#define ZEBRA_ZAPI_PACKETS_TO_PROCESS 1000
|
#define ZEBRA_ZAPI_PACKETS_TO_PROCESS 1000
|
||||||
_Atomic uint32_t packets_to_process;
|
_Atomic uint32_t packets_to_process;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user