From: "Min Hu (Connor)" <humin29@huawei.com>
To: Thierry Herbelot <thierry.herbelot@6wind.com>, <dev@dpdk.org>
Cc: Thomas Monjalon <thomas@monjalon.net>, <stable@dpdk.org>,
Ori Kam <orika@nvidia.com>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] app/regex: avoid division by zero
Date: Mon, 24 May 2021 20:09:24 +0800 [thread overview]
Message-ID: <08f29f81-5368-8c19-b688-029f3ab100d5@huawei.com> (raw)
In-Reply-To: <20210524085700.15534-1-thierry.herbelot@6wind.com>
Hi, Thierry,
This bug has been fixed in my earlier patch, please refer to:
https://patches.dpdk.org/project/dpdk/patch/1618839289-33224-5-git-send-email-humin29@huawei.com/
Thanks.
在 2021/5/24 16:57, Thierry Herbelot 写道:
> Check that nb_jobs is not zero before using it for a division.
>
> Fixes: f5cffb7eb7fb6 ("app/regex: read data file once at startup")
> Cc: stable@dpdk.org
> Cc: Ori Kam <orika@nvidia.com>
>
> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
> ---
> app/test-regex/main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/app/test-regex/main.c b/app/test-regex/main.c
> index 8e665df73ce0..8f48cab11924 100644
> --- a/app/test-regex/main.c
> +++ b/app/test-regex/main.c
> @@ -714,6 +714,8 @@ main(int argc, char **argv)
> rte_exit(EXIT_FAILURE, "Number of QPs must be greater than 0\n");
> if (nb_lcores == 0)
> rte_exit(EXIT_FAILURE, "Number of lcores must be greater than 0\n");
> + if (nb_jobs == 0)
> + rte_exit(EXIT_FAILURE, "Number of jobs must be greater than 0\n");
> if (distribute_qps_to_lcores(nb_lcores, nb_qps, &qps_per_lcore) < 0)
> rte_exit(EXIT_FAILURE, "Failed to distribute queues to lcores!\n");
> ret = init_port(&nb_max_payload, rules_file,
>
next prev parent reply other threads:[~2021-05-24 12:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 8:57 [dpdk-dev] " Thierry Herbelot
2021-05-24 12:09 ` Min Hu (Connor) [this message]
2022-06-26 17:41 ` [dpdk-stable] " Thomas Monjalon
2022-07-05 20:16 ` [dpdk-dev] " Thomas Monjalon
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=08f29f81-5368-8c19-b688-029f3ab100d5@huawei.com \
--to=humin29@huawei.com \
--cc=dev@dpdk.org \
--cc=orika@nvidia.com \
--cc=stable@dpdk.org \
--cc=thierry.herbelot@6wind.com \
--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).