app/testpmd: fix empty list of RSS queues for flow
[dpdk.git] / app / test-pmd / cmdline_flow.c
index 1ac04a0..f4ea0a5 100644 (file)
@@ -420,7 +420,7 @@ struct buffer {
                } destroy; /**< Destroy arguments. */
                struct {
                        uint32_t rule;
-                       enum rte_flow_action_type action;
+                       struct rte_flow_action action;
                } query; /**< Query arguments. */
                struct {
                        uint32_t *group;
@@ -1101,7 +1101,7 @@ static const struct token token_list[] = {
                .next = NEXT(NEXT_ENTRY(QUERY_ACTION),
                             NEXT_ENTRY(RULE_ID),
                             NEXT_ENTRY(PORT_ID)),
-               .args = ARGS(ARGS_ENTRY(struct buffer, args.query.action),
+               .args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
                             ARGS_ENTRY(struct buffer, args.query.rule),
                             ARGS_ENTRY(struct buffer, port)),
                .call = parse_query,
@@ -2896,7 +2896,7 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
        i = ctx->objdata >> 16;
        if (!strcmp_partial("end", str, len)) {
                ctx->objdata &= 0xffff;
-               return len;
+               goto end;
        }
        if (i >= ACTION_RSS_QUEUE_NUM)
                return -1;
@@ -2916,6 +2916,7 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
        if (ctx->next_num == RTE_DIM(ctx->next))
                return -1;
        ctx->next[ctx->next_num++] = next;
+end:
        if (!ctx->object)
                return len;
        action_rss_data = ctx->object;
@@ -3842,7 +3843,7 @@ cmd_flow_parsed(const struct buffer *in)
                break;
        case QUERY:
                port_flow_query(in->port, in->args.query.rule,
-                               in->args.query.action);
+                               &in->args.query.action);
                break;
        case LIST:
                port_flow_list(in->port, in->args.list.group_n,