From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Hernan Vargas <hernan.vargas@intel.com>,
dev@dpdk.org, gakhil@marvell.com, trix@redhat.com
Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, john.mcnamara@intel.com
Subject: Re: [PATCH v3 3/3] baseband/acc: add check for empty queue
Date: Wed, 22 Feb 2023 18:55:48 +0100 [thread overview]
Message-ID: <ffdcdd0b-38bb-ab0d-36be-391b1c3be864@redhat.com> (raw)
In-Reply-To: <20230222164043.170909-4-hernan.vargas@intel.com>
On 2/22/23 17:40, Hernan Vargas wrote:
> Add optimization to return early if there are no available descriptors
> in ring to dequeue.
>
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
> drivers/baseband/acc/rte_acc100_pmd.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
> index c242f7737a..9941754aa0 100644
> --- a/drivers/baseband/acc/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc/rte_acc100_pmd.c
> @@ -4106,6 +4106,9 @@ acc100_dequeue_ldpc_enc(struct rte_bbdev_queue_data *q_data,
> int ret, cbm;
> struct rte_bbdev_enc_op *op;
>
> + if (avail == 0)
> + return 0;
> +
> op = acc_op_tail(q, 0);
> if (unlikely(ops == NULL || op == NULL))
> return 0;
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
next prev parent reply other threads:[~2023-02-22 17:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 16:40 [PATCH v3 0/3] DPDK Coverity issue 381631, 381646 Hernan Vargas
2023-02-22 16:40 ` [PATCH v3 1/3] baseband/acc: fix check after deref and dead code Hernan Vargas
2023-02-22 16:40 ` [PATCH v3 2/3] baseband/acc: remove unused ops check Hernan Vargas
2023-02-22 17:55 ` Maxime Coquelin
2023-02-22 16:40 ` [PATCH v3 3/3] baseband/acc: add check for empty queue Hernan Vargas
2023-02-22 17:55 ` Maxime Coquelin [this message]
2023-02-23 9:29 ` [PATCH v3 0/3] DPDK Coverity issue 381631, 381646 Maxime Coquelin
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=ffdcdd0b-38bb-ab0d-36be-391b1c3be864@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=hernan.vargas@intel.com \
--cc=john.mcnamara@intel.com \
--cc=nicolas.chautru@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=trix@redhat.com \
/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).