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