get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 29692,
    "url": "http://patches.dpdk.org/api/patches/29692/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/6e6c479a5c7e44a831f0d47ee73f6888b13fb15d.1507207731.git.nelio.laranjeiro@6wind.com/",
    "project": {
        "id": 1,
        "url": "http://patches.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": "<6e6c479a5c7e44a831f0d47ee73f6888b13fb15d.1507207731.git.nelio.laranjeiro@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/6e6c479a5c7e44a831f0d47ee73f6888b13fb15d.1507207731.git.nelio.laranjeiro@6wind.com",
    "date": "2017-10-05T12:49:33",
    "name": "[dpdk-dev,v2,01/30] net/mlx5: merge action and flow parser structure",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "752de8d8bca77432cbfe01aa13d19d4cf8b1459e",
    "submitter": {
        "id": 243,
        "url": "http://patches.dpdk.org/api/people/243/?format=api",
        "name": "Nélio Laranjeiro",
        "email": "nelio.laranjeiro@6wind.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/6e6c479a5c7e44a831f0d47ee73f6888b13fb15d.1507207731.git.nelio.laranjeiro@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/29692/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/29692/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 090C01B19F;\n\tThu,  5 Oct 2017 14:50:30 +0200 (CEST)",
            "from mail-wr0-f181.google.com (mail-wr0-f181.google.com\n\t[209.85.128.181]) by dpdk.org (Postfix) with ESMTP id 9B001199AF\n\tfor <dev@dpdk.org>; Thu,  5 Oct 2017 14:50:25 +0200 (CEST)",
            "by mail-wr0-f181.google.com with SMTP id k62so10752468wrc.9\n\tfor <dev@dpdk.org>; Thu, 05 Oct 2017 05:50:25 -0700 (PDT)",
            "from ping.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\tk9sm26405823wrk.27.2017.10.05.05.50.23\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 05 Oct 2017 05:50:23 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:in-reply-to:references;\n\tbh=ubuqUHtjsE8QxD2ofH5QO1FycIZngPLnZLP6WThkOPM=;\n\tb=VNrjaNSvkiUUFlpw0T7OdbEFY9S13hB8RlXkDqGjqkvW++P7Tl5qw6nNatfmcjcpc1\n\t5rFwpl0H8Trpggq6KiCW8Q7fIwSwcGTZU2sOfAnbVzt2kTcuDdQoKhedFnTxAQTlSNJm\n\tmcOqh5zKas0uJyw6xRhnAiEFOLbf4ojygjpaoMr4leOq6nJCJGHVVRZwEua4Z0PWNUrJ\n\t7xLicErgZUP7xE11j8d6Ix68c+1vONTEqvy0sOlil68EetrtmjtTx29kH8i1tyk4aC9A\n\tMWpnWFd4Cgnw9HJ72zUQMkzbQ13h3DCyjLNpeI+IfoOcAnRSj6suj4SaMCFeYenDTiFf\n\tkZmA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:in-reply-to:references;\n\tbh=ubuqUHtjsE8QxD2ofH5QO1FycIZngPLnZLP6WThkOPM=;\n\tb=gM9+fdMjgNTYw0k50ln2TUevBb89P212l9G67V5kZdbnEn2ApYW6geoi35gB1CxvKV\n\tCEIreex1sIKeFwagCPc/KVAP5BoBF6dhECNBeb9NAujCaXmmMkVRlexMocRoH/92E6f9\n\toS5rDl1o5O158Qb7TCgDNnMIyMe0vLyEQSA3zIJXMij47HSxRPLfZgG1PPfyhRjC8I7u\n\t3gF/5HGO3aWBnvqqQ6Q4Xl1QGXMvG1nVLVn3824msjHTjfEEDPZZtSrw2zW5BN0LfzMY\n\tA8Y1kaR6UT9gwUdbqzJ8DpEW4PFB82yeP6eLA072pLBB0MFn7MzA5+qBfNpu/hdnorUP\n\tmBwA==",
        "X-Gm-Message-State": "AMCzsaUj7pUNWSKlCw0k4fa4MyiCnx7BB+BFQNCG7hvfOXM0p21z2urS\n\tVdtYFTVoZs2iYfO7Afag05UCrmi3Eg==",
        "X-Google-Smtp-Source": "AOwi7QCrVpuNyWWCp5hijULwihh65C906WBaMrJJKrLKfolNtNs0xuZs0YUAKWPqFpHiJ1FiFkUurQ==",
        "X-Received": "by 10.223.176.70 with SMTP id g6mr14222629wra.1.1507207824524;\n\tThu, 05 Oct 2017 05:50:24 -0700 (PDT)",
        "From": "Nelio Laranjeiro <nelio.laranjeiro@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "adrien.mazarguil@6wind.com, yskoh@mellanox.com, ferruh.yigit@intel.com",
        "Date": "Thu,  5 Oct 2017 14:49:33 +0200",
        "Message-Id": "<6e6c479a5c7e44a831f0d47ee73f6888b13fb15d.1507207731.git.nelio.laranjeiro@6wind.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": [
            "<cover.1507205686.git.nelio.laranjeiro@6wind.com>",
            "<cover.1507207731.git.nelio.laranjeiro@6wind.com>"
        ],
        "References": [
            "<cover.1507205686.git.nelio.laranjeiro@6wind.com>",
            "<cover.1501681927.git.nelio.laranjeiro@6wind.com>\n\t<cover.1507207731.git.nelio.laranjeiro@6wind.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v2 01/30] net/mlx5: merge action and flow parser\n\tstructure",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "mlx5_flow_create() and mlx5_flow_validate() are making common checks.\n\nSigned-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>\n---\n drivers/net/mlx5/mlx5_flow.c | 153 +++++++++++++++++++++----------------------\n 1 file changed, 73 insertions(+), 80 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex dbd241f..fb30803 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -201,7 +201,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {\n \t\t.default_mask = &rte_flow_item_ipv4_mask,\n \t\t.mask_sz = sizeof(struct rte_flow_item_ipv4),\n \t\t.convert = mlx5_flow_create_ipv4,\n-\t\t.dst_sz = sizeof(struct ibv_flow_spec_ipv4_ext),\n+\t\t.dst_sz = sizeof(struct ibv_flow_spec_ipv4),\n \t},\n \t[RTE_FLOW_ITEM_TYPE_IPV6] = {\n \t\t.items = ITEMS(RTE_FLOW_ITEM_TYPE_UDP,\n@@ -271,12 +271,23 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {\n \t},\n };\n \n+/* Structure to parse actions. */\n+struct mlx5_flow_action {\n+\tuint32_t queue:1; /**< Target is a receive queue. */\n+\tuint32_t drop:1; /**< Target is a drop queue. */\n+\tuint32_t mark:1; /**< Mark is present in the flow. */\n+\tuint32_t mark_id; /**< Mark identifier. */\n+\tuint16_t queues[RTE_MAX_QUEUES_PER_PORT]; /**< Queues indexes to use. */\n+\tuint16_t queues_n; /**< Number of entries in queue[]. */\n+};\n+\n /** Structure to pass to the conversion function. */\n-struct mlx5_flow {\n+struct mlx5_flow_parse {\n \tstruct ibv_flow_attr *ibv_attr; /**< Verbs attribute. */\n \tunsigned int offset; /**< Offset in bytes in the ibv_attr buffer. */\n \tuint32_t inner; /**< Set once VXLAN is encountered. */\n \tuint64_t hash_fields; /**< Fields that participate in the hash. */\n+\tstruct mlx5_flow_action actions; /**< Parsed action result. */\n };\n \n /** Structure for Drop queue. */\n@@ -287,15 +298,6 @@ struct rte_flow_drop {\n \tstruct ibv_cq *cq; /**< Verbs completion queue. */\n };\n \n-struct mlx5_flow_action {\n-\tuint32_t queue:1; /**< Target is a receive queue. */\n-\tuint32_t drop:1; /**< Target is a drop queue. */\n-\tuint32_t mark:1; /**< Mark is present in the flow. */\n-\tuint32_t mark_id; /**< Mark identifier. */\n-\tuint16_t queues[RTE_MAX_QUEUES_PER_PORT]; /**< Queues indexes to use. */\n-\tuint16_t queues_n; /**< Number of entries in queue[]. */\n-};\n-\n /**\n  * Check support for a given item.\n  *\n@@ -374,8 +376,6 @@ mlx5_flow_item_validate(const struct rte_flow_item *item,\n  *   Perform verbose error reporting if not NULL.\n  * @param[in, out] flow\n  *   Flow structure to update.\n- * @param[in, out] action\n- *   Action structure to update.\n  *\n  * @return\n  *   0 on success, a negative errno value otherwise and rte_errno is set.\n@@ -386,8 +386,7 @@ priv_flow_validate(struct priv *priv,\n \t\t   const struct rte_flow_item items[],\n \t\t   const struct rte_flow_action actions[],\n \t\t   struct rte_flow_error *error,\n-\t\t   struct mlx5_flow *flow,\n-\t\t   struct mlx5_flow_action *action)\n+\t\t   struct mlx5_flow_parse *flow)\n {\n \tconst struct mlx5_flow_items *cur_item = mlx5_flow_items;\n \n@@ -469,7 +468,7 @@ priv_flow_validate(struct priv *priv,\n \t\tif (actions->type == RTE_FLOW_ACTION_TYPE_VOID) {\n \t\t\tcontinue;\n \t\t} else if (actions->type == RTE_FLOW_ACTION_TYPE_DROP) {\n-\t\t\taction->drop = 1;\n+\t\t\tflow->actions.drop = 1;\n \t\t} else if (actions->type == RTE_FLOW_ACTION_TYPE_QUEUE) {\n \t\t\tconst struct rte_flow_action_queue *queue =\n \t\t\t\t(const struct rte_flow_action_queue *)\n@@ -479,13 +478,13 @@ priv_flow_validate(struct priv *priv,\n \n \t\t\tif (!queue || (queue->index > (priv->rxqs_n - 1)))\n \t\t\t\tgoto exit_action_not_supported;\n-\t\t\tfor (n = 0; n < action->queues_n; ++n) {\n-\t\t\t\tif (action->queues[n] == queue->index) {\n+\t\t\tfor (n = 0; n < flow->actions.queues_n; ++n) {\n+\t\t\t\tif (flow->actions.queues[n] == queue->index) {\n \t\t\t\t\tfound = 1;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n-\t\t\tif (action->queues_n > 1 && !found) {\n+\t\t\tif (flow->actions.queues_n > 1 && !found) {\n \t\t\t\trte_flow_error_set(error, ENOTSUP,\n \t\t\t\t\t   RTE_FLOW_ERROR_TYPE_ACTION,\n \t\t\t\t\t   actions,\n@@ -493,9 +492,9 @@ priv_flow_validate(struct priv *priv,\n \t\t\t\treturn -rte_errno;\n \t\t\t}\n \t\t\tif (!found) {\n-\t\t\t\taction->queue = 1;\n-\t\t\t\taction->queues_n = 1;\n-\t\t\t\taction->queues[0] = queue->index;\n+\t\t\t\tflow->actions.queue = 1;\n+\t\t\t\tflow->actions.queues_n = 1;\n+\t\t\t\tflow->actions.queues[0] = queue->index;\n \t\t\t}\n \t\t} else if (actions->type == RTE_FLOW_ACTION_TYPE_RSS) {\n \t\t\tconst struct rte_flow_action_rss *rss =\n@@ -510,12 +509,12 @@ priv_flow_validate(struct priv *priv,\n \t\t\t\t\t\t   \"no valid queues\");\n \t\t\t\treturn -rte_errno;\n \t\t\t}\n-\t\t\tif (action->queues_n == 1) {\n+\t\t\tif (flow->actions.queues_n == 1) {\n \t\t\t\tuint16_t found = 0;\n \n-\t\t\t\tassert(action->queues_n);\n+\t\t\t\tassert(flow->actions.queues_n);\n \t\t\t\tfor (n = 0; n < rss->num; ++n) {\n-\t\t\t\t\tif (action->queues[0] ==\n+\t\t\t\t\tif (flow->actions.queues[0] ==\n \t\t\t\t\t    rss->queue[n]) {\n \t\t\t\t\t\tfound = 1;\n \t\t\t\t\t\tbreak;\n@@ -540,10 +539,10 @@ priv_flow_validate(struct priv *priv,\n \t\t\t\t\treturn -rte_errno;\n \t\t\t\t}\n \t\t\t}\n-\t\t\taction->queue = 1;\n+\t\t\tflow->actions.queue = 1;\n \t\t\tfor (n = 0; n < rss->num; ++n)\n-\t\t\t\taction->queues[n] = rss->queue[n];\n-\t\t\taction->queues_n = rss->num;\n+\t\t\t\tflow->actions.queues[n] = rss->queue[n];\n+\t\t\tflow->actions.queues_n = rss->num;\n \t\t} else if (actions->type == RTE_FLOW_ACTION_TYPE_MARK) {\n \t\t\tconst struct rte_flow_action_mark *mark =\n \t\t\t\t(const struct rte_flow_action_mark *)\n@@ -563,19 +562,19 @@ priv_flow_validate(struct priv *priv,\n \t\t\t\t\t\t   \" and 16777199\");\n \t\t\t\treturn -rte_errno;\n \t\t\t}\n-\t\t\taction->mark = 1;\n-\t\t\taction->mark_id = mark->id;\n+\t\t\tflow->actions.mark = 1;\n+\t\t\tflow->actions.mark_id = mark->id;\n \t\t} else if (actions->type == RTE_FLOW_ACTION_TYPE_FLAG) {\n-\t\t\taction->mark = 1;\n+\t\t\tflow->actions.mark = 1;\n \t\t} else {\n \t\t\tgoto exit_action_not_supported;\n \t\t}\n \t}\n-\tif (action->mark && !flow->ibv_attr && !action->drop)\n+\tif (flow->actions.mark && !flow->ibv_attr && !flow->actions.drop)\n \t\tflow->offset += sizeof(struct ibv_flow_spec_action_tag);\n-\tif (!flow->ibv_attr && action->drop)\n+\tif (!flow->ibv_attr && flow->actions.drop)\n \t\tflow->offset += sizeof(struct ibv_flow_spec_action_drop);\n-\tif (!action->queue && !action->drop) {\n+\tif (!flow->actions.queue && !flow->actions.drop) {\n \t\trte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE,\n \t\t\t\t   NULL, \"no valid action\");\n \t\treturn -rte_errno;\n@@ -606,18 +605,16 @@ mlx5_flow_validate(struct rte_eth_dev *dev,\n {\n \tstruct priv *priv = dev->data->dev_private;\n \tint ret;\n-\tstruct mlx5_flow flow = { .offset = sizeof(struct ibv_flow_attr) };\n-\tstruct mlx5_flow_action action = {\n-\t\t.queue = 0,\n-\t\t.drop = 0,\n-\t\t.mark = 0,\n-\t\t.mark_id = MLX5_FLOW_MARK_DEFAULT,\n-\t\t.queues_n = 0,\n+\tstruct mlx5_flow_parse flow = {\n+\t\t.offset = sizeof(struct ibv_flow_attr),\n+\t\t.actions = {\n+\t\t\t.mark_id = MLX5_FLOW_MARK_DEFAULT,\n+\t\t\t.queues_n = 0,\n+\t\t},\n \t};\n \n \tpriv_lock(priv);\n-\tret = priv_flow_validate(priv, attr, items, actions, error, &flow,\n-\t\t\t\t &action);\n+\tret = priv_flow_validate(priv, attr, items, actions, error, &flow);\n \tpriv_unlock(priv);\n \treturn ret;\n }\n@@ -639,7 +636,7 @@ mlx5_flow_create_eth(const struct rte_flow_item *item,\n {\n \tconst struct rte_flow_item_eth *spec = item->spec;\n \tconst struct rte_flow_item_eth *mask = item->mask;\n-\tstruct mlx5_flow *flow = (struct mlx5_flow *)data;\n+\tstruct mlx5_flow_parse *flow = (struct mlx5_flow_parse *)data;\n \tstruct ibv_flow_spec_eth *eth;\n \tconst unsigned int eth_size = sizeof(struct ibv_flow_spec_eth);\n \tunsigned int i;\n@@ -688,7 +685,7 @@ mlx5_flow_create_vlan(const struct rte_flow_item *item,\n {\n \tconst struct rte_flow_item_vlan *spec = item->spec;\n \tconst struct rte_flow_item_vlan *mask = item->mask;\n-\tstruct mlx5_flow *flow = (struct mlx5_flow *)data;\n+\tstruct mlx5_flow_parse *flow = (struct mlx5_flow_parse *)data;\n \tstruct ibv_flow_spec_eth *eth;\n \tconst unsigned int eth_size = sizeof(struct ibv_flow_spec_eth);\n \n@@ -720,7 +717,7 @@ mlx5_flow_create_ipv4(const struct rte_flow_item *item,\n {\n \tconst struct rte_flow_item_ipv4 *spec = item->spec;\n \tconst struct rte_flow_item_ipv4 *mask = item->mask;\n-\tstruct mlx5_flow *flow = (struct mlx5_flow *)data;\n+\tstruct mlx5_flow_parse *flow = (struct mlx5_flow_parse *)data;\n \tstruct ibv_flow_spec_ipv4_ext *ipv4;\n \tunsigned int ipv4_size = sizeof(struct ibv_flow_spec_ipv4_ext);\n \n@@ -774,7 +771,7 @@ mlx5_flow_create_ipv6(const struct rte_flow_item *item,\n {\n \tconst struct rte_flow_item_ipv6 *spec = item->spec;\n \tconst struct rte_flow_item_ipv6 *mask = item->mask;\n-\tstruct mlx5_flow *flow = (struct mlx5_flow *)data;\n+\tstruct mlx5_flow_parse *flow = (struct mlx5_flow_parse *)data;\n \tstruct ibv_flow_spec_ipv6 *ipv6;\n \tunsigned int ipv6_size = sizeof(struct ibv_flow_spec_ipv6);\n \tunsigned int i;\n@@ -831,7 +828,7 @@ mlx5_flow_create_udp(const struct rte_flow_item *item,\n {\n \tconst struct rte_flow_item_udp *spec = item->spec;\n \tconst struct rte_flow_item_udp *mask = item->mask;\n-\tstruct mlx5_flow *flow = (struct mlx5_flow *)data;\n+\tstruct mlx5_flow_parse *flow = (struct mlx5_flow_parse *)data;\n \tstruct ibv_flow_spec_tcp_udp *udp;\n \tunsigned int udp_size = sizeof(struct ibv_flow_spec_tcp_udp);\n \n@@ -875,7 +872,7 @@ mlx5_flow_create_tcp(const struct rte_flow_item *item,\n {\n \tconst struct rte_flow_item_tcp *spec = item->spec;\n \tconst struct rte_flow_item_tcp *mask = item->mask;\n-\tstruct mlx5_flow *flow = (struct mlx5_flow *)data;\n+\tstruct mlx5_flow_parse *flow = (struct mlx5_flow_parse *)data;\n \tstruct ibv_flow_spec_tcp_udp *tcp;\n \tunsigned int tcp_size = sizeof(struct ibv_flow_spec_tcp_udp);\n \n@@ -919,7 +916,7 @@ mlx5_flow_create_vxlan(const struct rte_flow_item *item,\n {\n \tconst struct rte_flow_item_vxlan *spec = item->spec;\n \tconst struct rte_flow_item_vxlan *mask = item->mask;\n-\tstruct mlx5_flow *flow = (struct mlx5_flow *)data;\n+\tstruct mlx5_flow_parse *flow = (struct mlx5_flow_parse *)data;\n \tstruct ibv_flow_spec_tunnel *vxlan;\n \tunsigned int size = sizeof(struct ibv_flow_spec_tunnel);\n \tunion vni {\n@@ -958,7 +955,7 @@ mlx5_flow_create_vxlan(const struct rte_flow_item *item,\n  *   Mark identifier.\n  */\n static int\n-mlx5_flow_create_flag_mark(struct mlx5_flow *flow, uint32_t mark_id)\n+mlx5_flow_create_flag_mark(struct mlx5_flow_parse *flow, uint32_t mark_id)\n {\n \tstruct ibv_flow_spec_action_tag *tag;\n \tunsigned int size = sizeof(struct ibv_flow_spec_action_tag);\n@@ -988,7 +985,7 @@ mlx5_flow_create_flag_mark(struct mlx5_flow *flow, uint32_t mark_id)\n  */\n static struct rte_flow *\n priv_flow_create_action_queue_drop(struct priv *priv,\n-\t\t\t\t   struct mlx5_flow *flow,\n+\t\t\t\t   struct mlx5_flow_parse *flow,\n \t\t\t\t   struct rte_flow_error *error)\n {\n \tstruct rte_flow *rte_flow;\n@@ -1036,8 +1033,6 @@ priv_flow_create_action_queue_drop(struct priv *priv,\n  *   Pointer to private structure.\n  * @param flow\n  *   MLX5 flow attributes (filled by mlx5_flow_validate()).\n- * @param action\n- *   Target action structure.\n  * @param[out] error\n  *   Perform verbose error reporting if not NULL.\n  *\n@@ -1046,49 +1041,49 @@ priv_flow_create_action_queue_drop(struct priv *priv,\n  */\n static struct rte_flow *\n priv_flow_create_action_queue(struct priv *priv,\n-\t\t\t      struct mlx5_flow *flow,\n-\t\t\t      struct mlx5_flow_action *action,\n+\t\t\t      struct mlx5_flow_parse *flow,\n \t\t\t      struct rte_flow_error *error)\n {\n \tstruct rte_flow *rte_flow;\n \tunsigned int i;\n \tunsigned int j;\n-\tconst unsigned int wqs_n = 1 << log2above(action->queues_n);\n+\tconst unsigned int wqs_n = 1 << log2above(flow->actions.queues_n);\n \tstruct ibv_wq *wqs[wqs_n];\n \n \tassert(priv->pd);\n \tassert(priv->ctx);\n-\tassert(!action->drop);\n+\tassert(!flow->actions.drop);\n \trte_flow = rte_calloc(__func__, 1, sizeof(*rte_flow) +\n-\t\t\t      sizeof(*rte_flow->rxqs) * action->queues_n, 0);\n+\t\t\t      sizeof(*rte_flow->rxqs) * flow->actions.queues_n,\n+\t\t\t      0);\n \tif (!rte_flow) {\n \t\trte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE,\n \t\t\t\t   NULL, \"cannot allocate flow memory\");\n \t\treturn NULL;\n \t}\n-\tfor (i = 0; i < action->queues_n; ++i) {\n+\tfor (i = 0; i < flow->actions.queues_n; ++i) {\n \t\tstruct rxq_ctrl *rxq;\n \n-\t\trxq = container_of((*priv->rxqs)[action->queues[i]],\n+\t\trxq = container_of((*priv->rxqs)[flow->actions.queues[i]],\n \t\t\t\t   struct rxq_ctrl, rxq);\n \t\twqs[i] = rxq->wq;\n \t\trte_flow->rxqs[i] = &rxq->rxq;\n \t\t++rte_flow->rxqs_n;\n-\t\trxq->rxq.mark |= action->mark;\n+\t\trxq->rxq.mark |= flow->actions.mark;\n \t}\n \t/* finalise indirection table. */\n \tfor (j = 0; i < wqs_n; ++i, ++j) {\n \t\twqs[i] = wqs[j];\n-\t\tif (j == action->queues_n)\n+\t\tif (j == flow->actions.queues_n)\n \t\t\tj = 0;\n \t}\n-\trte_flow->mark = action->mark;\n+\trte_flow->mark = flow->actions.mark;\n \trte_flow->ibv_attr = flow->ibv_attr;\n \trte_flow->hash_fields = flow->hash_fields;\n \trte_flow->ind_table = ibv_create_rwq_ind_table(\n \t\tpriv->ctx,\n \t\t&(struct ibv_rwq_ind_table_init_attr){\n-\t\t\t.log_ind_tbl_size = log2above(action->queues_n),\n+\t\t\t.log_ind_tbl_size = log2above(flow->actions.queues_n),\n \t\t\t.ind_tbl = wqs,\n \t\t\t.comp_mask = 0,\n \t\t});\n@@ -1165,18 +1160,17 @@ priv_flow_create(struct priv *priv,\n \t\t struct rte_flow_error *error)\n {\n \tstruct rte_flow *rte_flow;\n-\tstruct mlx5_flow flow = { .offset = sizeof(struct ibv_flow_attr), };\n-\tstruct mlx5_flow_action action = {\n-\t\t.queue = 0,\n-\t\t.drop = 0,\n-\t\t.mark = 0,\n-\t\t.mark_id = MLX5_FLOW_MARK_DEFAULT,\n-\t\t.queues_n = 0,\n+\tstruct mlx5_flow_parse flow = {\n+\t\t.offset = sizeof(struct ibv_flow_attr),\n+\t\t.actions = {\n+\t\t\t.mark_id = MLX5_FLOW_MARK_DEFAULT,\n+\t\t\t.queues = { 0 },\n+\t\t\t.queues_n = 0,\n+\t\t},\n \t};\n \tint err;\n \n-\terr = priv_flow_validate(priv, attr, items, actions, error, &flow,\n-\t\t\t\t &action);\n+\terr = priv_flow_validate(priv, attr, items, actions, error, &flow);\n \tif (err)\n \t\tgoto exit;\n \tflow.ibv_attr = rte_malloc(__func__, flow.offset, 0);\n@@ -1197,17 +1191,16 @@ priv_flow_create(struct priv *priv,\n \tflow.inner = 0;\n \tflow.hash_fields = 0;\n \tclaim_zero(priv_flow_validate(priv, attr, items, actions,\n-\t\t\t\t      error, &flow, &action));\n-\tif (action.mark && !action.drop) {\n-\t\tmlx5_flow_create_flag_mark(&flow, action.mark_id);\n+\t\t\t\t      error, &flow));\n+\tif (flow.actions.mark && !flow.actions.drop) {\n+\t\tmlx5_flow_create_flag_mark(&flow, flow.actions.mark_id);\n \t\tflow.offset += sizeof(struct ibv_flow_spec_action_tag);\n \t}\n-\tif (action.drop)\n+\tif (flow.actions.drop)\n \t\trte_flow =\n \t\t\tpriv_flow_create_action_queue_drop(priv, &flow, error);\n \telse\n-\t\trte_flow = priv_flow_create_action_queue(priv, &flow, &action,\n-\t\t\t\t\t\t\t error);\n+\t\trte_flow = priv_flow_create_action_queue(priv, &flow, error);\n \tif (!rte_flow)\n \t\tgoto exit;\n \treturn rte_flow;\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "01/30"
    ]
}