get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65214,
    "url": "http://patches.dpdk.org/api/patches/65214/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1580205965-21492-13-git-send-email-matan@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": "<1580205965-21492-13-git-send-email-matan@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1580205965-21492-13-git-send-email-matan@mellanox.com",
    "date": "2020-01-28T10:05:52",
    "name": "[v2,12/25] common/mlx5: glue UAR allocation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fda6e4ee0d8b8101bbe8695ded5bd6efd1930aa8",
    "submitter": {
        "id": 796,
        "url": "http://patches.dpdk.org/api/people/796/?format=api",
        "name": "Matan Azrad",
        "email": "matan@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/1580205965-21492-13-git-send-email-matan@mellanox.com/mbox/",
    "series": [
        {
            "id": 8319,
            "url": "http://patches.dpdk.org/api/series/8319/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8319",
            "date": "2020-01-28T10:05:40",
            "name": "Introduce mlx5 common library",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/8319/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65214/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65214/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 03473A04B3;\n\tTue, 28 Jan 2020 11:08:51 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 360FE1C202;\n\tTue, 28 Jan 2020 11:08:48 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 45F431C1CA\n for <dev@dpdk.org>; Tue, 28 Jan 2020 11:08:47 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE2 (envelope-from\n asafp@mellanox.com)\n with ESMTPS (AES256-SHA encrypted); 28 Jan 2020 12:08:44 +0200",
            "from pegasus07.mtr.labs.mlnx (pegasus07.mtr.labs.mlnx\n [10.210.16.112])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 00SA6FpF016102;\n Tue, 28 Jan 2020 12:08:44 +0200"
        ],
        "From": "Matan Azrad <matan@mellanox.com>",
        "To": "dev@dpdk.org, Viacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "Cc": "Raslan Darawsheh <rasland@mellanox.com>",
        "Date": "Tue, 28 Jan 2020 10:05:52 +0000",
        "Message-Id": "<1580205965-21492-13-git-send-email-matan@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1580205965-21492-1-git-send-email-matan@mellanox.com>",
        "References": "<1579539790-3882-1-git-send-email-matan@mellanox.com>\n <1580205965-21492-1-git-send-email-matan@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH v2 12/25] common/mlx5: glue UAR allocation",
        "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 isolated, protected and independent direct access to the HW by\nmultiple processes is implemented via User Access Region (UAR)\nmechanism.\nThe UAR is part of PCI address space that is mapped for direct access to\nthe HW from the CPU.\nUAR is comprised of multiple pages, each page containing registers that\ncontrol the HW operation.\nUAR mechanism is used to post execution or control requests to the HW.\nIt is used by the HW to enforce protection and isolation between\ndifferent processes.\n\nAdd a glue command to allocate and free an UAR.\n\nSigned-off-by: Matan Azrad <matan@mellanox.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n drivers/common/mlx5/mlx5_glue.c | 25 +++++++++++++++++++++++++\n drivers/common/mlx5/mlx5_glue.h |  4 ++++\n 2 files changed, 29 insertions(+)",
    "diff": "diff --git a/drivers/common/mlx5/mlx5_glue.c b/drivers/common/mlx5/mlx5_glue.c\nindex e4eabdb..5691636 100644\n--- a/drivers/common/mlx5/mlx5_glue.c\n+++ b/drivers/common/mlx5/mlx5_glue.c\n@@ -1137,6 +1137,29 @@\n #endif\n }\n \n+static struct mlx5dv_devx_uar *\n+mlx5_glue_devx_alloc_uar(struct ibv_context *context, uint32_t flags)\n+{\n+#ifdef HAVE_IBV_DEVX_OBJ\n+\treturn mlx5dv_devx_alloc_uar(context, flags);\n+#else\n+\t(void)context;\n+\t(void)flags;\n+\terrno = ENOTSUP;\n+\treturn NULL;\n+#endif\n+}\n+\n+static void\n+mlx5_glue_devx_free_uar(struct mlx5dv_devx_uar *devx_uar)\n+{\n+#ifdef HAVE_IBV_DEVX_OBJ\n+\tmlx5dv_devx_free_uar(devx_uar);\n+#else\n+\t(void)devx_uar;\n+#endif\n+}\n+\n alignas(RTE_CACHE_LINE_SIZE)\n const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue){\n \t.version = MLX5_GLUE_VERSION,\n@@ -1242,4 +1265,6 @@\n \t.devx_subscribe_devx_event = mlx5_glue_devx_subscribe_devx_event,\n \t.devx_subscribe_devx_event_fd = mlx5_glue_devx_subscribe_devx_event_fd,\n \t.devx_get_event = mlx5_glue_devx_get_event,\n+\t.devx_alloc_uar = mlx5_glue_devx_alloc_uar,\n+\t.devx_free_uar = mlx5_glue_devx_free_uar,\n };\ndiff --git a/drivers/common/mlx5/mlx5_glue.h b/drivers/common/mlx5/mlx5_glue.h\nindex 6fc00dd..7d9256e 100644\n--- a/drivers/common/mlx5/mlx5_glue.h\n+++ b/drivers/common/mlx5/mlx5_glue.h\n@@ -66,6 +66,7 @@\n #ifndef HAVE_IBV_DEVX_OBJ\n struct mlx5dv_devx_obj;\n struct mlx5dv_devx_umem { uint32_t umem_id; };\n+struct mlx5dv_devx_uar { void *reg_addr; void *base_addr; uint32_t page_id; };\n #endif\n \n #ifndef HAVE_IBV_DEVX_ASYNC\n@@ -230,6 +231,9 @@ struct mlx5_glue {\n \tint (*dv_destroy_flow)(void *flow);\n \tint (*dv_destroy_flow_matcher)(void *matcher);\n \tstruct ibv_context *(*dv_open_device)(struct ibv_device *device);\n+\tstruct mlx5dv_devx_uar *(*devx_alloc_uar)(struct ibv_context *context,\n+\t\t\t\t\t\t  uint32_t flags);\n+\tvoid (*devx_free_uar)(struct mlx5dv_devx_uar *devx_uar);\n \tstruct mlx5dv_devx_obj *(*devx_obj_create)\n \t\t\t\t\t(struct ibv_context *ctx,\n \t\t\t\t\t const void *in, size_t inlen,\n",
    "prefixes": [
        "v2",
        "12/25"
    ]
}