summaryrefslogtreecommitdiff
path: root/zebra/zebra_dplane.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-04-03 09:26:21 -0400
committerGitHub <noreply@github.com>2019-04-03 09:26:21 -0400
commitf7af9a93e95f2bc47acd72b85e1522dc0e1ed801 (patch)
tree138093dd992623d27c1eff4ab2b8fbbbc24057a1 /zebra/zebra_dplane.c
parent06566f41f7f2cfaf0696872744bf7b4e48967eb0 (diff)
parent9677961ea5e9df5ae01b57af4dff0d96d5ade60e (diff)
Merge pull request #3789 from mjstapp/dplane_skip_kernel
zebra: support skip-kernel for dataplane updates
Diffstat (limited to 'zebra/zebra_dplane.c')
-rw-r--r--zebra/zebra_dplane.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index df26a8534c..3d1ff676a5 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -1828,6 +1828,14 @@ static int kernel_dplane_process_func(struct zebra_dplane_provider *prov)
if (ctx == NULL)
break;
+ /* A previous provider plugin may have asked to skip the
+ * kernel update.
+ */
+ if (dplane_ctx_is_skip_kernel(ctx)) {
+ res = ZEBRA_DPLANE_REQUEST_SUCCESS;
+ goto skip_one;
+ }
+
/* Dispatch to appropriate kernel-facing apis */
switch (dplane_ctx_get_op(ctx)) {
@@ -1857,6 +1865,7 @@ static int kernel_dplane_process_func(struct zebra_dplane_provider *prov)
break;
}
+skip_one:
dplane_ctx_set_status(ctx, res);
dplane_provider_enqueue_out_ctx(prov, ctx);