From e1292378e242735f25a4073119ca2da897100fc8 Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Wed, 23 Oct 2019 15:07:22 -0400 Subject: [PATCH] zebra: Improve commenting for group requeue case The commenting for why we would need to requeue a group from the kernel to be later processed was not sufficient. Add a better explanation for the flow and state of the system. Signed-off-by: Stephen Worley --- zebra/zebra_nhg.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 1b9440218b..418c1102bd 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -883,10 +883,17 @@ int nhg_ctx_process(struct nhg_ctx *ctx) ret = nhg_ctx_process_new(ctx); if (nhg_ctx_get_count(ctx) && ret == -ENOENT && nhg_ctx_get_status(ctx) != NHG_CTX_REQUEUED) { - /* Depends probably came before group, re-queue. + /** + * We have entered a situation where we are + * processing a group from the kernel + * that has a contained nexthop which + * we have not yet processed. * - * Only going to retry once, hence just using status - * flag rather than counter. + * Re-enqueue this ctx to be handled exactly one + * more time (indicated by the flag). + * + * By the time we get back to it, we + * should have processed its depends. */ nhg_ctx_set_status(ctx, NHG_CTX_NONE); if (queue_add(ctx) == 0) { -- 2.39.5