DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Li Han <han.li1@zte.com.cn>, jingjing.wu@intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] app/testpmd:fix invalid port id parameters
Date: Mon, 9 Oct 2017 05:16:23 +0100	[thread overview]
Message-ID: <961c9f96-1b02-1c89-9ec5-4c5f3e455b3f@intel.com> (raw)
In-Reply-To: <1503378222-23306-1-git-send-email-han.li1@zte.com.cn>

On 8/22/2017 6:03 AM, Li Han wrote:
> in parse_ringnuma_config/parse_portnuma_config functions,port_id
> should less than RTE_MAX_ETHPORTS,but port_id_is_invalid check
> assumes that port_id may be 255.

testpmd using RTE_PORT_ALL [1], which is in valid port_id range, as
special meaning [2] making things tricky.

Only above 255 is no more valid since port_id is not 16bits, it should
be 65535.

Except from above detail,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>


And if you are familiar with this code, above a few lines there is a
"int_fld[i] > 255" check, is the intention to check port_id limit there?
If so this is no more valid check, and would you mind sending a patch to
fix if you have time?

Thanks,
ferruh


[1]
#define RTE_PORT_ALL            (~(portid_t)0x0)


[2]
Meaning all enabled ethdev ports, like:
start_port(RTE_PORT_ALL);

> 
> Signed-off-by: Li Han <han.li1@zte.com.cn>

<...>

  parent reply	other threads:[~2017-10-09  4:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1503378222-23306-1-git-send-email-han.li1@zte.com.cn>
2017-09-04 14:11 ` Rybalchenko, Kirill
2017-09-07  8:44   ` Wu, Jingjing
2017-10-09  4:16 ` Ferruh Yigit [this message]
2017-10-09  4:57   ` Ferruh Yigit
2017-08-22  2:31 Li Han
  -- strict thread matches above, loose matches on Subject: below --
2017-08-21  8:11 Li Han

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=961c9f96-1b02-1c89-9ec5-4c5f3e455b3f@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=han.li1@zte.com.cn \
    --cc=jingjing.wu@intel.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).