From: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
To: Weiguo Li <liwg06@foxmail.com>,
Sunil Kumar Kori <skori@marvell.com>,
Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"stable@dpdk.org" <stable@dpdk.org>,
Weiguo Li <liweiguo@xencore.cn>
Subject: RE: [EXT] [PATCH] examples/l2fwd-event: fix missing unlock issue
Date: Sat, 4 Nov 2023 07:51:33 +0000 [thread overview]
Message-ID: <BY3PR18MB47852A3C380E4A8E2721FADEC8A4A@BY3PR18MB4785.namprd18.prod.outlook.com> (raw)
In-Reply-To: <tencent_3611473A9DDF7023F6228731D03C2FA7F308@qq.com>
> -----Original Message-----
> From: Weiguo Li <liwg06@foxmail.com>
> Sent: Saturday, November 4, 2023 12:52 PM
> To: Sunil Kumar Kori <skori@marvell.com>; Pavan Nikhilesh Bhagavatula
> <pbhagavatula@marvell.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Weiguo Li <liweiguo@xencore.cn>
> Subject: [EXT] [PATCH] examples/l2fwd-event: fix missing unlock issue
>
> External Email
>
> ----------------------------------------------------------------------
> The function l2fwd_get_free_event_port acquires a lock on 'evt_rsrc->evp.lock'
> at the beginning. This lock is expected to be released at the first return
> statement, when no free event port is available.
>
> Fixes: 080f57bceca4 ("examples/l2fwd-event: add eventdev main loop")
> Cc: stable@dpdk.org
>
> Signed-off-by: Weiguo Li <liweiguo@xencore.cn>
Please Fix issue found by CI at http://mails.dpdk.org/archives/test-report/2023-November/501341.html
> ---
> 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 4b5a032e35..842fd816e5 100644
> --- a/examples/l2fwd-event/l2fwd_event.c
> +++ b/examples/l2fwd-event/l2fwd_event.c
> @@ -140,6 +140,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) {
> + rte_spinlock_unlock(&evt_rsrc->evp.lock);
> printf("No free event port is available\n");
> return -1;
> }
> --
> 2.34.1
prev parent reply other threads:[~2023-11-04 7:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-04 7:21 Weiguo Li
2023-11-04 7:51 ` Jerin Jacob Kollanukkaran [this message]
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=BY3PR18MB47852A3C380E4A8E2721FADEC8A4A@BY3PR18MB4785.namprd18.prod.outlook.com \
--to=jerinj@marvell.com \
--cc=dev@dpdk.org \
--cc=liweiguo@xencore.cn \
--cc=liwg06@foxmail.com \
--cc=pbhagavatula@marvell.com \
--cc=skori@marvell.com \
--cc=stable@dpdk.org \
/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).