get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64949,
    "url": "http://patches.dpdk.org/api/patches/64949/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1579539790-3882-14-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": "<1579539790-3882-14-git-send-email-matan@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1579539790-3882-14-git-send-email-matan@mellanox.com",
    "date": "2020-01-20T17:02:45",
    "name": "[v1,13/38] common/mlx5: glue event interrupt commands",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4764ec589519082747168edc1a0e10f5f8ba1cb9",
    "submitter": {
        "id": 796,
        "url": "http://patches.dpdk.org/api/people/796/?format=api",
        "name": "Matan Azrad",
        "email": "matan@mellanox.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1579539790-3882-14-git-send-email-matan@mellanox.com/mbox/",
    "series": [
        {
            "id": 8223,
            "url": "http://patches.dpdk.org/api/series/8223/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8223",
            "date": "2020-01-20T17:02:37",
            "name": "Introduce mlx5 vDPA driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8223/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64949/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64949/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 7C9D9A0526;\n\tMon, 20 Jan 2020 18:05:13 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F0ABB1BFDC;\n\tMon, 20 Jan 2020 18:03:38 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 3732E1BF9C\n for <dev@dpdk.org>; Mon, 20 Jan 2020 18:03:14 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n asafp@mellanox.com)\n with ESMTPS (AES256-SHA encrypted); 20 Jan 2020 19:03:13 +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 00KH3BGW024424;\n Mon, 20 Jan 2020 19:03:12 +0200"
        ],
        "From": "Matan Azrad <matan@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>,\n Thomas Monjalon <thomas@monjalon.net>",
        "Date": "Mon, 20 Jan 2020 17:02:45 +0000",
        "Message-Id": "<1579539790-3882-14-git-send-email-matan@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1579539790-3882-1-git-send-email-matan@mellanox.com>",
        "References": "<1579539790-3882-1-git-send-email-matan@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH v1 13/38] common/mlx5: glue event interrupt\n\tcommands",
        "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": "Add the next commands to glue in order to support interrupt event\nchannel operations associated to events in the EQ:\n\tdevx_create_event_channel,\n\tdevx_destroy_event_channel,\n\tdevx_subscribe_devx_event,\n\tdevx_subscribe_devx_event_fd,\n\tdevx_get_event.\n\nSigned-off-by: Matan Azrad <matan@mellanox.com>\n---\n drivers/common/mlx5/Makefile    |  5 +++\n drivers/common/mlx5/meson.build |  2 ++\n drivers/common/mlx5/mlx5_glue.c | 79 +++++++++++++++++++++++++++++++++++++++++\n drivers/common/mlx5/mlx5_glue.h | 25 +++++++++++++\n 4 files changed, 111 insertions(+)",
    "diff": "diff --git a/drivers/common/mlx5/Makefile b/drivers/common/mlx5/Makefile\nindex 2ff549e..6b618ad 100644\n--- a/drivers/common/mlx5/Makefile\n+++ b/drivers/common/mlx5/Makefile\n@@ -155,6 +155,11 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh\n \t\tfunc mlx5dv_dr_action_create_dest_devx_tir \\\n \t\t$(AUTOCONF_OUTPUT)\n \t$Q sh -- '$<' '$@' \\\n+\t\tHAVE_IBV_DEVX_EVENT \\\n+\t\tinfiniband/mlx5dv.h \\\n+\t\tfunc mlx5dv_devx_get_event \\\n+\t\t$(AUTOCONF_OUTPUT)\n+\t$Q sh -- '$<' '$@' \\\n \t\tHAVE_MLX5_DR_CREATE_ACTION_FLOW_METER \\\n \t\tinfiniband/mlx5dv.h \\\n \t\tfunc mlx5dv_dr_action_create_flow_meter \\\ndiff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build\nindex d2eeb45..fa11fd9 100644\n--- a/drivers/common/mlx5/meson.build\n+++ b/drivers/common/mlx5/meson.build\n@@ -108,6 +108,8 @@ if build\n \t\t'mlx5dv_devx_obj_query_async' ],\n \t\t[ 'HAVE_MLX5DV_DR_ACTION_DEST_DEVX_TIR', 'infiniband/mlx5dv.h',\n \t\t'mlx5dv_dr_action_create_dest_devx_tir' ],\n+\t\t[ 'HAVE_IBV_DEVX_EVENT', 'infiniband/mlx5dv.h',\n+\t\t'mlx5dv_devx_get_event' ],\n \t\t[ 'HAVE_MLX5_DR_CREATE_ACTION_FLOW_METER', 'infiniband/mlx5dv.h',\n \t\t'mlx5dv_dr_action_create_flow_meter' ],\n \t\t[ 'HAVE_MLX5DV_MMAP_GET_NC_PAGES_CMD', 'infiniband/mlx5dv.h',\ndiff --git a/drivers/common/mlx5/mlx5_glue.c b/drivers/common/mlx5/mlx5_glue.c\nindex ac51e65..20364cb 100644\n--- a/drivers/common/mlx5/mlx5_glue.c\n+++ b/drivers/common/mlx5/mlx5_glue.c\n@@ -1063,6 +1063,80 @@\n #endif\n }\n \n+static struct mlx5dv_devx_event_channel *\n+mlx5_glue_devx_create_event_channel(struct ibv_context *ctx, int flags)\n+{\n+#ifdef HAVE_IBV_DEVX_EVENT\n+\treturn mlx5dv_devx_create_event_channel(ctx, flags);\n+#else\n+\t(void)ctx;\n+\t(void)flags;\n+\terrno = ENOTSUP;\n+\treturn NULL;\n+#endif\n+}\n+\n+static void\n+mlx5_glue_devx_destroy_event_channel(struct mlx5dv_devx_event_channel *eventc)\n+{\n+#ifdef HAVE_IBV_DEVX_EVENT\n+\tmlx5dv_devx_destroy_event_channel(eventc);\n+#else\n+\t(void)eventc;\n+#endif\n+}\n+\n+static int\n+mlx5_glue_devx_subscribe_devx_event(struct mlx5dv_devx_event_channel *eventc,\n+\t\t\t\t    struct mlx5dv_devx_obj *obj,\n+\t\t\t\t    uint16_t events_sz, uint16_t events_num[],\n+\t\t\t\t    uint64_t cookie)\n+{\n+#ifdef HAVE_IBV_DEVX_EVENT\n+\treturn mlx5dv_devx_subscribe_devx_event(eventc, obj, events_sz,\n+\t\t\t\t\t\tevents_num, cookie);\n+#else\n+\t(void)eventc;\n+\t(void)obj;\n+\t(void)events_sz;\n+\t(void)events_num;\n+\t(void)cookie;\n+\treturn -ENOTSUP;\n+#endif\n+}\n+\n+static int\n+mlx5_glue_devx_subscribe_devx_event_fd(struct mlx5dv_devx_event_channel *eventc,\n+\t\t\t\t       int fd, struct mlx5dv_devx_obj *obj,\n+\t\t\t\t       uint16_t event_num)\n+{\n+#ifdef HAVE_IBV_DEVX_EVENT\n+\treturn mlx5dv_devx_subscribe_devx_event_fd(eventc, fd, obj, event_num);\n+#else\n+\t(void)eventc;\n+\t(void)fd;\n+\t(void)obj;\n+\t(void)event_num;\n+\treturn -ENOTSUP;\n+#endif\n+}\n+\n+static ssize_t\n+mlx5_glue_devx_get_event(struct mlx5dv_devx_event_channel *eventc,\n+\t\t\t struct mlx5dv_devx_async_event_hdr *event_data,\n+\t\t\t size_t event_resp_len)\n+{\n+#ifdef HAVE_IBV_DEVX_EVENT\n+\treturn mlx5dv_devx_get_event(eventc, event_data, event_resp_len);\n+#else\n+\t(void)eventc;\n+\t(void)event_data;\n+\t(void)event_resp_len;\n+\terrno = ENOTSUP;\n+\treturn -1;\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@@ -1163,4 +1237,9 @@\n \t.devx_port_query = mlx5_glue_devx_port_query,\n \t.dr_dump_domain = mlx5_glue_dr_dump_domain,\n \t.devx_query_eqn = mlx5_glue_devx_query_eqn,\n+\t.devx_create_event_channel = mlx5_glue_devx_create_event_channel,\n+\t.devx_destroy_event_channel = mlx5_glue_devx_destroy_event_channel,\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 };\ndiff --git a/drivers/common/mlx5/mlx5_glue.h b/drivers/common/mlx5/mlx5_glue.h\nindex fe51f97..6fc00dd 100644\n--- a/drivers/common/mlx5/mlx5_glue.h\n+++ b/drivers/common/mlx5/mlx5_glue.h\n@@ -86,6 +86,12 @@\n struct mlx5dv_dr_flow_meter_attr;\n #endif\n \n+#ifndef HAVE_IBV_DEVX_EVENT\n+struct mlx5dv_devx_event_channel { int fd; };\n+struct mlx5dv_devx_async_event_hdr;\n+#define MLX5DV_DEVX_CREATE_EVENT_CHANNEL_FLAGS_OMIT_EV_DATA 1\n+#endif\n+\n /* LIB_GLUE_VERSION must be updated every time this structure is modified. */\n struct mlx5_glue {\n \tconst char *version;\n@@ -261,6 +267,25 @@ struct mlx5_glue {\n \tint (*dr_dump_domain)(FILE *file, void *domain);\n \tint (*devx_query_eqn)(struct ibv_context *context, uint32_t cpus,\n \t\t\t      uint32_t *eqn);\n+\tstruct mlx5dv_devx_event_channel *(*devx_create_event_channel)\n+\t\t\t\t(struct ibv_context *context, int flags);\n+\tvoid (*devx_destroy_event_channel)\n+\t\t\t(struct mlx5dv_devx_event_channel *event_channel);\n+\tint (*devx_subscribe_devx_event)\n+\t\t\t(struct mlx5dv_devx_event_channel *event_channel,\n+\t\t\t struct mlx5dv_devx_obj *obj,\n+\t\t\t uint16_t events_sz,\n+\t\t\t uint16_t events_num[],\n+\t\t\t uint64_t cookie);\n+\tint (*devx_subscribe_devx_event_fd)\n+\t\t\t(struct mlx5dv_devx_event_channel *event_channel,\n+\t\t\t int fd,\n+\t\t\t struct mlx5dv_devx_obj *obj,\n+\t\t\t uint16_t event_num);\n+\tssize_t (*devx_get_event)\n+\t\t\t(struct mlx5dv_devx_event_channel *event_channel,\n+\t\t\t struct mlx5dv_devx_async_event_hdr *event_data,\n+\t\t\t size_t event_resp_len);\n };\n \n const struct mlx5_glue *mlx5_glue;\n",
    "prefixes": [
        "v1",
        "13/38"
    ]
}