From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: thomas@monjalon.net, dev@dpdk.org
Cc: stephen@networkplumber.org, pbhagavatula@marvell.com, stable@dpdk.org
Subject: [PATCH 2/2] examples/l2fwd-event: fix spinlock handling
Date: Wed, 13 Nov 2024 21:44:55 +0530 [thread overview]
Message-ID: <20241113161455.2649551-2-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <20241113161455.2649551-1-hemant.agrawal@nxp.com>
Detected by pvr-studio
Bug 89-93: very suspicious synchronization
The analyzer issued a pack of V1020 warnings that a resource
might remain blocked.
Fixes: 080f57bceca4 ("examples/l2fwd-event: add eventdev main loop")
Cc: pbhagavatula@marvell.com
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
examples/l2fwd-event/l2fwd_event.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/l2fwd-event/l2fwd_event.c b/examples/l2fwd-event/l2fwd_event.c
index 22472027b9..416957384b 100644
--- a/examples/l2fwd-event/l2fwd_event.c
+++ b/examples/l2fwd-event/l2fwd_event.c
@@ -141,6 +141,7 @@ l2fwd_get_free_event_port(struct l2fwd_event_resources *evt_rsrc)
rte_spinlock_lock(&evt_rsrc->evp.lock);
if (index >= evt_rsrc->evp.nb_ports) {
printf("No free event port is available\n");
+ rte_spinlock_unlock(&evt_rsrc->evp.lock);
return -1;
}
--
2.25.1
next prev parent reply other threads:[~2024-11-13 16:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 16:14 [PATCH 1/2] bus/dpaa: fix lock condition during error handling Hemant Agrawal
2024-11-13 16:14 ` Hemant Agrawal [this message]
2024-11-13 16:48 ` David Marchand
2024-11-14 7:45 ` Hemant Agrawal
2024-11-14 7:44 ` [PATCH v2 1/3] " Hemant Agrawal
2024-11-14 7:44 ` [PATCH v2 2/3] examples/l2fwd-event: fix spinlock handling Hemant Agrawal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241113161455.2649551-2-hemant.agrawal@nxp.com \
--to=hemant.agrawal@nxp.com \
--cc=dev@dpdk.org \
--cc=pbhagavatula@marvell.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).