diff options
| author | Mark Stapp <mjs@voltanet.io> | 2019-01-10 16:26:21 -0500 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2019-03-13 11:19:51 -0400 |
| commit | 9677961ea5e9df5ae01b57af4dff0d96d5ade60e (patch) | |
| tree | 8abc68bf8d8480126ffbdb7b06cf0c5ddde42936 | |
| parent | 6ac9718a2af66a796bf953e4ab9e7dd48f57754e (diff) | |
zebra: support skip-kernel for dataplane updates
Support the skip-kernel flag for dataplane updates.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
| -rw-r--r-- | zebra/zebra_dplane.c | 9 |
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); |
