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>
This commit is contained in:
Donald Sharp 2024-02-07 20:32:24 -05:00
parent ab3d0846bd
commit 65d82a45ec

View File

@ -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;
}
}