DPDK patches and discussions
 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	[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).