Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/82420/?format=api
https://patches.dpdk.org/api/patches/82420/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201027232335.31427-29-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-29-ophirmu@nvidia.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201027232335.31427-29-ophirmu@nvidia.com", "date": "2020-10-27T23:22:51", "name": "[v1,28/72] common/mlx5/windows: add OS umem reg/dereg API", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "8c3b89a6029a71a3343941dfdaa5c2bbedb61546", "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-29-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/82420/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/82420/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 A9AF8A04B5;\n\tWed, 28 Oct 2020 00:34:14 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B6B8BBBBA;\n\tWed, 28 Oct 2020 00:25:00 +0100 (CET)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 24C3C2BFA\n for <dev@dpdk.org>; Wed, 28 Oct 2020 00:24:01 +0100 (CET)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n ophirmu@nvidia.com) with SMTP; 28 Oct 2020 01:23:55 +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 09RNNrre026642;\n Wed, 28 Oct 2020 01:23:55 +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:22:51 +0000", "Message-Id": "<20201027232335.31427-29-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 28/72] common/mlx5/windows: add OS umem\n\treg/dereg API", "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": "From: Tal Shnaiderman <talshn@nvidia.com>\n\nImplement Windows API mlx5_os_umem_reg() and mlx5_os_umem_dereg(). They\nare equivalent to the Linux implementation.\n\nSigned-off-by: Tal Shnaiderman <talshn@nvidia.com>\n---\n drivers/common/mlx5/rte_common_mlx5_exports.def | 2 +\n drivers/common/mlx5/windows/mlx5_common_os.c | 60 +++++++++++++++++++++++++\n drivers/common/mlx5/windows/mlx5_common_os.h | 2 +\n 3 files changed, 64 insertions(+)", "diff": "diff --git a/drivers/common/mlx5/rte_common_mlx5_exports.def b/drivers/common/mlx5/rte_common_mlx5_exports.def\nindex 15dfa2e..1d12e71 100644\n--- a/drivers/common/mlx5/rte_common_mlx5_exports.def\n+++ b/drivers/common/mlx5/rte_common_mlx5_exports.def\n@@ -61,3 +61,5 @@ EXPORTS\n \tmlx5_free\n \tmlx5_os_alloc_pd\n \tmlx5_os_dealloc_pd\n+\tmlx5_os_umem_reg\n+\tmlx5_os_umem_dereg\ndiff --git a/drivers/common/mlx5/windows/mlx5_common_os.c b/drivers/common/mlx5/windows/mlx5_common_os.c\nindex f77dfca..c8343ad 100644\n--- a/drivers/common/mlx5/windows/mlx5_common_os.c\n+++ b/drivers/common/mlx5/windows/mlx5_common_os.c\n@@ -69,3 +69,63 @@ mlx5_os_dealloc_pd(void *pd)\n \tmlx5_free(pd);\n \treturn 0;\n }\n+\n+/**\n+ * Register umem.\n+ *\n+ * @param[in] ctx\n+ * Pointer to context.\n+ * @param[in] addr\n+ * Pointer to memory start address.\n+ * @param[in] size\n+ * Size of the memory to register.\n+ * @param[out] access\n+ * UMEM access type\n+ *\n+ * @return\n+ * umem on successful registration, NULL and errno otherwise\n+ */\n+void *\n+mlx5_os_umem_reg(void *ctx, void *addr, size_t size, uint32_t access)\n+{\n+\tstruct mlx5_devx_umem *umem;\n+\n+\tumem = mlx5_malloc(MLX5_MEM_ZERO,\n+\t\t(sizeof(*umem)), 0, SOCKET_ID_ANY);\n+\tif (!umem) {\n+\t\terrno = ENOMEM;\n+\t\treturn NULL;\n+\t}\n+\tumem->umem_hdl = mlx5_glue->devx_umem_reg(ctx, addr, size, access,\n+\t\t&umem->umem_id);\n+\tif (!umem->umem_hdl) {\n+\t\tmlx5_free(umem);\n+\t\treturn NULL;\n+\t}\n+\tumem->addr = addr;\n+\treturn umem;\n+}\n+\n+/**\n+ * Deregister umem.\n+ *\n+ * @param[in] pumem\n+ * Pointer to umem.\n+ *\n+ * @return\n+ * 0 on successful release, negative number otherwise\n+ */\n+int\n+mlx5_os_umem_dereg(void *pumem)\n+{\n+\tstruct mlx5_devx_umem *umem;\n+\tint err = 0;\n+\n+\tif (!pumem)\n+\t\treturn err;\n+\tumem = pumem;\n+\tif (umem->umem_hdl)\n+\t\terr = mlx5_glue->devx_umem_dereg(umem->umem_hdl);\n+\tmlx5_free(umem);\n+\treturn err;\n+}\ndiff --git a/drivers/common/mlx5/windows/mlx5_common_os.h b/drivers/common/mlx5/windows/mlx5_common_os.h\nindex f47351e..decb5ac 100644\n--- a/drivers/common/mlx5/windows/mlx5_common_os.h\n+++ b/drivers/common/mlx5/windows/mlx5_common_os.h\n@@ -142,4 +142,6 @@ mlx5_os_get_umem_id(void *umem)\n \n void *mlx5_os_alloc_pd(void *ctx);\n int mlx5_os_dealloc_pd(void *pd);\n+void *mlx5_os_umem_reg(void *ctx, void *addr, size_t size, uint32_t access);\n+int mlx5_os_umem_dereg(void *pumem);\n #endif /* RTE_PMD_MLX5_COMMON_OS_H_ */\n", "prefixes": [ "v1", "28/72" ] }{ "id": 82420, "url": "