dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [dpdk-dev] The testpmd failed to parse RSS queue rules on fedora30
@ 2019-06-24 17:55 Wang, Haiyue
  2019-06-24 18:05 ` Wang, Haiyue
  0 siblings, 1 reply; 2+ messages in thread
From: Wang, Haiyue @ 2019-06-24 17:55 UTC (permalink / raw)
  To: 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:

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] The testpmd failed to parse RSS queue rules on fedora30
  2019-06-24 17:55 [dpdk-dev] The testpmd failed to parse RSS queue rules on fedora30 Wang, Haiyue
@ 2019-06-24 18:05 ` Wang, Haiyue
  0 siblings, 0 replies; 2+ messages in thread
From: Wang, Haiyue @ 2019-06-24 18:05 UTC (permalink / raw)
  To: dev

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-24 18:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 17:55 [dpdk-dev] The testpmd failed to parse RSS queue rules on fedora30 Wang, Haiyue
2019-06-24 18:05 ` Wang, Haiyue

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).