From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: "Rybalchenko, Kirill" <kirill.rybalchenko@intel.com>,
Li Han <han.li1@zte.com.cn>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd:fix invalid port id parameters
Date: Thu, 7 Sep 2017 08:44:38 +0000 [thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F810E42674@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <696B43C21188DF4F9C9091AAE4789B824E295BC4@IRSMSX108.ger.corp.intel.com>
> -----Original Message-----
> From: Rybalchenko, Kirill
> Sent: Monday, September 4, 2017 10:12 PM
> To: Li Han <han.li1@zte.com.cn>; Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH] app/testpmd:fix invalid port id parameters
>
> Hi Han,
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Li Han
> > Sent: Tuesday 22 August 2017 06:04
> > To: Wu, Jingjing <jingjing.wu@intel.com>
> > Cc: dev@dpdk.org; Li Han <han.li1@zte.com.cn>
> > Subject: [dpdk-dev] [PATCH] app/testpmd:fix invalid port id parameters
> >
> > 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.
> >
> > Signed-off-by: Li Han <han.li1@zte.com.cn>
> > ---
> > app/test-pmd/parameters.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index
> > 2f7f70f..0c97ba4 100644
> > --- a/app/test-pmd/parameters.c
> > +++ b/app/test-pmd/parameters.c
> > @@ -424,7 +424,8 @@
> > return -1;
> > }
> > port_id = (uint8_t)int_fld[FLD_PORT];
> > - if (port_id_is_invalid(port_id, ENABLED_WARN)) {
> > + if (port_id_is_invalid(port_id, ENABLED_WARN) ||
> > + port_id == (portid_t)RTE_PORT_ALL) {
> In this case the message "printf("Invalid port %d\n", port_id)" will be omitted and there
> will be no way
> To figure out which port id caused the problem
Why? If the port_id is invalid and not RTE_PORT_ALL, the "printf("Invalid port %d\n", port_id)" should be print.
next prev parent reply other threads:[~2017-09-07 8:44 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 [this message]
2017-10-09 4:16 ` Ferruh Yigit
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=9BB6961774997848B5B42BEC655768F810E42674@SHSMSX103.ccr.corp.intel.com \
--to=jingjing.wu@intel.com \
--cc=dev@dpdk.org \
--cc=han.li1@zte.com.cn \
--cc=kirill.rybalchenko@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).