summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-02-07 20:32:24 -0500
committerDonald Sharp <sharpd@nvidia.com>2024-02-07 20:32:24 -0500
commit65d82a45ecaafa60e680434e7f27ffe50e528f9b (patch)
tree12fb11e3fd7525e4e2d824beef4c57b1564dba5f
parentab3d0846bd8893f2f93af1d3b93c2cb4ac6da0f0 (diff)
zebra: dplane_nexthop_add cannot return ZEBRA_DPLANE_REQUEST_SUCCESS
When installing a NHG via dplane_nexthop_add, it can only return REQUEST_QUEUED or REQUEST_FAILURE. There is no way SUCCESS can be returned with the way the dplane works at this point in time. Remove the code that attempts to set the NHE state appropriately as it is impossible. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--zebra/zebra_nhg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c
index dc403b8111..4e64fb8ee2 100644
--- a/zebra/zebra_nhg.c
+++ b/zebra/zebra_nhg.c
@@ -3101,7 +3101,7 @@ void zebra_nhg_install_kernel(struct nhg_hash_entry *nhe)
if (!ZEBRA_NHG_CREATED(nhe))
nhe->type = ZEBRA_ROUTE_NHG;
- int ret = dplane_nexthop_add(nhe);
+ enum zebra_dplane_result ret = dplane_nexthop_add(nhe);
switch (ret) {
case ZEBRA_DPLANE_REQUEST_QUEUED:
@@ -3114,8 +3114,9 @@ void zebra_nhg_install_kernel(struct nhg_hash_entry *nhe)
nhe);
break;
case ZEBRA_DPLANE_REQUEST_SUCCESS:
- SET_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED);
- zebra_nhg_handle_install(nhe, false);
+ flog_err(EC_ZEBRA_DP_INVALID_RC,
+ "DPlane returned an invalid result code for attempt of installation of %pNG into the kernel",
+ nhe);
break;
}
}