get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 62437,
    "url": "http://patches.dpdk.org/api/patches/62437/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1572940915-29416-19-git-send-email-viacheslavo@mellanox.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": "<1572940915-29416-19-git-send-email-viacheslavo@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1572940915-29416-19-git-send-email-viacheslavo@mellanox.com",
    "date": "2019-11-05T08:01:53",
    "name": "[18/20] net/mlx5: introduce flow splitters chain",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "28e4c5f6520fc0ede04cfb9a6e3bfb9c09883ee1",
    "submitter": {
        "id": 1102,
        "url": "http://patches.dpdk.org/api/people/1102/?format=api",
        "name": "Slava Ovsiienko",
        "email": "viacheslavo@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1572940915-29416-19-git-send-email-viacheslavo@mellanox.com/mbox/",
    "series": [
        {
            "id": 7242,
            "url": "http://patches.dpdk.org/api/series/7242/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7242",
            "date": "2019-11-05T08:01:35",
            "name": "net/mlx5: implement extensive metadata feature",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/7242/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/62437/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/62437/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 6BD0FA0352;\n\tTue,  5 Nov 2019 09:06:43 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3B3DE1BEF8;\n\tTue,  5 Nov 2019 09:02:36 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id C67121BEA2\n for <dev@dpdk.org>; Tue,  5 Nov 2019 09:02:18 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n viacheslavo@mellanox.com)\n with ESMTPS (AES256-SHA encrypted); 5 Nov 2019 10:02:17 +0200",
            "from pegasus11.mtr.labs.mlnx (pegasus11.mtr.labs.mlnx\n [10.210.16.104])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id xA582HBi026539;\n Tue, 5 Nov 2019 10:02:17 +0200",
            "from pegasus11.mtr.labs.mlnx (localhost [127.0.0.1])\n by pegasus11.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id xA582Gj4030793;\n Tue, 5 Nov 2019 08:02:16 GMT",
            "(from viacheslavo@localhost)\n by pegasus11.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id xA582GK3030792;\n Tue, 5 Nov 2019 08:02:16 GMT"
        ],
        "X-Authentication-Warning": "pegasus11.mtr.labs.mlnx: viacheslavo set sender to\n viacheslavo@mellanox.com using -f",
        "From": "Viacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "matan@mellanox.com, rasland@mellanox.com, thomas@monjalon.net,\n orika@mellanox.com",
        "Date": "Tue,  5 Nov 2019 08:01:53 +0000",
        "Message-Id": "<1572940915-29416-19-git-send-email-viacheslavo@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1572940915-29416-1-git-send-email-viacheslavo@mellanox.com>",
        "References": "<1572940915-29416-1-git-send-email-viacheslavo@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH 18/20] net/mlx5: introduce flow splitters chain",
        "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": "The mlx5 hardware has some limitations and flow might\nrequire to be split into multiple internal subflows.\nFor example this is needed to provide the meter object\nsharing between multiple flows or to provide metadata\nregister copying before final queue/rss action.\n\nThe multiple features might require several level of\nsplitting. For example, hairpin feature splits the\noriginal flow into two ones - rx and tx parts. Then\nRSS feature should split rx part into multiple subflows\nwith extended item sets. Then, metering feature might\nrequire splitting each RSS subflow into meter jump\nchain, and then metadata extensive support might\nrequire the final subflows splitting. So, we have\nto organize the chain of splitting subroutines to\nabstract each level of splitting.\n\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\nAcked-by: Matan Azrad <matan@mellanox.com>\n---\n drivers/net/mlx5/mlx5_flow.c | 116 +++++++++++++++++++++++++++++++++++++++----\n 1 file changed, 106 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex c38208c..a310a88 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -2782,6 +2782,103 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,\n }\n \n /**\n+ * The last stage of splitting chain, just creates the subflow\n+ * without any modification.\n+ *\n+ * @param dev\n+ *   Pointer to Ethernet device.\n+ * @param[in] flow\n+ *   Parent flow structure pointer.\n+ * @param[in, out] sub_flow\n+ *   Pointer to return the created subflow, may be NULL.\n+ * @param[in] attr\n+ *   Flow rule attributes.\n+ * @param[in] items\n+ *   Pattern specification (list terminated by the END pattern item).\n+ * @param[in] actions\n+ *   Associated actions (list terminated by the END action).\n+ * @param[in] external\n+ *   This flow rule is created by request external to PMD.\n+ * @param[out] error\n+ *   Perform verbose error reporting if not NULL.\n+ * @return\n+ *   0 on success, negative value otherwise\n+ */\n+static int\n+flow_create_split_inner(struct rte_eth_dev *dev,\n+\t\t\tstruct rte_flow *flow,\n+\t\t\tstruct mlx5_flow **sub_flow,\n+\t\t\tconst struct rte_flow_attr *attr,\n+\t\t\tconst struct rte_flow_item items[],\n+\t\t\tconst struct rte_flow_action actions[],\n+\t\t\tbool external, struct rte_flow_error *error)\n+{\n+\tstruct mlx5_flow *dev_flow;\n+\n+\tdev_flow = flow_drv_prepare(flow, attr, items, actions, error);\n+\tif (!dev_flow)\n+\t\treturn -rte_errno;\n+\tdev_flow->flow = flow;\n+\tdev_flow->external = external;\n+\t/* Subflow object was created, we must include one in the list. */\n+\tLIST_INSERT_HEAD(&flow->dev_flows, dev_flow, next);\n+\tif (sub_flow)\n+\t\t*sub_flow = dev_flow;\n+\treturn flow_drv_translate(dev, dev_flow, attr, items, actions, error);\n+}\n+\n+/**\n+ * Split the flow to subflow set. The splitters might be linked\n+ * in the chain, like this:\n+ * flow_create_split_outer() calls:\n+ *   flow_create_split_meter() calls:\n+ *     flow_create_split_metadata(meter_subflow_0) calls:\n+ *       flow_create_split_inner(metadata_subflow_0)\n+ *       flow_create_split_inner(metadata_subflow_1)\n+ *       flow_create_split_inner(metadata_subflow_2)\n+ *     flow_create_split_metadata(meter_subflow_1) calls:\n+ *       flow_create_split_inner(metadata_subflow_0)\n+ *       flow_create_split_inner(metadata_subflow_1)\n+ *       flow_create_split_inner(metadata_subflow_2)\n+ *\n+ * This provide flexible way to add new levels of flow splitting.\n+ * The all of successfully created subflows are included to the\n+ * parent flow dev_flow list.\n+ *\n+ * @param dev\n+ *   Pointer to Ethernet device.\n+ * @param[in] flow\n+ *   Parent flow structure pointer.\n+ * @param[in] attr\n+ *   Flow rule attributes.\n+ * @param[in] items\n+ *   Pattern specification (list terminated by the END pattern item).\n+ * @param[in] actions\n+ *   Associated actions (list terminated by the END action).\n+ * @param[in] external\n+ *   This flow rule is created by request external to PMD.\n+ * @param[out] error\n+ *   Perform verbose error reporting if not NULL.\n+ * @return\n+ *   0 on success, negative value otherwise\n+ */\n+static int\n+flow_create_split_outer(struct rte_eth_dev *dev,\n+\t\t\tstruct rte_flow *flow,\n+\t\t\tconst struct rte_flow_attr *attr,\n+\t\t\tconst struct rte_flow_item items[],\n+\t\t\tconst struct rte_flow_action actions[],\n+\t\t\tbool external, struct rte_flow_error *error)\n+{\n+\tint ret;\n+\n+\tret = flow_create_split_inner(dev, flow, NULL, attr, items,\n+\t\t\t\t      actions, external, error);\n+\tassert(ret <= 0);\n+\treturn ret;\n+}\n+\n+/**\n  * Create a flow and add it to @p list.\n  *\n  * @param dev\n@@ -2899,16 +2996,15 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,\n \t\tbuf->entry[0].pattern = (void *)(uintptr_t)items;\n \t}\n \tfor (i = 0; i < buf->entries; ++i) {\n-\t\tdev_flow = flow_drv_prepare(flow, attr, buf->entry[i].pattern,\n-\t\t\t\t\t    p_actions_rx, error);\n-\t\tif (!dev_flow)\n-\t\t\tgoto error;\n-\t\tdev_flow->flow = flow;\n-\t\tdev_flow->external = external;\n-\t\tLIST_INSERT_HEAD(&flow->dev_flows, dev_flow, next);\n-\t\tret = flow_drv_translate(dev, dev_flow, attr,\n-\t\t\t\t\t buf->entry[i].pattern,\n-\t\t\t\t\t p_actions_rx, error);\n+\t\t/*\n+\t\t * The splitter may create multiple dev_flows,\n+\t\t * depending on configuration. In the simplest\n+\t\t * case it just creates unmodified original flow.\n+\t\t */\n+\t\tret = flow_create_split_outer(dev, flow, attr,\n+\t\t\t\t\t      buf->entry[i].pattern,\n+\t\t\t\t\t      p_actions_rx, external,\n+\t\t\t\t\t      error);\n \t\tif (ret < 0)\n \t\t\tgoto error;\n \t}\n",
    "prefixes": [
        "18/20"
    ]
}