DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, <ferruh.yigit@intel.com>, <jerinj@marvell.com>,
	<skori@marvell.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] eal: fix service core index validity
Date: Thu, 29 Apr 2021 10:34:49 +0800	[thread overview]
Message-ID: <00496729-2eda-0790-ebe8-43391ab36c09@huawei.com> (raw)
In-Reply-To: <20210420193317.7ffe5275@hermes.local>

Hi, fixed in v2, thanks.

在 2021/4/21 10:33, Stephen Hemminger 写道:
> On Wed, 21 Apr 2021 09:17:17 +0800
> "Min Hu (Connor)" <humin29@huawei.com> wrote:
> 
>>   		idx = strtoul(corelist, &end, 10);
>>   		if (errno || end == NULL)
>>   			return -1;
>> +		if (idx < 0 || idx >= RTE_MAX_LCORE)
> 
> Wondered at first how strtoul() could ever return an negative value but then
> noticed that idx is int here.
> 
> The code that does would be clearer and safer if the variables were an unsigned
> type. idx, min, max should be the same type everywhere.
> 
> Looks like the original code was written in old C style of "all the world's an int"
> .
> 

  reply	other threads:[~2021-04-29  2:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21  1:17 [dpdk-dev] [PATCH 0/2] fix bugs for librte eal Min Hu (Connor)
2021-04-21  1:17 ` [dpdk-dev] [PATCH 1/2] eal: check mp reply result Min Hu (Connor)
2021-04-21  1:17 ` [dpdk-dev] [PATCH 2/2] eal: fix service core index validity Min Hu (Connor)
2021-04-21  2:33   ` Stephen Hemminger
2021-04-29  2:34     ` Min Hu (Connor) [this message]
2021-04-29  2:34 ` [dpdk-dev] [PATCH v2 0/2] fix bugs for librte eal Min Hu (Connor)
2021-04-29  2:34   ` [dpdk-dev] [PATCH v2 1/2] eal: check mp reply result Min Hu (Connor)
2021-05-04 16:54     ` Thomas Monjalon
2021-04-29  2:34   ` [dpdk-dev] [PATCH v2 2/2] eal: fix service core index validity Min Hu (Connor)
2021-05-04 16:54     ` Thomas Monjalon
2021-05-05  4:10   ` [dpdk-dev] [PATCH v3 0/2] fix bugs for librte eal Chengwen Feng
2021-05-05  4:10     ` [dpdk-dev] [PATCH v3 1/2] eal: check mp reply result Chengwen Feng
2021-05-05  4:10     ` [dpdk-dev] [PATCH v3 2/2] eal: fix service core index validity Chengwen Feng
2021-05-05 10:43       ` Van Haaren, Harry
2021-05-05 21:23         ` 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=00496729-2eda-0790-ebe8-43391ab36c09@huawei.com \
    --to=humin29@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerinj@marvell.com \
    --cc=skori@marvell.com \
    --cc=stephen@networkplumber.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).