From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 46A36A046B for ; Mon, 24 Jun 2019 20:05:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B346F1BCCD; Mon, 24 Jun 2019 20:05:25 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 044731BCCC for ; Mon, 24 Jun 2019 20:05:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jun 2019 11:05:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,412,1557212400"; d="scan'208";a="169517978" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 24 Jun 2019 11:05:23 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Jun 2019 11:05:20 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.87]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.83]) with mapi id 14.03.0439.000; Tue, 25 Jun 2019 02:05:18 +0800 From: "Wang, Haiyue" To: "dev@dpdk.org" Thread-Topic: The testpmd failed to parse RSS queue rules on fedora30 Thread-Index: AdUqtI3twry3nd6XQmGrLJw2GPWg4QAAmZ2Q Date: Mon, 24 Jun 2019 18:05:17 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTI4YzJjZmUtNjMyNy00Y2M1LTg2MjAtMDkzMzVkYTA4NzhhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicTZOS3IwWEdsXC9weWoyZ2ZWTHZIXC9KcVJEYUdsbjJEK3Zzc085WjhRWlFtUlFVSjVJTlQzMW9ha3JTbm92Y1RWIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] The testpmd failed to parse RSS queue rules on fedora30 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" More information is provided: Fedora30 GCC:=20 gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper OFFLOAD_TARGET_NAMES=3Dnvptx-none OFFLOAD_TARGET_DEFAULT=3D1 Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=3Dc,c++= ,fortran,objc,obj-c++,ada,go,d,lto --prefix=3D/usr --mandir=3D/usr/share/ma= n --infodir=3D/usr/share/info --with-bugurl=3Dhttp://bugzilla.redhat.com/bu= gzilla --enable-shared --enable-threads=3Dposix --enable-checking=3Drelease= --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libun= wind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-= gcc-major-version-only --with-linker-hash-style=3Dgnu --enable-plugin --ena= ble-initfini-array --with-isl --enable-offload-targets=3Dnvptx-none --witho= ut-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=3Dge= neric --with-arch_32=3Di686 --build=3Dx86_64-redhat-linux Thread model: posix gcc version 9.1.1 20190503 (Red Hat 9.1.1-1) (GCC) --- On Ubuntu 16.04, I can dump the arg's value like, no problem for compiling: diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 201bd9d..cc1d41c 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -3378,6 +3378,7 @@ parse_vc_action_rss_queue(struct context *ctx, const = struct token *token, { static const enum index next[] =3D NEXT_ENTRY(ACTION_RSS_QUEUE); struct action_rss_data *action_rss_data; + const struct arg *arg; int ret; int i; @@ -3398,6 +3399,8 @@ parse_vc_action_rss_queue(struct context *ctx, const = struct token *token, i * sizeof(action_rss_data->queue[i]), sizeof(action_rss_data->queue[i])))) return -1; + arg =3D (const struct arg *)ctx->args[ctx->args_num - 1]; + printf("push_arg =3D %p, arg->offset =3D %u, arg->size =3D %u\n", a= rg, arg->offset, arg->size); ret =3D parse_int(ctx, token, str, len, NULL, 0); if (ret < 0) { pop_args(ctx); @@ -4349,6 +4352,9 @@ parse_int(struct context *ctx, const struct token *to= ken, /* Argument is expected. */ if (!arg) return -1; + + printf("pop_arg =3D %p, arg->offset =3D %u, arg->size =3D %u\n", ar= g, arg->offset, arg->size); + The output is as expected: flow create 0 ingress pattern end actions rss queues 1 4 7 end / end pop_arg =3D 0xa4de40, arg->offset =3D 4, arg->size =3D 2 push_arg =3D 0x7ffd83c3e6e0, arg->offset =3D 104, arg->size =3D 2 pop_arg =3D 0x7ffd83c3e6e0, arg->offset =3D 104, arg->size =3D 2 push_arg =3D 0x7ffd83c3e6e0, arg->offset =3D 106, arg->size =3D 2 pop_arg =3D 0x7ffd83c3e6e0, arg->offset =3D 106, arg->size =3D 2 push_arg =3D 0x7ffd83c3e6e0, arg->offset =3D 108, arg->size =3D 2 pop_arg =3D 0x7ffd83c3e6e0, arg->offset =3D 108, arg->size =3D 2 Flow rule #0 created BR, Haiyue > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wang, Haiyue > Sent: Tuesday, June 25, 2019 01:56 > To: dev@dpdk.org > Subject: [dpdk-dev] The testpmd failed to parse RSS queue rules on fedora= 30 >=20 > Hi, >=20 > After upgrading the Fedora29 to 30, then met the flow cmdline parse issue= , like >=20 > testpmd> flow create 0 ingress pattern end actions rss queues 1 4 7 end /= end > Bad arguments >=20 > After debug by adding bellow checking code: >=20 > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 201bd9de5..ea387d2ff 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -3398,8 +3398,10 @@ parse_vc_action_rss_queue(struct context *ctx, con= st struct token *token, > i * sizeof(action_rss_data->queue[i]= ), > sizeof(action_rss_data->queue[i])))) > return -1; > + printf("push_arg =3D %p\n", ctx->args[ctx->args_num - 1]); > ret =3D parse_int(ctx, token, str, len, NULL, 0); > if (ret < 0) { > + printf("RSS queue: <%.*s> failed\n", len, str); > pop_args(ctx); > return -1; > } > @@ -4349,6 +4351,10 @@ parse_int(struct context *ctx, const struct token = *token, > /* Argument is expected. */ > if (!arg) > return -1; > + > + printf("pop_arg =3D %p, arg->offset =3D %u, arg->size =3D %u\n", > + arg, arg->offset, arg->size); > + >=20 >=20 > The output is: > pop_arg =3D 0x97b1c0, arg->offset =3D 4, arg->size =3D 2 > push_arg =3D 0x7fffffff8080 > pop_arg =3D 0x7fffffff8080, arg->offset =3D 5912737, arg->size =3D 0 > RSS queue: <1> failed > Bad arguments >=20 > It indicates that queue number parsing failed. I wanted to dump the 'arg-= >offset' > in 'parse_vc_action_rss_queue' like: >=20 > static void dump_push_args(struct context *ctx) > { > const struct arg *arg =3D pop_args(ctx); >=20 > ctx->args_num++; /* recover */ >=20 > printf("push_arg =3D %p, arg->offset =3D %u, arg->size =3D %u\n",= arg, arg->offset, arg->size); > } >=20 > or >=20 > static void dump_push_args(struct context *ctx) > { > const struct arg *arg =3D (const struct arg *)ctx->args[ctx->args_num - = 1]; >=20 > printf("push_arg =3D %p, arg->offset =3D %u, arg->size =3D %u\n", arg, a= rg->offset, arg->size); > } >=20 > Both of them failed to compile: >=20 > /root/dpdk/app/test-pmd/cmdline_flow.c: In function 'parse_vc_action_rss_= queue': > /root/dpdk/app/test-pmd/cmdline_flow.c:3373:2: error: '.size' may = be used uninitialized in this > function [-Werror=3Dmaybe-uninitialized] > 3373 | printf("push_arg =3D %p, arg->offset =3D %u, arg->size =3D %u\n"= , arg, arg->offset, arg->size); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~~~~~~~~~~ > /root/dpdk/app/test-pmd/cmdline_flow.c:3373:2: error: '.offset' ma= y be used uninitialized in > this function [-Werror=3Dmaybe-uninitialized] > cc1: all warnings being treated as errors >=20 > So I only can dump the 'arg' pointer address, it looks OK, the same value= , but the 'offset' and 'size' > are wrong. >=20 > Does anyone suffer from this on fedora 30?? >=20 > BR, > Haiyue