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, stable@dpdk.org
Subject: Re: [PATCH v1 2/2] test/bbdev: fix unchecked ret value issue
Date: Thu, 16 Mar 2023 15:10:17 +0100 [thread overview]
Message-ID: <3c1f01cd-8328-e103-e6a0-7a3dc21eaaee@redhat.com> (raw)
In-Reply-To: <20230309033624.61660-3-hernan.vargas@intel.com>
On 3/9/23 04:36, Hernan Vargas wrote:
> Add check for return value from get_bbdev_queue_stats.
>
> Coverity issue: 383155
> Fixes: c25604355a15 ("app/bbdev: add explicit check for counters")
> Cc: stable@dpdk.org
>
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
> app/test-bbdev/test_bbdev_perf.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
> index 15ebcdfc1556..276bbf0a2e6d 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -5679,7 +5679,7 @@ static int
> offload_cost_test(struct active_device *ad,
> struct test_op_params *op_params)
> {
> - int iter;
> + int iter, ret;
> uint16_t burst_sz = op_params->burst_sz;
> const uint16_t num_to_process = op_params->num_to_process;
> const enum rte_bbdev_op_type op_type = test_vector.op_type;
> @@ -5774,7 +5774,10 @@ offload_cost_test(struct active_device *ad,
> rte_get_tsc_hz());
>
> struct rte_bbdev_stats stats = {0};
> - get_bbdev_queue_stats(ad->dev_id, queue_id, &stats);
> + ret = get_bbdev_queue_stats(ad->dev_id, queue_id, &stats);
> + TEST_ASSERT_SUCCESS(ret,
> + "Failed to get stats for queue (%u) of device (%u)",
> + queue_id, ad->dev_id);
> if (stats.enqueue_warn_count > 0)
> printf("Warning reported on the queue : %10"PRIu64"\n",
> stats.enqueue_warn_count);
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
prev parent reply other threads:[~2023-03-16 14:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230309033624.61660-1-hernan.vargas@intel.com>
2023-03-09 3:36 ` [PATCH v1 1/2] test/bbdev: fix possible div by zero issue Hernan Vargas
2023-03-16 14:09 ` Maxime Coquelin
2023-03-09 3:36 ` [PATCH v1 2/2] test/bbdev: fix unchecked ret value issue Hernan Vargas
2023-03-16 14:10 ` Maxime Coquelin [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=3c1f01cd-8328-e103-e6a0-7a3dc21eaaee@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=stable@dpdk.org \
--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).