diff options
| author | Russ White <russ@riw.us> | 2020-11-17 07:27:41 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-17 07:27:41 -0500 |
| commit | 7dce3c57c22c7c258613393524268ac12c84f60e (patch) | |
| tree | 15016ac5da759bc2a982d74d41ab32a9a2aba9f0 /zebra/zebra_rib.c | |
| parent | 426fe481d72bdf23d3eae8e1aa4323426b7a9d70 (diff) | |
| parent | f7a9d0120dd8306677f0bf417a29d142df03986b (diff) | |
Merge pull request #7518 from donaldsharp/asic_offload_more
Asic offload more
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index b688704962..569b23573c 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1821,8 +1821,12 @@ static void rib_process_result(struct zebra_dplane_ctx *ctx) "%s(%u):%pFX Stale dplane result for re %p", VRF_LOGNAME(vrf), dplane_ctx_get_vrf(ctx), dest_pfx, re); - } else - UNSET_FLAG(re->status, ROUTE_ENTRY_QUEUED); + } else { + if (!zrouter.asic_offloaded || + (CHECK_FLAG(re->flags, ZEBRA_FLAG_OFFLOADED) || + CHECK_FLAG(re->flags, ZEBRA_FLAG_OFFLOAD_FAILED))) + UNSET_FLAG(re->status, ROUTE_ENTRY_QUEUED); + } } if (old_re) { @@ -1899,8 +1903,23 @@ static void rib_process_result(struct zebra_dplane_ctx *ctx) zvrf->installs++; /* Notify route owner */ - zsend_route_notify_owner_ctx(ctx, ZAPI_ROUTE_INSTALLED); - + if (zebra_router_notify_on_ack()) + zsend_route_notify_owner_ctx(ctx, ZAPI_ROUTE_INSTALLED); + else { + if (re) { + if (CHECK_FLAG(re->flags, + ZEBRA_FLAG_OFFLOADED)) + zsend_route_notify_owner_ctx( + ctx, + ZAPI_ROUTE_INSTALLED); + if (CHECK_FLAG( + re->flags, + ZEBRA_FLAG_OFFLOAD_FAILED)) + zsend_route_notify_owner_ctx( + ctx, + ZAPI_ROUTE_FAIL_INSTALL); + } + } } else { if (re) { SET_FLAG(re->status, ROUTE_ENTRY_FAILED); @@ -2067,7 +2086,8 @@ static void rib_process_dplane_notify(struct zebra_dplane_ctx *ctx) } /* Ensure we clear the QUEUED flag */ - UNSET_FLAG(re->status, ROUTE_ENTRY_QUEUED); + if (!zrouter.asic_offloaded) + UNSET_FLAG(re->status, ROUTE_ENTRY_QUEUED); /* Is this a notification that ... matters? We mostly care about * the route that is currently selected for installation; we may also |
