From: "Wang, Haiyue" <haiyue.wang@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] The testpmd failed to parse RSS queue rules on fedora30
Date: Mon, 24 Jun 2019 18:05:17 +0000 [thread overview]
Message-ID: <E3B9F2FDCB65864C82CD632F23D8AB8773386FEF@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <E3B9F2FDCB65864C82CD632F23D8AB8773386FCC@SHSMSX101.ccr.corp.intel.com>
More information is provided:
Fedora30 GCC:
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_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[] = 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 = (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);
ret = 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 *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 as expected:
flow create 0 ingress pattern end actions rss queues 1 4 7 end / end
pop_arg = 0xa4de40, arg->offset = 4, arg->size = 2
push_arg = 0x7ffd83c3e6e0, arg->offset = 104, arg->size = 2
pop_arg = 0x7ffd83c3e6e0, arg->offset = 104, arg->size = 2
push_arg = 0x7ffd83c3e6e0, arg->offset = 106, arg->size = 2
pop_arg = 0x7ffd83c3e6e0, arg->offset = 106, arg->size = 2
push_arg = 0x7ffd83c3e6e0, arg->offset = 108, arg->size = 2
pop_arg = 0x7ffd83c3e6e0, arg->offset = 108, arg->size = 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 fedora30
>
> 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:
>
> 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:
> 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: '<U6120>.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: '<U6120>.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
prev parent reply other threads:[~2019-06-24 18:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 17:55 Wang, Haiyue
2019-06-24 18:05 ` Wang, Haiyue [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=E3B9F2FDCB65864C82CD632F23D8AB8773386FEF@SHSMSX101.ccr.corp.intel.com \
--to=haiyue.wang@intel.com \
--cc=dev@dpdk.org \
/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).