get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 62429,
    "url": "http://patches.dpdk.org/api/patches/62429/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1572940915-29416-12-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-12-git-send-email-viacheslavo@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1572940915-29416-12-git-send-email-viacheslavo@mellanox.com",
    "date": "2019-11-05T08:01:46",
    "name": "[11/20] net/mlx5: check the maximal modify actions number",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f862cc2f881409d35a43115bd904bf7879c5e8bf",
    "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-12-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/62429/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/62429/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 5161AA0352;\n\tTue,  5 Nov 2019 09:04:07 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 72B481BEB7;\n\tTue,  5 Nov 2019 09:02:23 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 921584C8E\n for <dev@dpdk.org>; Tue,  5 Nov 2019 09:02:13 +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:11 +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 xA582BDa026503;\n Tue, 5 Nov 2019 10:02:11 +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 xA582A3a030776;\n Tue, 5 Nov 2019 08:02:10 GMT",
            "(from viacheslavo@localhost)\n by pegasus11.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id xA582ANV030775;\n Tue, 5 Nov 2019 08:02:10 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, Yongseok Koh <yskoh@mellanox.com>",
        "Date": "Tue,  5 Nov 2019 08:01:46 +0000",
        "Message-Id": "<1572940915-29416-12-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 11/20] net/mlx5: check the maximal modify actions\n\tnumber",
        "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": "If the extensive metadata registers are supported,\nit can be regarded inclusively that the extensive\nmetadata support is possible. E.g. metadata register\ncopy action, supporting 16 modify header actions,\nreserving register across different steering domain\n(FDB and NIC) and so on.\n\nThis patch handles the maximal amount of header modify\nactions depending on discovered metadata registers\nsupport.\n\nSigned-off-by: Yongseok Koh <yskoh@mellanox.com>\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\nAcked-by: Matan Azrad <matan@mellanox.com>\n---\n drivers/net/mlx5/mlx5_flow.h    |  9 +++++++--\n drivers/net/mlx5/mlx5_flow_dv.c | 25 +++++++++++++++++++++++++\n 2 files changed, 32 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h\nindex f2b6726..c1d0a65 100644\n--- a/drivers/net/mlx5/mlx5_flow.h\n+++ b/drivers/net/mlx5/mlx5_flow.h\n@@ -348,8 +348,13 @@ struct mlx5_flow_dv_tag_resource {\n \tuint32_t tag; /**< the tag value. */\n };\n \n-/* Number of modification commands. */\n-#define MLX5_MODIFY_NUM 8\n+/*\n+ * Number of modification commands.\n+ * If extensive metadata registers are supported\n+ * the maximal actions amount is 16 and 8 otherwise.\n+ */\n+#define MLX5_MODIFY_NUM 16\n+#define MLX5_MODIFY_NUM_NO_MREG 8\n \n /* Modify resource structure */\n struct mlx5_flow_dv_modify_hdr_resource {\ndiff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex 049d6ae..f83c6ff 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -2732,6 +2732,27 @@ struct field_modify_info modify_tcp[] = {\n }\n \n /**\n+ * Get the maximum number of modify header actions.\n+ *\n+ * @param dev\n+ *   Pointer to rte_eth_dev structure.\n+ *\n+ * @return\n+ *   Max number of modify header actions device can support.\n+ */\n+static unsigned int\n+flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev)\n+{\n+\t/*\n+\t * There's no way to directly query the max cap. Although it has to be\n+\t * acquried by iterative trial, it is a safe assumption that more\n+\t * actions are supported by FW if extensive metadata register is\n+\t * supported.\n+\t */\n+\treturn mlx5_flow_ext_mreg_supported(dev) ? MLX5_MODIFY_NUM :\n+\t\t\t\t\t\t   MLX5_MODIFY_NUM_NO_MREG;\n+}\n+/**\n  * Find existing modify-header resource or create and register a new one.\n  *\n  * @param dev[in, out]\n@@ -2758,6 +2779,10 @@ struct field_modify_info modify_tcp[] = {\n \tstruct mlx5_flow_dv_modify_hdr_resource *cache_resource;\n \tstruct mlx5dv_dr_domain *ns;\n \n+\tif (resource->actions_num > flow_dv_modify_hdr_action_max(dev))\n+\t\treturn rte_flow_error_set(error, EOVERFLOW,\n+\t\t\t\t\t  RTE_FLOW_ERROR_TYPE_ACTION, NULL,\n+\t\t\t\t\t  \"too many modify header items\");\n \tif (resource->ft_type == MLX5DV_FLOW_TABLE_TYPE_FDB)\n \t\tns = sh->fdb_domain;\n \telse if (resource->ft_type == MLX5DV_FLOW_TABLE_TYPE_NIC_TX)\n",
    "prefixes": [
        "11/20"
    ]
}