DPDK patches and discussions
 help / color / mirror / Atom feed
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 1/2] test/bbdev: fix possible div by zero issue
Date: Thu, 16 Mar 2023 15:09:53 +0100	[thread overview]
Message-ID: <06bffcaa-51f0-53f0-81fe-f87783a4ebba@redhat.com> (raw)
In-Reply-To: <20230309033624.61660-2-hernan.vargas@intel.com>



On 3/9/23 04:36, Hernan Vargas wrote:
> Add extra check at function level to ensure num_ops cannot be 0.
> 
> Coverity issue: 383647
> Fixes: f0d288bca467 ("test/bbdev: add support for BLER for 4G")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   app/test-bbdev/test_bbdev_perf.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
> index e56d314e93b5..15ebcdfc1556 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -3722,6 +3722,7 @@ bler_pmd_lcore_ldpc_dec(void *arg)
>   
>   	TEST_ASSERT_SUCCESS((burst_sz > MAX_BURST),
>   			"BURST_SIZE should be <= %u", MAX_BURST);
> +	TEST_ASSERT_SUCCESS((num_ops == 0), "NUM_OPS must be greater than 0");
>   
>   	rte_bbdev_info_get(tp->dev_id, &info);
>   
> @@ -3856,6 +3857,7 @@ bler_pmd_lcore_turbo_dec(void *arg)
>   
>   	TEST_ASSERT_SUCCESS((burst_sz > MAX_BURST),
>   			"BURST_SIZE should be <= %u", MAX_BURST);
> +	TEST_ASSERT_SUCCESS((num_ops == 0), "NUM_OPS must be greater than 0");
>   
>   	rte_bbdev_info_get(tp->dev_id, &info);
>   

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


  reply	other threads:[~2023-03-16 14:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09  3:36 [PATCH v1 0/2] test-bbdev coverity fixes Hernan Vargas
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 [this message]
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
2023-03-16 14:29 ` [PATCH v1 0/2] test-bbdev coverity fixes 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=06bffcaa-51f0-53f0-81fe-f87783a4ebba@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).