get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 82440,
    "url": "https://patches.dpdk.org/api/patches/82440/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201027232335.31427-62-ophirmu@nvidia.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20201027232335.31427-62-ophirmu@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201027232335.31427-62-ophirmu@nvidia.com",
    "date": "2020-10-27T23:23:24",
    "name": "[v1,61/72] net/mlx5/linux: add OS default miss flow action",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6c02a708a658d6764cc0c793f615a45fe2c44464",
    "submitter": {
        "id": 1908,
        "url": "https://patches.dpdk.org/api/people/1908/?format=api",
        "name": "Ophir Munk",
        "email": "ophirmu@nvidia.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201027232335.31427-62-ophirmu@nvidia.com/mbox/",
    "series": [
        {
            "id": 13395,
            "url": "https://patches.dpdk.org/api/series/13395/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13395",
            "date": "2020-10-27T23:22:23",
            "name": "mlx5 Windows support - part #5",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/13395/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/82440/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/82440/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 15352A04B5;\n\tWed, 28 Oct 2020 00:40:33 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9FF8AC840;\n\tWed, 28 Oct 2020 00:25:29 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id C01922C55\n for <dev@dpdk.org>; Wed, 28 Oct 2020 00:24:02 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n ophirmu@nvidia.com) with SMTP; 28 Oct 2020 01:23:58 +0200",
            "from nvidia.com (pegasus05.mtr.labs.mlnx [10.210.16.100])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 09RNNrsD026642;\n Wed, 28 Oct 2020 01:23:58 +0200"
        ],
        "From": "Ophir Munk <ophirmu@nvidia.com>",
        "To": "dev@dpdk.org, Raslan Darawsheh <rasland@nvidia.com>",
        "Cc": "Ophir Munk <ophirmu@nvidia.com>, Matan Azrad <matan@nvidia.com>,\n Tal Shnaiderman <talshn@nvidia.com>, Thomas Monjalon <thomas@monjalon.net>",
        "Date": "Tue, 27 Oct 2020 23:23:24 +0000",
        "Message-Id": "<20201027232335.31427-62-ophirmu@nvidia.com>",
        "X-Mailer": "git-send-email 2.8.4",
        "In-Reply-To": "<20201027232335.31427-1-ophirmu@nvidia.com>",
        "References": "<20201027232335.31427-1-ophirmu@nvidia.com>",
        "Subject": "[dpdk-dev] [PATCH v1 61/72] net/mlx5/linux: add OS default miss\n\tflow 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": "Wrap glue call dr_create_flow_action_default_miss() with an OS API. This\ncommit is a follow up on (1).\n\n(1)\ncommit d4d85aa6f13a (\"common/mlx5: add default miss action\")\ncommit b293fbf9672b (\"net/mlx5: add OS specific flow actions operations\")\n\nSigned-off-by: Ophir Munk <ophirmu@nvidia.com>\n---\n drivers/net/mlx5/linux/mlx5_flow_os.h | 16 ++++++++++++++++\n drivers/net/mlx5/mlx5_flow_dv.c       |  9 +++++----\n 2 files changed, 21 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/linux/mlx5_flow_os.h b/drivers/net/mlx5/linux/mlx5_flow_os.h\nindex c7003a1..7706b3b 100644\n--- a/drivers/net/mlx5/linux/mlx5_flow_os.h\n+++ b/drivers/net/mlx5/linux/mlx5_flow_os.h\n@@ -351,6 +351,22 @@ mlx5_flow_os_create_flow_action_drop(void **action)\n }\n \n /**\n+ * Create flow action: default miss.\n+ *\n+ * @param[out] action\n+ *   Pointer to a valid action on success, NULL otherwise.\n+ *\n+ * @return\n+ *   0 on success, or -1 on failure and errno is set.\n+ */\n+static inline int\n+mlx5_flow_os_create_flow_action_default_miss(void **action)\n+{\n+\t*action = mlx5_glue->dr_create_flow_action_default_miss();\n+\treturn (*action) ? 0 : -1;\n+}\n+\n+/**\n  * Destroy flow action.\n  *\n  * @param[in] action\ndiff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex 18ab409..5c772e7 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -2987,12 +2987,13 @@ flow_dv_default_miss_resource_register(struct rte_eth_dev *dev,\n \tstruct mlx5_flow_default_miss_resource *cache_resource =\n \t\t\t&sh->default_miss;\n \tint cnt = rte_atomic32_read(&cache_resource->refcnt);\n+\tint ret;\n \n \tif (!cnt) {\n \t\tMLX5_ASSERT(cache_resource->action);\n-\t\tcache_resource->action =\n-\t\tmlx5_glue->dr_create_flow_action_default_miss();\n-\t\tif (!cache_resource->action)\n+\t\tret = mlx5_flow_os_create_flow_action_default_miss\n+\t\t\t\t\t\t(&cache_resource->action);\n+\t\tif (ret)\n \t\t\treturn rte_flow_error_set(error, ENOMEM,\n \t\t\t\t\tRTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,\n \t\t\t\t\t\"cannot create default miss action\");\n@@ -10602,7 +10603,7 @@ flow_dv_default_miss_resource_release(struct rte_eth_dev *dev)\n \t\t\t(void *)cache_resource->action,\n \t\t\trte_atomic32_read(&cache_resource->refcnt));\n \tif (rte_atomic32_dec_and_test(&cache_resource->refcnt)) {\n-\t\tclaim_zero(mlx5_glue->destroy_flow_action\n+\t\tclaim_zero(mlx5_flow_os_destroy_flow_action\n \t\t\t\t(cache_resource->action));\n \t\tDRV_LOG(DEBUG, \"default miss resource %p: removed\",\n \t\t\t\t(void *)cache_resource->action);\n",
    "prefixes": [
        "v1",
        "61/72"
    ]
}