DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: Bing Zhao <ilovethull@163.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"bing.zhao@hxt-semitech.com" <bing.zhao@hxt-semitech.com>,
	"jie2.liu@hxt-semitech.com" <jie2.liu@hxt-semitech.com>,
	"jia.he@hxt-semitech.com" <jia.he@hxt-semitech.com>
Subject: Re: [dpdk-dev] [pktgen] [PATCH] Fix the protocol settings with the range command.
Date: Tue, 24 Oct 2017 12:45:56 +0000	[thread overview]
Message-ID: <96FBC3DE-ADBC-45D8-99D8-B8293FCBE696@intel.com> (raw)
In-Reply-To: <20171024083718.22624-1-ilovethull@163.com>

Thank you

> On Oct 24, 2017, at 3:37 AM, Bing Zhao <ilovethull@163.com> wrote:
> 
> A "%" is missing in the command line, so the parameter comparison always returns failure. And the local variable "what" points to the argv[4], it is incorrect for this command since the argc is 4 and the max should be argv[3].
> 
> Signed-off-by: bing.zhao@hxt-semitech.com
> Signed-off-by: jie2.liu@hxt-semitech.com
> Signed-off-by: jia.he@hxt-semitech.com
> 
> ---
> app/cli-functions.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/app/cli-functions.c b/app/cli-functions.c
> index 076b86e..5e58f9c 100644
> --- a/app/cli-functions.c
> +++ b/app/cli-functions.c
> @@ -150,7 +150,7 @@ static struct cli_map range_map[] = {
> 	{ 31, "range %P src ip "SMMI" %4" },
> 	{ 32, "range %P dst ip %4 %4 %4 %4" },
> 	{ 33, "range %P src ip %4 %4 %4 %4" },
> -	{ 40, "range %P proto tcp|udp" },
> +	{ 40, "range %P proto %|tcp|udp" },
> 	{ 50, "range %P dst port "SMMI" %d" },
> 	{ 51, "range %P src port "SMMI" %d" },
> 	{ 52, "range %P dst port %d %d %d %d" },
> @@ -280,7 +280,7 @@ range_cmd(int argc, char **argv)
> 			break;
> 		case 40:
> 			foreach_port(portlist,
> -				range_set_proto(info, what) );
> +				range_set_proto(info, argv[3]) );
> 			break;
> 		case 50:
> 			foreach_port(portlist,
> -- 
> 2.11.0.windows.1
> 
> 

Regards,
Keith

      reply	other threads:[~2017-10-24 12:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24  8:37 Bing Zhao
2017-10-24 12:45 ` Wiles, Keith [this message]

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=96FBC3DE-ADBC-45D8-99D8-B8293FCBE696@intel.com \
    --to=keith.wiles@intel.com \
    --cc=bing.zhao@hxt-semitech.com \
    --cc=dev@dpdk.org \
    --cc=ilovethull@163.com \
    --cc=jia.he@hxt-semitech.com \
    --cc=jie2.liu@hxt-semitech.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).