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 <sworley@cumulusnetworks.com>
This commit is contained in:
Stephen Worley 2019-10-23 15:07:22 -04:00
parent c1da832a94
commit e1292378e2

View File

@ -883,10 +883,17 @@ int nhg_ctx_process(struct nhg_ctx *ctx)
ret = nhg_ctx_process_new(ctx); ret = nhg_ctx_process_new(ctx);
if (nhg_ctx_get_count(ctx) && ret == -ENOENT if (nhg_ctx_get_count(ctx) && ret == -ENOENT
&& nhg_ctx_get_status(ctx) != NHG_CTX_REQUEUED) { && 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 * Re-enqueue this ctx to be handled exactly one
* flag rather than counter. * 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); nhg_ctx_set_status(ctx, NHG_CTX_NONE);
if (queue_add(ctx) == 0) { if (queue_add(ctx) == 0) {