mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-12 11:18:59 +00:00
zebra: handle pw updates in async dplane
Add kernel 'provider' support for pseudowire updates. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
97d8d05a81
commit
c10a646df4
@ -1701,6 +1701,32 @@ kernel_dplane_lsp_update(struct zebra_dplane_ctx *ctx)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Handler for kernel pseudowire updates
|
||||||
|
*/
|
||||||
|
static enum zebra_dplane_result
|
||||||
|
kernel_dplane_pw_update(struct zebra_dplane_ctx *ctx)
|
||||||
|
{
|
||||||
|
enum zebra_dplane_result res;
|
||||||
|
|
||||||
|
if (IS_ZEBRA_DEBUG_DPLANE_DETAIL)
|
||||||
|
zlog_debug("Dplane pw %s: op %s af %d loc: %u rem: %u",
|
||||||
|
dplane_ctx_get_pw_ifname(ctx),
|
||||||
|
dplane_op2str(ctx->zd_op),
|
||||||
|
dplane_ctx_get_pw_af(ctx),
|
||||||
|
dplane_ctx_get_pw_local_label(ctx),
|
||||||
|
dplane_ctx_get_pw_remote_label(ctx));
|
||||||
|
|
||||||
|
res = kernel_pw_update(ctx);
|
||||||
|
|
||||||
|
if (res != ZEBRA_DPLANE_REQUEST_SUCCESS)
|
||||||
|
atomic_fetch_add_explicit(
|
||||||
|
&zdplane_info.dg_pw_errors, 1,
|
||||||
|
memory_order_relaxed);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handler for kernel route updates
|
* Handler for kernel route updates
|
||||||
*/
|
*/
|
||||||
@ -1767,6 +1793,11 @@ static int kernel_dplane_process_func(struct zebra_dplane_provider *prov)
|
|||||||
res = kernel_dplane_lsp_update(ctx);
|
res = kernel_dplane_lsp_update(ctx);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DPLANE_OP_PW_INSTALL:
|
||||||
|
case DPLANE_OP_PW_UNINSTALL:
|
||||||
|
res = kernel_dplane_pw_update(ctx);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
atomic_fetch_add_explicit(
|
atomic_fetch_add_explicit(
|
||||||
&zdplane_info.dg_other_errors, 1,
|
&zdplane_info.dg_other_errors, 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user