From patchwork Mon Jun 24 17:55:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Haiyue" X-Patchwork-Id: 55266 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2732B1BC97; Mon, 24 Jun 2019 19:55:40 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 58D581BACE for ; Mon, 24 Jun 2019 19:55:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jun 2019 10:55:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,412,1557212400"; d="scan'208";a="187994301" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 24 Jun 2019 10:55:36 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Jun 2019 10:55:36 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Jun 2019 10:55:35 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.87]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.185]) with mapi id 14.03.0439.000; Tue, 25 Jun 2019 01:55:34 +0800 From: "Wang, Haiyue" To: "dev@dpdk.org" Thread-Topic: The testpmd failed to parse RSS queue rules on fedora30 Thread-Index: AdUqtI3twry3nd6XQmGrLJw2GPWg4Q== Date: Mon, 24 Jun 2019 17:55:33 +0000 Message-ID: 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] MIME-Version: 1.0 Subject: [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" Hi, After upgrading the Fedora29 to 30, then met the flow cmdline parse issue, like testpmd> flow create 0 ingress pattern end actions rss queues 1 4 7 end / end Bad arguments After debug by adding bellow checking code: pop_arg = 0x97b1c0, arg->offset = 4, arg->size = 2 push_arg = 0x7fffffff8080 pop_arg = 0x7fffffff8080, arg->offset = 5912737, arg->size = 0 RSS queue: <1> failed Bad arguments It indicates that queue number parsing failed. I wanted to dump the 'arg->offset' in 'parse_vc_action_rss_queue' like: static void dump_push_args(struct context *ctx) { const struct arg *arg = pop_args(ctx); ctx->args_num++; /* recover */ printf("push_arg = %p, arg->offset = %u, arg->size = %u\n", arg, arg->offset, arg->size); } or static void dump_push_args(struct context *ctx) { const struct arg *arg = (const struct arg *)ctx->args[ctx->args_num - 1]; printf("push_arg = %p, arg->offset = %u, arg->size = %u\n", arg, arg->offset, arg->size); } Both of them failed to compile: /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=maybe-uninitialized] 3373 | printf("push_arg = %p, arg->offset = %u, arg->size = %u\n", arg, arg->offset, arg->size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /root/dpdk/app/test-pmd/cmdline_flow.c:3373:2: error: '.offset' may be used uninitialized in this function [-Werror=maybe-uninitialized] cc1: all warnings being treated as errors So I only can dump the 'arg' pointer address, it looks OK, the same value, but the 'offset' and 'size' are wrong. Does anyone suffer from this on fedora 30?? BR, Haiyue 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, const struct token *token, i * sizeof(action_rss_data->queue[i]), sizeof(action_rss_data->queue[i])))) return -1; + printf("push_arg = %p\n", ctx->args[ctx->args_num - 1]); ret = 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 = %p, arg->offset = %u, arg->size = %u\n", + arg, arg->offset, arg->size); + The output is: