mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 23:42:27 +00:00
Merge pull request #13444 from donaldsharp/fix_dplane_provider_counter
zebra: Fix dp_out_queued counter to actually reflect real life
This commit is contained in:
commit
e8224402cd
@ -5736,6 +5736,21 @@ void dplane_provider_enqueue_out_ctx(struct zebra_dplane_provider *prov,
|
||||
memory_order_relaxed);
|
||||
}
|
||||
|
||||
static struct zebra_dplane_ctx *
|
||||
dplane_provider_dequeue_out_ctx(struct zebra_dplane_provider *prov)
|
||||
{
|
||||
struct zebra_dplane_ctx *ctx;
|
||||
|
||||
ctx = dplane_ctx_list_pop(&(prov->dp_ctx_out_list));
|
||||
if (!ctx)
|
||||
return NULL;
|
||||
|
||||
atomic_fetch_sub_explicit(&(prov->dp_out_queued), 1,
|
||||
memory_order_relaxed);
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
||||
/*
|
||||
* Accessor for provider object
|
||||
*/
|
||||
@ -6763,7 +6778,7 @@ static void dplane_thread_loop(struct event *event)
|
||||
dplane_provider_lock(prov);
|
||||
|
||||
while (counter < limit) {
|
||||
ctx = dplane_ctx_list_pop(&(prov->dp_ctx_out_list));
|
||||
ctx = dplane_provider_dequeue_out_ctx(prov);
|
||||
if (ctx) {
|
||||
dplane_ctx_list_add_tail(&work_list, ctx);
|
||||
counter++;
|
||||
|
Loading…
Reference in New Issue
Block a user