DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>, Li Han <han.li1@zte.com.cn>
Cc: dev@dpdk.org, reshma.pattan@intel.com
Subject: Re: [dpdk-dev] [PATCH v3] app/proc-info: fix port mask parse issue
Date: Wed, 14 Nov 2018 10:39:51 +0000	[thread overview]
Message-ID: <c87c5a8a-5b7a-6fbf-8ead-279647d6de13@intel.com> (raw)
In-Reply-To: <3847235.2WWUCME0sW@xps>

On 14-Nov-18 3:10 AM, Thomas Monjalon wrote:
> Hi,
> 
> 07/11/2018 07:10, Li Han:
>> parse_portmask return type is int,but global variable
>> "enabled_port_mask" type is uint32_t.so in proc_info_parse_args
>> function,when parse_portmask return -1,"enabled_port_mask" will
>> get a huge value and "if (enabled_port_mask == 0)" will never happen.
>>
>> Fixes: 22561383ea17 ("app: replace dump_cfg by proc_info")
>> Signed-off-by: Li Han <han.li1@zte.com.cn>
> [...]
>> -static uint32_t enabled_port_mask;
>> +static uint64_t enabled_port_mask;
> [...]
>> -static int
>> +static unsigned long
>>   parse_portmask(const char *portmask)
> 
> On one side, you use uint64_t, on the other side, you use unsigned long.
> I don't understand the logic behind.
> 

Not only there's no logic, it'll actually fail on 32-bit, since 64-bit 
int is unsigned long long there :)

-- 
Thanks,
Anatoly

  parent reply	other threads:[~2018-11-14 10:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07  6:10 Li Han
2018-11-07  9:47 ` Pattan, Reshma
2018-11-14  3:10 ` Thomas Monjalon
2018-11-14  3:57   ` [dpdk-dev] 答复: " han.li1
2018-11-14 10:39   ` Burakov, Anatoly [this message]
2018-11-16 10:15 ` [dpdk-dev] " Burakov, Anatoly
2018-11-16 10:35   ` Burakov, Anatoly

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=c87c5a8a-5b7a-6fbf-8ead-279647d6de13@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=han.li1@zte.com.cn \
    --cc=reshma.pattan@intel.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).