From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 14D011B7D6 for ; Tue, 24 Oct 2017 14:45:59 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2017 05:45:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,427,1503385200"; d="scan'208";a="327029186" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 24 Oct 2017 05:45:57 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 24 Oct 2017 05:45:57 -0700 Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.51]) by FMSMSX112.amr.corp.intel.com ([169.254.5.121]) with mapi id 14.03.0319.002; Tue, 24 Oct 2017 05:45:57 -0700 From: "Wiles, Keith" To: Bing Zhao CC: "dev@dpdk.org" , "bing.zhao@hxt-semitech.com" , "jie2.liu@hxt-semitech.com" , "jia.he@hxt-semitech.com" Thread-Topic: [dpdk-dev] [pktgen] [PATCH] Fix the protocol settings with the range command. Thread-Index: AQHTTKNe3GN4We/TS0ijj6k6aadfeaLzaCMA Date: Tue, 24 Oct 2017 12:45:56 +0000 Message-ID: <96FBC3DE-ADBC-45D8-99D8-B8293FCBE696@intel.com> References: <20171024083718.22624-1-ilovethull@163.com> In-Reply-To: <20171024083718.22624-1-ilovethull@163.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.252.140.76] Content-Type: text/plain; charset="us-ascii" Content-ID: <7605363C197B8743A502E3D2BFABF4AE@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [pktgen] [PATCH] Fix the protocol settings with the range command. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Oct 2017 12:46:00 -0000 Thank you > On Oct 24, 2017, at 3:37 AM, Bing Zhao wrote: >=20 > 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]. >=20 > Signed-off-by: bing.zhao@hxt-semitech.com > Signed-off-by: jie2.liu@hxt-semitech.com > Signed-off-by: jia.he@hxt-semitech.com >=20 > --- > app/cli-functions.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > 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[] =3D { > { 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, > --=20 > 2.11.0.windows.1 >=20 >=20 Regards, Keith