From 6df9f442277603d3ebd3bcf950f7dd0d28fb42f5 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 2 Jul 2024 01:38:47 -0700 Subject: session: handle multiple attempts to mark mq congested Type: fix Signed-off-by: Florin Coras Change-Id: Iadc6ec58f5fc7fbff62e4fd31d509557b60395cb --- src/vnet/session/application_worker.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/vnet/session') diff --git a/src/vnet/session/application_worker.c b/src/vnet/session/application_worker.c index befdb7c7002..43007ad76ed 100644 --- a/src/vnet/session/application_worker.c +++ b/src/vnet/session/application_worker.c @@ -836,9 +836,12 @@ app_worker_mq_wrk_is_congested (app_worker_t *app_wrk, u32 thread_index) void app_worker_set_mq_wrk_congested (app_worker_t *app_wrk, u32 thread_index) { - clib_atomic_fetch_add_relax (&app_wrk->mq_congested, 1); ASSERT (thread_index == vlib_get_thread_index ()); - app_wrk->wrk_mq_congested[thread_index] = 1; + if (!app_wrk->wrk_mq_congested[thread_index]) + { + clib_atomic_fetch_add_relax (&app_wrk->mq_congested, 1); + app_wrk->wrk_mq_congested[thread_index] = 1; + } } void -- cgit 1.2.3-korg