mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 15:33:56 +00:00
commit
01637c3819
@ -98,6 +98,7 @@ struct fpm_nl_ctx {
|
|||||||
struct thread *t_read;
|
struct thread *t_read;
|
||||||
struct thread *t_write;
|
struct thread *t_write;
|
||||||
struct thread *t_event;
|
struct thread *t_event;
|
||||||
|
struct thread *t_nhg;
|
||||||
struct thread *t_dequeue;
|
struct thread *t_dequeue;
|
||||||
|
|
||||||
/* zebra events. */
|
/* zebra events. */
|
||||||
@ -271,7 +272,7 @@ DEFUN(fpm_use_nhg, fpm_use_nhg_cmd,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
|
|
||||||
thread_add_event(gfnc->fthread->master, fpm_process_event, gfnc,
|
thread_add_event(gfnc->fthread->master, fpm_process_event, gfnc,
|
||||||
FNE_TOGGLE_NHG, &gfnc->t_event);
|
FNE_TOGGLE_NHG, &gfnc->t_nhg);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -287,7 +288,7 @@ DEFUN(no_fpm_use_nhg, no_fpm_use_nhg_cmd,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
|
|
||||||
thread_add_event(gfnc->fthread->master, fpm_process_event, gfnc,
|
thread_add_event(gfnc->fthread->master, fpm_process_event, gfnc,
|
||||||
FNE_TOGGLE_NHG, &gfnc->t_event);
|
FNE_TOGGLE_NHG, &gfnc->t_nhg);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -1275,7 +1276,7 @@ static void fpm_process_queue(struct thread *t)
|
|||||||
static void fpm_process_event(struct thread *t)
|
static void fpm_process_event(struct thread *t)
|
||||||
{
|
{
|
||||||
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
|
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
|
||||||
int event = THREAD_VAL(t);
|
enum fpm_nl_events event = THREAD_VAL(t);
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case FNE_DISABLE:
|
case FNE_DISABLE:
|
||||||
@ -1328,11 +1329,6 @@ static void fpm_process_event(struct thread *t)
|
|||||||
if (IS_ZEBRA_DEBUG_FPM)
|
if (IS_ZEBRA_DEBUG_FPM)
|
||||||
zlog_debug("%s: LSP walk finished", __func__);
|
zlog_debug("%s: LSP walk finished", __func__);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
|
||||||
if (IS_ZEBRA_DEBUG_FPM)
|
|
||||||
zlog_debug("%s: unhandled event %d", __func__, event);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1372,6 +1368,8 @@ static int fpm_nl_finish_early(struct fpm_nl_ctx *fnc)
|
|||||||
THREAD_OFF(fnc->t_ribwalk);
|
THREAD_OFF(fnc->t_ribwalk);
|
||||||
THREAD_OFF(fnc->t_rmacreset);
|
THREAD_OFF(fnc->t_rmacreset);
|
||||||
THREAD_OFF(fnc->t_rmacwalk);
|
THREAD_OFF(fnc->t_rmacwalk);
|
||||||
|
THREAD_OFF(fnc->t_event);
|
||||||
|
THREAD_OFF(fnc->t_nhg);
|
||||||
thread_cancel_async(fnc->fthread->master, &fnc->t_read, NULL);
|
thread_cancel_async(fnc->fthread->master, &fnc->t_read, NULL);
|
||||||
thread_cancel_async(fnc->fthread->master, &fnc->t_write, NULL);
|
thread_cancel_async(fnc->fthread->master, &fnc->t_write, NULL);
|
||||||
thread_cancel_async(fnc->fthread->master, &fnc->t_connect, NULL);
|
thread_cancel_async(fnc->fthread->master, &fnc->t_connect, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user