get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/80172/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 80172,
    "url": "http://patchwork.dpdk.org/api/patches/80172/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1602251166-269265-3-git-send-email-jiaweiw@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1602251166-269265-3-git-send-email-jiaweiw@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1602251166-269265-3-git-send-email-jiaweiw@nvidia.com",
    "date": "2020-10-09T13:46:05",
    "name": "[v9,2/3] app/testpmd: add testpmd command for sample action",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8eeb893d4cc281848422e94a1b5d109437ad5657",
    "submitter": {
        "id": 1939,
        "url": "http://patchwork.dpdk.org/api/people/1939/?format=api",
        "name": "Jiawei Wang",
        "email": "jiaweiw@nvidia.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1602251166-269265-3-git-send-email-jiaweiw@nvidia.com/mbox/",
    "series": [
        {
            "id": 12828,
            "url": "http://patchwork.dpdk.org/api/series/12828/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=12828",
            "date": "2020-10-09T13:46:03",
            "name": "support the flow-based traffic sampling",
            "version": 9,
            "mbox": "http://patchwork.dpdk.org/series/12828/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/80172/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/80172/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 4BB8FA04BC;\n\tFri,  9 Oct 2020 15:46:43 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 239EA1D640;\n\tFri,  9 Oct 2020 15:46:13 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 9A0681D414\n for <dev@dpdk.org>; Fri,  9 Oct 2020 15:46:08 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n jiaweiw@nvidia.com) with SMTP; 9 Oct 2020 16:46:06 +0300",
            "from nvidia.com (gen-l-vrt-280.mtl.labs.mlnx [10.237.45.1])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 099Dk6sM011875;\n Fri, 9 Oct 2020 16:46:06 +0300"
        ],
        "From": "Jiawei Wang <jiaweiw@nvidia.com>",
        "To": "orika@nvidia.com, viacheslavo@nvidia.com, matan@nvidia.com,\n thomas@monjalon.net, ferruh.yigit@intel.com, marko.kovacevic@intel.com,\n arybchenko@solarflare.com",
        "Cc": "dev@dpdk.org, rasland@nvidia.com, ian.stokes@intel.com, fbl@redhat.com,\n asafp@nvidia.com",
        "Date": "Fri,  9 Oct 2020 16:46:05 +0300",
        "Message-Id": "<1602251166-269265-3-git-send-email-jiaweiw@nvidia.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1602251166-269265-1-git-send-email-jiaweiw@nvidia.com>",
        "References": "<1601187539-112694-1-git-send-email-jiaweiw@nvidia.com>\n <1602251166-269265-1-git-send-email-jiaweiw@nvidia.com>",
        "Subject": "[dpdk-dev] [PATCH v9 2/3] app/testpmd: add testpmd command for\n\tsample action",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add a new testpmd command 'set sample_actions' that supports the multiple\nsample actions list configuration by using the index:\nset sample_actions <index> <actions list>\n\nThe examples for the sample flow use case and result as below:\n\n1. set sample_actions 0 mark id 0x8 / queue index 2 / end\n.. pattern eth / end actions sample ratio 2 index 0 / jump group 2 ...\n\nThis flow will result in all the matched ingress packets will be\njumped to next flow table, and the each second packet will be\nmarked and sent to queue 2 of the control application.\n\n2. ...pattern eth / end actions sample ratio 2 / port_id id 2 ...\n\nThe flow will result in all the matched ingress packets will be\nduplicated and sent to the representor peer (VF or wire) on DPDK port 2,\nand the each second packet will also be sent to E-Switch manager vport.\n\nSigned-off-by: Jiawei Wang <jiaweiw@nvidia.com>\nAcked-by: Ori Kam <orika@nvidia.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\n---\n app/test-pmd/cmdline_flow.c | 285 ++++++++++++++++++++++++++++++++++++++++++--\n 1 file changed, 276 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex 6e04d53..5195a62 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -56,6 +56,8 @@ enum index {\n \tSET_RAW_ENCAP,\n \tSET_RAW_DECAP,\n \tSET_RAW_INDEX,\n+\tSET_SAMPLE_ACTIONS,\n+\tSET_SAMPLE_INDEX,\n \n \t/* Top-level command. */\n \tFLOW,\n@@ -360,6 +362,10 @@ enum index {\n \tACTION_SET_IPV6_DSCP_VALUE,\n \tACTION_AGE,\n \tACTION_AGE_TIMEOUT,\n+\tACTION_SAMPLE,\n+\tACTION_SAMPLE_RATIO,\n+\tACTION_SAMPLE_INDEX,\n+\tACTION_SAMPLE_INDEX_VALUE,\n };\n \n /** Maximum size for pattern in struct rte_flow_item_raw. */\n@@ -495,6 +501,22 @@ struct action_nvgre_encap_data {\n \n struct mplsoudp_decap_conf mplsoudp_decap_conf;\n \n+#define ACTION_SAMPLE_ACTIONS_NUM 10\n+#define RAW_SAMPLE_CONFS_MAX_NUM 8\n+/** Storage for struct rte_flow_action_sample including external data. */\n+struct action_sample_data {\n+\tstruct rte_flow_action_sample conf;\n+\tuint32_t idx;\n+};\n+/** Storage for struct rte_flow_action_sample. */\n+struct raw_sample_conf {\n+\tstruct rte_flow_action data[ACTION_SAMPLE_ACTIONS_NUM];\n+};\n+struct raw_sample_conf raw_sample_confs[RAW_SAMPLE_CONFS_MAX_NUM];\n+struct rte_flow_action_mark sample_mark[RAW_SAMPLE_CONFS_MAX_NUM];\n+struct rte_flow_action_queue sample_queue[RAW_SAMPLE_CONFS_MAX_NUM];\n+struct rte_flow_action_count sample_count[RAW_SAMPLE_CONFS_MAX_NUM];\n+\n /** Maximum number of subsequent tokens and arguments on the stack. */\n #define CTX_STACK_SIZE 16\n \n@@ -1193,6 +1215,7 @@ struct parse_action_priv {\n \tACTION_SET_IPV4_DSCP,\n \tACTION_SET_IPV6_DSCP,\n \tACTION_AGE,\n+\tACTION_SAMPLE,\n \tZERO,\n };\n \n@@ -1425,9 +1448,28 @@ struct parse_action_priv {\n \tZERO,\n };\n \n+static const enum index action_sample[] = {\n+\tACTION_SAMPLE,\n+\tACTION_SAMPLE_RATIO,\n+\tACTION_SAMPLE_INDEX,\n+\tACTION_NEXT,\n+\tZERO,\n+};\n+\n+static const enum index next_action_sample[] = {\n+\tACTION_QUEUE,\n+\tACTION_MARK,\n+\tACTION_COUNT,\n+\tACTION_NEXT,\n+\tZERO,\n+};\n+\n static int parse_set_raw_encap_decap(struct context *, const struct token *,\n \t\t\t\t     const char *, unsigned int,\n \t\t\t\t     void *, unsigned int);\n+static int parse_set_sample_action(struct context *, const struct token *,\n+\t\t\t\t   const char *, unsigned int,\n+\t\t\t\t   void *, unsigned int);\n static int parse_set_init(struct context *, const struct token *,\n \t\t\t  const char *, unsigned int,\n \t\t\t  void *, unsigned int);\n@@ -1495,7 +1537,15 @@ static int parse_vc_action_raw_decap_index(struct context *,\n static int parse_vc_action_set_meta(struct context *ctx,\n \t\t\t\t    const struct token *token, const char *str,\n \t\t\t\t    unsigned int len, void *buf,\n+\t\t\t\t\tunsigned int size);\n+static int parse_vc_action_sample(struct context *ctx,\n+\t\t\t\t    const struct token *token, const char *str,\n+\t\t\t\t    unsigned int len, void *buf,\n \t\t\t\t    unsigned int size);\n+static int\n+parse_vc_action_sample_index(struct context *ctx, const struct token *token,\n+\t\t\t\tconst char *str, unsigned int len, void *buf,\n+\t\t\t\tunsigned int size);\n static int parse_destroy(struct context *, const struct token *,\n \t\t\t const char *, unsigned int,\n \t\t\t void *, unsigned int);\n@@ -1566,6 +1616,8 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,\n \t\t\t\t    unsigned int, char *, unsigned int);\n static int comp_set_raw_index(struct context *, const struct token *,\n \t\t\t      unsigned int, char *, unsigned int);\n+static int comp_set_sample_index(struct context *, const struct token *,\n+\t\t\t      unsigned int, char *, unsigned int);\n \n /** Token definitions. */\n static const struct token token_list[] = {\n@@ -3721,11 +3773,13 @@ static int comp_set_raw_index(struct context *, const struct token *,\n \t/* Top level command. */\n \t[SET] = {\n \t\t.name = \"set\",\n-\t\t.help = \"set raw encap/decap data\",\n-\t\t.type = \"set raw_encap|raw_decap <index> <pattern>\",\n+\t\t.help = \"set raw encap/decap/sample data\",\n+\t\t.type = \"set raw_encap|raw_decap <index> <pattern>\"\n+\t\t\t\t\" or set sample_actions <index> <action>\",\n \t\t.next = NEXT(NEXT_ENTRY\n \t\t\t     (SET_RAW_ENCAP,\n-\t\t\t      SET_RAW_DECAP)),\n+\t\t\t      SET_RAW_DECAP,\n+\t\t\t      SET_SAMPLE_ACTIONS)),\n \t\t.call = parse_set_init,\n \t},\n \t/* Sub-level commands. */\n@@ -3756,6 +3810,23 @@ static int comp_set_raw_index(struct context *, const struct token *,\n \t\t.next = NEXT(next_item),\n \t\t.call = parse_port,\n \t},\n+\t[SET_SAMPLE_INDEX] = {\n+\t\t.name = \"{index}\",\n+\t\t.type = \"UNSIGNED\",\n+\t\t.help = \"index of sample actions\",\n+\t\t.next = NEXT(next_action_sample),\n+\t\t.call = parse_port,\n+\t},\n+\t[SET_SAMPLE_ACTIONS] = {\n+\t\t.name = \"sample_actions\",\n+\t\t.help = \"set sample actions list\",\n+\t\t.next = NEXT(NEXT_ENTRY(SET_SAMPLE_INDEX)),\n+\t\t.args = ARGS(ARGS_ENTRY_ARB_BOUNDED\n+\t\t\t\t(offsetof(struct buffer, port),\n+\t\t\t\t sizeof(((struct buffer *)0)->port),\n+\t\t\t\t 0, RAW_SAMPLE_CONFS_MAX_NUM - 1)),\n+\t\t.call = parse_set_sample_action,\n+\t},\n \t[ACTION_SET_TAG] = {\n \t\t.name = \"set_tag\",\n \t\t.help = \"set tag\",\n@@ -3859,6 +3930,37 @@ static int comp_set_raw_index(struct context *, const struct token *,\n \t\t.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),\n \t\t.call = parse_vc_conf,\n \t},\n+\t[ACTION_SAMPLE] = {\n+\t\t.name = \"sample\",\n+\t\t.help = \"set a sample action\",\n+\t\t.next = NEXT(action_sample),\n+\t\t.priv = PRIV_ACTION(SAMPLE,\n+\t\t\tsizeof(struct action_sample_data)),\n+\t\t.call = parse_vc_action_sample,\n+\t},\n+\t[ACTION_SAMPLE_RATIO] = {\n+\t\t.name = \"ratio\",\n+\t\t.help = \"flow sample ratio value\",\n+\t\t.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),\n+\t\t.args = ARGS(ARGS_ENTRY_ARB\n+\t\t\t     (offsetof(struct action_sample_data, conf) +\n+\t\t\t      offsetof(struct rte_flow_action_sample, ratio),\n+\t\t\t      sizeof(((struct rte_flow_action_sample *)0)->\n+\t\t\t\t     ratio))),\n+\t},\n+\t[ACTION_SAMPLE_INDEX] = {\n+\t\t.name = \"index\",\n+\t\t.help = \"the index of sample actions list\",\n+\t\t.next = NEXT(NEXT_ENTRY(ACTION_SAMPLE_INDEX_VALUE)),\n+\t},\n+\t[ACTION_SAMPLE_INDEX_VALUE] = {\n+\t\t.name = \"{index}\",\n+\t\t.type = \"UNSIGNED\",\n+\t\t.help = \"unsigned integer value\",\n+\t\t.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),\n+\t\t.call = parse_vc_action_sample_index,\n+\t\t.comp = comp_set_sample_index,\n+\t},\n };\n \n /** Remove and return last entry from argument stack. */\n@@ -5369,6 +5471,76 @@ static int comp_set_raw_index(struct context *, const struct token *,\n \treturn len;\n }\n \n+static int\n+parse_vc_action_sample(struct context *ctx, const struct token *token,\n+\t\t\t const char *str, unsigned int len, void *buf,\n+\t\t\t unsigned int size)\n+{\n+\tstruct buffer *out = buf;\n+\tstruct rte_flow_action *action;\n+\tstruct action_sample_data *action_sample_data = NULL;\n+\tstatic struct rte_flow_action end_action = {\n+\t\tRTE_FLOW_ACTION_TYPE_END, 0\n+\t};\n+\tint ret;\n+\n+\tret = parse_vc(ctx, token, str, len, buf, size);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\t/* Nothing else to do if there is no buffer. */\n+\tif (!out)\n+\t\treturn ret;\n+\tif (!out->args.vc.actions_n)\n+\t\treturn -1;\n+\taction = &out->args.vc.actions[out->args.vc.actions_n - 1];\n+\t/* Point to selected object. */\n+\tctx->object = out->args.vc.data;\n+\tctx->objmask = NULL;\n+\t/* Copy the headers to the buffer. */\n+\taction_sample_data = ctx->object;\n+\taction_sample_data->conf.actions = &end_action;\n+\taction->conf = &action_sample_data->conf;\n+\treturn ret;\n+}\n+\n+static int\n+parse_vc_action_sample_index(struct context *ctx, const struct token *token,\n+\t\t\t\tconst char *str, unsigned int len, void *buf,\n+\t\t\t\tunsigned int size)\n+{\n+\tstruct action_sample_data *action_sample_data;\n+\tstruct rte_flow_action *action;\n+\tconst struct arg *arg;\n+\tstruct buffer *out = buf;\n+\tint ret;\n+\tuint16_t idx;\n+\n+\tRTE_SET_USED(token);\n+\tRTE_SET_USED(buf);\n+\tRTE_SET_USED(size);\n+\tif (ctx->curr != ACTION_SAMPLE_INDEX_VALUE)\n+\t\treturn -1;\n+\targ = ARGS_ENTRY_ARB_BOUNDED\n+\t\t(offsetof(struct action_sample_data, idx),\n+\t\t sizeof(((struct action_sample_data *)0)->idx),\n+\t\t 0, RAW_SAMPLE_CONFS_MAX_NUM - 1);\n+\tif (push_args(ctx, arg))\n+\t\treturn -1;\n+\tret = parse_int(ctx, token, str, len, NULL, 0);\n+\tif (ret < 0) {\n+\t\tpop_args(ctx);\n+\t\treturn -1;\n+\t}\n+\tif (!ctx->object)\n+\t\treturn len;\n+\taction = &out->args.vc.actions[out->args.vc.actions_n - 1];\n+\taction_sample_data = ctx->object;\n+\tidx = action_sample_data->idx;\n+\taction_sample_data->conf.actions = raw_sample_confs[idx].data;\n+\taction->conf = &action_sample_data->conf;\n+\treturn len;\n+}\n+\n /** Parse tokens for destroy command. */\n static int\n parse_destroy(struct context *ctx, const struct token *token,\n@@ -6133,6 +6305,38 @@ static int comp_set_raw_index(struct context *, const struct token *,\n \tif (!out->command)\n \t\treturn -1;\n \tout->command = ctx->curr;\n+\t/* For encap/decap we need is pattern */\n+\tout->args.vc.pattern = (void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),\n+\t\t\t\t\t\t       sizeof(double));\n+\treturn len;\n+}\n+\n+/** Parse set command, initialize output buffer for subsequent tokens. */\n+static int\n+parse_set_sample_action(struct context *ctx, const struct token *token,\n+\t\t\t  const char *str, unsigned int len,\n+\t\t\t  void *buf, unsigned int size)\n+{\n+\tstruct buffer *out = buf;\n+\n+\t/* Token name must match. */\n+\tif (parse_default(ctx, token, str, len, NULL, 0) < 0)\n+\t\treturn -1;\n+\t/* Nothing else to do if there is no buffer. */\n+\tif (!out)\n+\t\treturn len;\n+\t/* Make sure buffer is large enough. */\n+\tif (size < sizeof(*out))\n+\t\treturn -1;\n+\tctx->objdata = 0;\n+\tctx->objmask = NULL;\n+\tctx->object = out;\n+\tif (!out->command)\n+\t\treturn -1;\n+\tout->command = ctx->curr;\n+\t/* For sampler we need is actions */\n+\tout->args.vc.actions = (void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),\n+\t\t\t\t\t\t       sizeof(double));\n \treturn len;\n }\n \n@@ -6169,11 +6373,8 @@ static int comp_set_raw_index(struct context *, const struct token *,\n \t\t\treturn -1;\n \t\tout->command = ctx->curr;\n \t\tout->args.vc.data = (uint8_t *)out + size;\n-\t\t/* All we need is pattern */\n-\t\tout->args.vc.pattern =\n-\t\t\t(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),\n-\t\t\t\t\t       sizeof(double));\n-\t\tctx->object = out->args.vc.pattern;\n+\t\tctx->object  = (void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),\n+\t\t\t\t\t\t       sizeof(double));\n \t}\n \treturn len;\n }\n@@ -6324,6 +6525,24 @@ static int comp_set_raw_index(struct context *, const struct token *,\n \treturn nb;\n }\n \n+/** Complete index number for set raw_encap/raw_decap commands. */\n+static int\n+comp_set_sample_index(struct context *ctx, const struct token *token,\n+\t\t   unsigned int ent, char *buf, unsigned int size)\n+{\n+\tuint16_t idx = 0;\n+\tuint16_t nb = 0;\n+\n+\tRTE_SET_USED(ctx);\n+\tRTE_SET_USED(token);\n+\tfor (idx = 0; idx < RAW_SAMPLE_CONFS_MAX_NUM; ++idx) {\n+\t\tif (buf && idx == ent)\n+\t\t\treturn snprintf(buf, size, \"%u\", idx);\n+\t\t++nb;\n+\t}\n+\treturn nb;\n+}\n+\n /** Internal context. */\n static struct context cmd_flow_context;\n \n@@ -6769,7 +6988,53 @@ static int comp_set_raw_index(struct context *, const struct token *,\n \treturn mask;\n }\n \n-\n+/** Dispatch parsed buffer to function calls. */\n+static void\n+cmd_set_raw_parsed_sample(const struct buffer *in)\n+{\n+\tuint32_t n = in->args.vc.actions_n;\n+\tuint32_t i = 0;\n+\tstruct rte_flow_action *action = NULL;\n+\tstruct rte_flow_action *data = NULL;\n+\tsize_t size = 0;\n+\tuint16_t idx = in->port; /* We borrow port field as index */\n+\tuint32_t max_size = sizeof(struct rte_flow_action) *\n+\t\t\t\t\t\tACTION_SAMPLE_ACTIONS_NUM;\n+\n+\tRTE_ASSERT(in->command == SET_SAMPLE_ACTIONS);\n+\tdata = (struct rte_flow_action *)&raw_sample_confs[idx].data;\n+\tmemset(data, 0x00, max_size);\n+\tfor (; i <= n - 1; i++) {\n+\t\taction = in->args.vc.actions + i;\n+\t\tif (action->type == RTE_FLOW_ACTION_TYPE_END)\n+\t\t\tbreak;\n+\t\tswitch (action->type) {\n+\t\tcase RTE_FLOW_ACTION_TYPE_MARK:\n+\t\t\tsize = sizeof(struct rte_flow_action_mark);\n+\t\t\trte_memcpy(&sample_mark[idx],\n+\t\t\t\t(const void *)action->conf, size);\n+\t\t\taction->conf = &sample_mark[idx];\n+\t\t\tbreak;\n+\t\tcase RTE_FLOW_ACTION_TYPE_COUNT:\n+\t\t\tsize = sizeof(struct rte_flow_action_count);\n+\t\t\trte_memcpy(&sample_count[idx],\n+\t\t\t\t(const void *)action->conf, size);\n+\t\t\taction->conf = &sample_count[idx];\n+\t\t\tbreak;\n+\t\tcase RTE_FLOW_ACTION_TYPE_QUEUE:\n+\t\t\tsize = sizeof(struct rte_flow_action_queue);\n+\t\t\trte_memcpy(&sample_queue[idx],\n+\t\t\t\t(const void *)action->conf, size);\n+\t\t\taction->conf = &sample_queue[idx];\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tprintf(\"Error - Not supported action\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\trte_memcpy(data, action, sizeof(struct rte_flow_action));\n+\t\tdata++;\n+\t}\n+}\n \n /** Dispatch parsed buffer to function calls. */\n static void\n@@ -6786,6 +7051,8 @@ static int comp_set_raw_index(struct context *, const struct token *,\n \tuint16_t proto = 0;\n \tuint16_t idx = in->port; /* We borrow port field as index */\n \n+\tif (in->command == SET_SAMPLE_ACTIONS)\n+\t\treturn cmd_set_raw_parsed_sample(in);\n \tRTE_ASSERT(in->command == SET_RAW_ENCAP ||\n \t\t   in->command == SET_RAW_DECAP);\n \tif (in->command == SET_RAW_ENCAP) {\n",
    "prefixes": [
        "v9",
        "2/3"
    ]
}