DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wang, Haiyue" <haiyue.wang@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] The testpmd failed to parse RSS queue rules on fedora30
Date: Mon, 24 Jun 2019 17:55:33 +0000	[thread overview]
Message-ID: <E3B9F2FDCB65864C82CD632F23D8AB8773386FCC@SHSMSX101.ccr.corp.intel.com> (raw)

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


             reply	other threads:[~2019-06-24 17:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 17:55 Wang, Haiyue [this message]
2019-06-24 18:05 ` Wang, Haiyue

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=E3B9F2FDCB65864C82CD632F23D8AB8773386FCC@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).