Skip to content

Commit

Permalink
zebra: Only notify dplane work pthread when needed
Browse files Browse the repository at this point in the history
The fpm_nl_process function was getting the count
of the total number of ctx's processed.  This leads
to after having processed 1 context to always signal
the dataplane that there is work to do.  Change the
code to only notify the dplane worker when a context
was actually added to the outgoing context queue.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
  • Loading branch information
donaldsharp committed Oct 11, 2024
1 parent adc0f00 commit 963792e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zebra/dplane_fpm_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,7 @@ static void fpm_process_queue(struct event *t)
* until the dataplane thread gets scheduled for new,
* unrelated work.
*/
if (dplane_provider_out_ctx_queue_len(fnc->prov) > 0)
if (processed_contexts)
dplane_provider_work_ready();
}

Expand Down

0 comments on commit 963792e

Please sign in to comment.