get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 84970,
    "url": "http://patches.dpdk.org/api/patches/84970/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201210150648.8784-19-talshn@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": "<20201210150648.8784-19-talshn@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201210150648.8784-19-talshn@nvidia.com",
    "date": "2020-12-10T15:06:33",
    "name": "[v2,18/33] common/mlx5: add DevX alloc PD command",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2d7b1c599a6784e424a0d6787048eb75a18aa4cb",
    "submitter": {
        "id": 1893,
        "url": "http://patches.dpdk.org/api/people/1893/?format=api",
        "name": "Tal Shnaiderman",
        "email": "talshn@nvidia.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/20201210150648.8784-19-talshn@nvidia.com/mbox/",
    "series": [
        {
            "id": 14240,
            "url": "http://patches.dpdk.org/api/series/14240/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14240",
            "date": "2020-12-10T15:06:17",
            "name": "mlx5 Windows support - part #5",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/14240/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/84970/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/84970/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 D60CBA04DB;\n\tThu, 10 Dec 2020 16:15:04 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E1899CA5D;\n\tThu, 10 Dec 2020 16:08:18 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id C831EC97A\n for <dev@dpdk.org>; Thu, 10 Dec 2020 16:07:52 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n talshn@nvidia.com) with SMTP; 10 Dec 2020 17:07:46 +0200",
            "from nvidia.com (l-wincomp04-vm.mtl.labs.mlnx [10.237.1.5])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BAF7h9A007994;\n Thu, 10 Dec 2020 17:07:46 +0200"
        ],
        "From": "Tal Shnaiderman <talshn@nvidia.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, matan@nvidia.com, rasland@nvidia.com,\n ophirmu@nvidia.com",
        "Date": "Thu, 10 Dec 2020 17:06:33 +0200",
        "Message-Id": "<20201210150648.8784-19-talshn@nvidia.com>",
        "X-Mailer": "git-send-email 2.16.1.windows.4",
        "In-Reply-To": "<20201210150648.8784-1-talshn@nvidia.com>",
        "References": "<20201027232335.31427-2-ophirmu@nvidia.com>\n <20201210150648.8784-1-talshn@nvidia.com>",
        "Subject": "[dpdk-dev] [PATCH v2 18/33] common/mlx5: add DevX alloc PD command",
        "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 a new DevX API mlx5_devx_cmd_alloc_pd() that creates a new protection\ndomain (PD).\n\nSigned-off-by: Tal Shnaiderman <talshn@nvidia.com>\nAcked-by: Matan Azrad <matan@nvidia.com>\n---\n drivers/common/mlx5/mlx5_devx_cmds.c            | 35 ++++++++++++++++++++++++\n drivers/common/mlx5/mlx5_devx_cmds.h            |  2 ++\n drivers/common/mlx5/mlx5_prm.h                  | 36 +++++++++++++++++++++++++\n drivers/common/mlx5/rte_common_mlx5_exports.def |  1 +\n drivers/common/mlx5/version.map                 |  1 +\n 5 files changed, 75 insertions(+)",
    "diff": "diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c\nindex 36d3a421aa..12f51a940c 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.c\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.c\n@@ -2055,3 +2055,38 @@ mlx5_devx_cmd_create_flow_hit_aso_obj(void *ctx, uint32_t pd)\n \tflow_hit_aso_obj->id = MLX5_GET(general_obj_out_cmd_hdr, out, obj_id);\n \treturn flow_hit_aso_obj;\n }\n+\n+/*\n+ * Create PD using DevX API.\n+ *\n+ * @param[in] ctx\n+ *   Context returned from mlx5 open_device() glue function.\n+ *\n+ * @return\n+ *   The DevX object created, NULL otherwise and rte_errno is set.\n+ */\n+struct mlx5_devx_obj *\n+mlx5_devx_cmd_alloc_pd(void *ctx)\n+{\n+\tstruct mlx5_devx_obj *ppd =\n+\t\tmlx5_malloc(MLX5_MEM_ZERO, sizeof(*ppd), 0, SOCKET_ID_ANY);\n+\tu32 in[MLX5_ST_SZ_DW(alloc_pd_in)] = {0};\n+\tu32 out[MLX5_ST_SZ_DW(alloc_pd_out)] = {0};\n+\n+\tif (!ppd) {\n+\t\tDRV_LOG(ERR, \"Failed to allocate PD data.\");\n+\t\trte_errno = ENOMEM;\n+\t\treturn NULL;\n+\t}\n+\tMLX5_SET(alloc_pd_in, in, opcode, MLX5_CMD_OP_ALLOC_PD);\n+\tppd->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),\n+\t\t\t\tout, sizeof(out));\n+\tif (!ppd->obj) {\n+\t\tmlx5_free(ppd);\n+\t\tDRV_LOG(ERR, \"Failed to allocate PD Obj using DevX.\");\n+\t\trte_errno = errno;\n+\t\treturn NULL;\n+\t}\n+\tppd->id = MLX5_GET(alloc_pd_out, out, pd);\n+\treturn ppd;\n+}\ndiff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h\nindex 5056d86ed9..8277fdbc39 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.h\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.h\n@@ -508,4 +508,6 @@ __rte_internal\n struct mlx5_devx_obj *mlx5_devx_cmd_create_flow_hit_aso_obj(void *ctx,\n \t\t\t\t\t\t\t    uint32_t pd);\n \n+__rte_internal\n+struct mlx5_devx_obj *mlx5_devx_cmd_alloc_pd(void *ctx);\n #endif /* RTE_PMD_MLX5_DEVX_CMDS_H_ */\ndiff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h\nindex 585e9d1c05..4ddf865743 100644\n--- a/drivers/common/mlx5/mlx5_prm.h\n+++ b/drivers/common/mlx5/mlx5_prm.h\n@@ -844,6 +844,8 @@ enum {\n \tMLX5_CMD_OP_SUSPEND_QP = 0x50F,\n \tMLX5_CMD_OP_RESUME_QP = 0x510,\n \tMLX5_CMD_OP_QUERY_NIC_VPORT_CONTEXT = 0x754,\n+\tMLX5_CMD_OP_ALLOC_PD = 0x800,\n+\tMLX5_CMD_OP_DEALLOC_PD = 0x801,\n \tMLX5_CMD_OP_ACCESS_REGISTER = 0x805,\n \tMLX5_CMD_OP_ALLOC_TRANSPORT_DOMAIN = 0x816,\n \tMLX5_CMD_OP_CREATE_TIR = 0x900,\n@@ -2772,6 +2774,40 @@ struct mlx5_ifc_init2init_qp_in_bits {\n \tu8 reserved_at_800[0x80];\n };\n \n+struct mlx5_ifc_dealloc_pd_out_bits {\n+\tu8 status[0x8];\n+\tu8 reserved_0[0x18];\n+\tu8 syndrome[0x20];\n+\tu8 reserved_1[0x40];\n+};\n+\n+struct mlx5_ifc_dealloc_pd_in_bits {\n+\tu8 opcode[0x10];\n+\tu8 reserved_0[0x10];\n+\tu8 reserved_1[0x10];\n+\tu8 op_mod[0x10];\n+\tu8 reserved_2[0x8];\n+\tu8 pd[0x18];\n+\tu8 reserved_3[0x20];\n+};\n+\n+struct mlx5_ifc_alloc_pd_out_bits {\n+\tu8 status[0x8];\n+\tu8 reserved_0[0x18];\n+\tu8 syndrome[0x20];\n+\tu8 reserved_1[0x8];\n+\tu8 pd[0x18];\n+\tu8 reserved_2[0x20];\n+};\n+\n+struct mlx5_ifc_alloc_pd_in_bits {\n+\tu8 opcode[0x10];\n+\tu8 reserved_0[0x10];\n+\tu8 reserved_1[0x10];\n+\tu8 op_mod[0x10];\n+\tu8 reserved_2[0x40];\n+};\n+\n #ifdef PEDANTIC\n #pragma GCC diagnostic ignored \"-Wpedantic\"\n #endif\ndiff --git a/drivers/common/mlx5/rte_common_mlx5_exports.def b/drivers/common/mlx5/rte_common_mlx5_exports.def\nindex 23984b7abd..15aafc3809 100644\n--- a/drivers/common/mlx5/rte_common_mlx5_exports.def\n+++ b/drivers/common/mlx5/rte_common_mlx5_exports.def\n@@ -5,6 +5,7 @@ EXPORTS\n \n \tmlx5_create_mr_ext\n \n+\tmlx5_devx_cmd_alloc_pd\n \tmlx5_devx_cmd_create_cq\n \tmlx5_devx_cmd_create_flex_parser\n \tmlx5_devx_cmd_create_qp\ndiff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map\nindex 17dd11f635..fb3952bbc6 100644\n--- a/drivers/common/mlx5/version.map\n+++ b/drivers/common/mlx5/version.map\n@@ -10,6 +10,7 @@ INTERNAL {\n \n \tmlx5_dev_to_pci_addr;\n \n+\tmlx5_devx_cmd_alloc_pd;\n \tmlx5_devx_cmd_create_cq;\n \tmlx5_devx_cmd_create_flex_parser;\n \tmlx5_devx_cmd_create_qp;\n",
    "prefixes": [
        "v2",
        "18/33"
    ]
}