get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 77002,
    "url": "http://patches.dpdk.org/api/patches/77002/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1599634114-148013-3-git-send-email-jiaweiw@nvidia.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": "<1599634114-148013-3-git-send-email-jiaweiw@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1599634114-148013-3-git-send-email-jiaweiw@nvidia.com",
    "date": "2020-09-09T06:48:24",
    "name": "[v6,02/12] common/mlx5: glue for sample action",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "11b95ac1c18d733c81dbe7bf685cb32e22f8d5f4",
    "submitter": {
        "id": 1939,
        "url": "http://patches.dpdk.org/api/people/1939/?format=api",
        "name": "Jiawei Wang",
        "email": "jiaweiw@nvidia.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1599634114-148013-3-git-send-email-jiaweiw@nvidia.com/mbox/",
    "series": [
        {
            "id": 12045,
            "url": "http://patches.dpdk.org/api/series/12045/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12045",
            "date": "2020-09-09T06:48:29",
            "name": "support the flow-based traffic sampling",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/12045/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/77002/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/77002/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 A408AA04B1;\n\tWed,  9 Sep 2020 08:49:14 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A21471C10C;\n\tWed,  9 Sep 2020 08:48:43 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 8AA951C0BE\n for <dev@dpdk.org>; Wed,  9 Sep 2020 08:48:36 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n jiaweiw@nvidia.com) with SMTP; 9 Sep 2020 09:48:34 +0300",
            "from nvidia.com (gen-l-vrt-280.mtl.labs.mlnx [10.237.45.1])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0896mYFv029471;\n Wed, 9 Sep 2020 09:48:34 +0300"
        ],
        "From": "Jiawei Wang <jiaweiw@nvidia.com>",
        "To": "orika@nvidia.com, viacheslavo@nvidia.com, matan@nvidia.com,\n thomas@monjalon.net, ferruh.yigit@intel.com, marko.kovacevic@intel.com,\n arybchenko@solarflare.com",
        "Cc": "dev@dpdk.org, rasland@nvidia.com, ian.stokes@intel.com, fbl@redhat.com,\n asafp@nvidia.com",
        "Date": "Wed,  9 Sep 2020 09:48:24 +0300",
        "Message-Id": "<1599634114-148013-3-git-send-email-jiaweiw@nvidia.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1599634114-148013-1-git-send-email-jiaweiw@nvidia.com>",
        "References": "<1598540492-406340-1-git-send-email-jiaweiw@nvidia.com>\n <1599634114-148013-1-git-send-email-jiaweiw@nvidia.com>",
        "Subject": "[dpdk-dev] [PATCH v6 02/12] common/mlx5: glue for sample 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": "rdma-core introduce a new DR sample action.\n\nAdd the rdma-core commands in glue to create this action.\n\nSample action is used for creating the sample object to implement\nthe sampling/mirroring function.\n\nSigned-off-by: Jiawei Wang <jiaweiw@nvidia.com>\n---\n drivers/common/mlx5/linux/meson.build |  2 ++\n drivers/common/mlx5/linux/mlx5_glue.c | 15 +++++++++++++++\n drivers/common/mlx5/linux/mlx5_glue.h | 13 +++++++++++++\n drivers/common/mlx5/mlx5_prm.h        | 10 ++++++++++\n 4 files changed, 40 insertions(+)",
    "diff": "diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build\nindex 48e8ad6..1aa137d 100644\n--- a/drivers/common/mlx5/linux/meson.build\n+++ b/drivers/common/mlx5/linux/meson.build\n@@ -172,6 +172,8 @@ has_sym_args = [\n \t'RDMA_NLDEV_ATTR_NDEV_INDEX' ],\n \t[ 'HAVE_MLX5_DR_FLOW_DUMP', 'infiniband/mlx5dv.h',\n \t'mlx5dv_dump_dr_domain'],\n+\t[ 'HAVE_MLX5_DR_CREATE_ACTION_FLOW_SAMPLE', 'infiniband/mlx5dv.h',\n+\t'mlx5dv_dr_action_create_flow_sampler'],\n \t[ 'HAVE_MLX5DV_DR_MEM_RECLAIM', 'infiniband/mlx5dv.h',\n \t'mlx5dv_dr_domain_set_reclaim_device_memory'],\n \t[ 'HAVE_DEVLINK', 'linux/devlink.h', 'DEVLINK_GENL_NAME' ],\ndiff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c\nindex fcf03e8..771a47c 100644\n--- a/drivers/common/mlx5/linux/mlx5_glue.c\n+++ b/drivers/common/mlx5/linux/mlx5_glue.c\n@@ -1063,6 +1063,19 @@\n #endif\n }\n \n+static void *\n+mlx5_glue_dr_create_flow_action_sampler(\n+\t\t\tstruct mlx5dv_dr_flow_sampler_attr *attr)\n+{\n+#ifdef HAVE_MLX5_DR_CREATE_ACTION_FLOW_SAMPLE\n+\treturn mlx5dv_dr_action_create_flow_sampler(attr);\n+#else\n+\t(void)attr;\n+\terrno = ENOTSUP;\n+\treturn NULL;\n+#endif\n+}\n+\n static int\n mlx5_glue_devx_query_eqn(struct ibv_context *ctx, uint32_t cpus,\n \t\t\t uint32_t *eqn)\n@@ -1339,6 +1352,8 @@\n \t.devx_port_query = mlx5_glue_devx_port_query,\n \t.dr_dump_domain = mlx5_glue_dr_dump_domain,\n \t.dr_reclaim_domain_memory = mlx5_glue_dr_reclaim_domain_memory,\n+\t.dr_create_flow_action_sampler =\n+\t\tmlx5_glue_dr_create_flow_action_sampler,\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,\ndiff --git a/drivers/common/mlx5/linux/mlx5_glue.h b/drivers/common/mlx5/linux/mlx5_glue.h\nindex 734ace2..a77d239 100644\n--- a/drivers/common/mlx5/linux/mlx5_glue.h\n+++ b/drivers/common/mlx5/linux/mlx5_glue.h\n@@ -77,6 +77,7 @@\n #ifndef HAVE_MLX5DV_DR\n enum  mlx5dv_dr_domain_type { unused, };\n struct mlx5dv_dr_domain;\n+struct mlx5dv_dr_action;\n #endif\n \n #ifndef HAVE_MLX5DV_DR_DEVX_PORT\n@@ -87,6 +88,16 @@\n struct mlx5dv_dr_flow_meter_attr;\n #endif\n \n+#ifndef HAVE_MLX5_DR_CREATE_ACTION_FLOW_SAMPLE\n+struct mlx5dv_dr_flow_sampler_attr {\n+\tuint32_t sample_ratio;\n+\tvoid *default_next_table;\n+\tsize_t num_sample_actions;\n+\tstruct mlx5dv_dr_action **sample_actions;\n+\tuint64_t action;\n+};\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@@ -309,6 +320,8 @@ struct mlx5_glue {\n \t\t\t\t\t const void *pp_context,\n \t\t\t\t\t uint32_t flags);\n \tvoid (*dv_free_pp)(struct mlx5dv_pp *pp);\n+\tvoid *(*dr_create_flow_action_sampler)\n+\t\t\t(struct mlx5dv_dr_flow_sampler_attr *attr);\n };\n \n extern const struct mlx5_glue *mlx5_glue;\ndiff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h\nindex 563e7c8..0a270a2 100644\n--- a/drivers/common/mlx5/mlx5_prm.h\n+++ b/drivers/common/mlx5/mlx5_prm.h\n@@ -1479,6 +1479,16 @@ struct mlx5_ifc_virtio_emulation_cap_bits {\n \tu8 reserved_at_0[0x8000];\n };\n \n+struct mlx5_ifc_set_action_in_bits {\n+\tu8 action_type[0x4];\n+\tu8 field[0xc];\n+\tu8 reserved_at_10[0x3];\n+\tu8 offset[0x5];\n+\tu8 reserved_at_18[0x3];\n+\tu8 length[0x5];\n+\tu8 data[0x20];\n+};\n+\n struct mlx5_ifc_query_hca_cap_out_bits {\n \tu8 status[0x8];\n \tu8 reserved_at_8[0x18];\n",
    "prefixes": [
        "v6",
        "02/12"
    ]
}