Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/67918/?format=api
https://patches.dpdk.org/api/patches/67918/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200407230647.59478-2-thomas@monjalon.net/", "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": "<20200407230647.59478-2-thomas@monjalon.net>", "list_archive_url": "https://inbox.dpdk.org/dev/20200407230647.59478-2-thomas@monjalon.net", "date": "2020-04-07T23:06:45", "name": "[v2,1/3] common/mlx5: split glue initialization", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "0d26383ab4b01d51fe9bbced69be6b2131ebd6cc", "submitter": { "id": 685, "url": "https://patches.dpdk.org/api/people/685/?format=api", "name": "Thomas Monjalon", "email": "thomas@monjalon.net" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200407230647.59478-2-thomas@monjalon.net/mbox/", "series": [ { "id": 9238, "url": "https://patches.dpdk.org/api/series/9238/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9238", "date": "2020-04-07T23:06:44", "name": "mlx: fix build with -fno-common (gcc 10)", "version": 2, "mbox": "https://patches.dpdk.org/series/9238/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/67918/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/67918/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 9270DA0588;\n\tWed, 8 Apr 2020 01:07:01 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B0B631C021;\n\tWed, 8 Apr 2020 01:06:55 +0200 (CEST)", "from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com\n [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id F0E431BFE8\n for <dev@dpdk.org>; Wed, 8 Apr 2020 01:06:53 +0200 (CEST)", "from compute7.internal (compute7.nyi.internal [10.202.2.47])\n by mailout.nyi.internal (Postfix) with ESMTP id 9218B5C01AF;\n Tue, 7 Apr 2020 19:06:53 -0400 (EDT)", "from mailfrontend2 ([10.202.2.163])\n by compute7.internal (MEProxy); Tue, 07 Apr 2020 19:06:53 -0400", "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA id B07C7306D625;\n Tue, 7 Apr 2020 19:06:52 -0400 (EDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding; s=mesmtp; bh=lxTuy4PZdr\n EePoVIPYW290Pe7g8hIblldsCk21Eyh6s=; b=qnNhIt22zv+KbmSyroI87zKvdA\n 897yyoPkAFCyF3YVTs9oEb/W1FA/EZ2UagdMYmxiXEkl9Atz01B7OYuLR6vuXJsq\n 9xtgvDLGJAlKlgDI6YAzw0L94lyip8BZeSXTBJTQTydWu7kMFqZuqxzpIHSM/M/u\n 48FKUglQ54yvw3p6g=", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:date:from\n :in-reply-to:message-id:mime-version:references:subject:to\n :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n fm2; bh=lxTuy4PZdrEePoVIPYW290Pe7g8hIblldsCk21Eyh6s=; b=S6xzJnMv\n P9MaPbfbzF1EYWptACtSc9DpQrc95ZOX4wlYTYv/uJOuXHeLau4EVGvkgTt9M7qc\n ZDxVbTsoyvPdSVum3XZO+1tkUwFguX+C0ibHSuzKYl3ezOdNyP/zdoNmXkRvu9qA\n XoutceP8IpAvD7VRGKmWPKT8K40D8HXSPzebG+xCrW/EyWNoS0dBPfi9iP1xOZ9v\n ZO7UDnbjM+3ftzJv2f9HELEri52oLYp59oILU8SdAaa2eSkoX2WxaHFGCJY/T4/X\n Z9Q3L2VVvdaQs4IKREy0nz71Jn35xQq//4Dk4mzd/fcMnnyL4Pp3/45YG+nELF+A\n T3/ICcG2sUCx6A==" ], "X-ME-Sender": "<xms:jQeNXgj3yYoFD0k0kxco1P0auWMlR1IBz3HQixRwvMykj8YgZSY3Dw>", "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgeduhedrudeigddujecutefuodetggdotefrodftvf\n curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu\n uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc\n fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs\n ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph\n epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr\n rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth", "X-ME-Proxy": "<xmx:jQeNXjtk_BXsF1QmZmgFZklKyqsVL1liWj0qkd_ObaTkVkJmx4yp2g>\n <xmx:jQeNXgx5aVzxhZYBZHMGEcQBrr8e3ApQNU2IRjKmNHDEHy9ofqti8g>\n <xmx:jQeNXob0rtR-3bwIritmuJyLb6XDYB_i8qfEnKaOH8XayXkPCfPjxA>\n <xmx:jQeNXl52sYlztogpgMagZOBWoNiEfDhcl9Omjjw7T8X7OLb3sZZHJg>", "From": "Thomas Monjalon <thomas@monjalon.net>", "To": "dev@dpdk.org", "Cc": "Matan Azrad <matan@mellanox.com>, Shahaf Shuler <shahafs@mellanox.com>,\n Viacheslav Ovsiienko <viacheslavo@mellanox.com>", "Date": "Wed, 8 Apr 2020 01:06:45 +0200", "Message-Id": "<20200407230647.59478-2-thomas@monjalon.net>", "X-Mailer": "git-send-email 2.26.0", "In-Reply-To": "<20200407230647.59478-1-thomas@monjalon.net>", "References": "<20200210103216.1168439-1-thomas@monjalon.net>\n <20200407230647.59478-1-thomas@monjalon.net>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2 1/3] common/mlx5: split glue initialization", "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 function mlx5_glue_init was doing three things:\n\t- initialize logs\n\t- load glue library if in dlopen mode\n\t- initialize glue layer\nThey are split in three functions for clarity.\n\nThe config option RTE_IBVERBS_LINK_DLOPEN is not used anymore\noutside of make and meson files. It is replaced with MLX5_GLUE,\nwhich is defined in the same condition and is already used with dlopen.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\nAcked-by: Matan Azrad <matan@mellanox.com>\n---\n drivers/common/mlx5/mlx5_common.c | 75 ++++++++++++++++++-------------\n 1 file changed, 45 insertions(+), 30 deletions(-)", "diff": "diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c\nindex 046339c46f..9a30e6e0aa 100644\n--- a/drivers/common/mlx5/mlx5_common.c\n+++ b/drivers/common/mlx5/mlx5_common.c\n@@ -162,7 +162,7 @@ mlx5_translate_port_name(const char *port_name_in,\n \treturn;\n }\n \n-#ifdef RTE_IBVERBS_LINK_DLOPEN\n+#ifdef MLX5_GLUE\n \n /**\n * Suffix RTE_EAL_PMD_PATH with \"-glue\".\n@@ -204,32 +204,10 @@ mlx5_glue_path(char *buf, size_t size)\n \t\t\" re-configure DPDK\");\n \treturn NULL;\n }\n-#endif\n \n-/**\n- * Initialization routine for run-time dependency on rdma-core.\n- */\n-RTE_INIT_PRIO(mlx5_glue_init, CLASS)\n+static int\n+mlx5_glue_dlopen(void)\n {\n-\tmlx5_common_logtype = rte_log_register_type_and_pick_level(\"pmd.common.mlx5\", RTE_LOG_NOTICE);\n-\n-\t/*\n-\t * RDMAV_HUGEPAGES_SAFE tells ibv_fork_init() we intend to use\n-\t * huge pages. Calling ibv_fork_init() during init allows\n-\t * applications to use fork() safely for purposes other than\n-\t * using this PMD, which is not supported in forked processes.\n-\t */\n-\tsetenv(\"RDMAV_HUGEPAGES_SAFE\", \"1\", 1);\n-\t/* Match the size of Rx completion entry to the size of a cacheline. */\n-\tif (RTE_CACHE_LINE_SIZE == 128)\n-\t\tsetenv(\"MLX5_CQE_SIZE\", \"128\", 0);\n-\t/*\n-\t * MLX5_DEVICE_FATAL_CLEANUP tells ibv_destroy functions to\n-\t * cleanup all the Verbs resources even when the device was removed.\n-\t */\n-\tsetenv(\"MLX5_DEVICE_FATAL_CLEANUP\", \"1\", 1);\n-\t/* The glue initialization was done earlier by mlx5 common library. */\n-#ifdef RTE_IBVERBS_LINK_DLOPEN\n \tchar glue_path[sizeof(RTE_EAL_PMD_PATH) - 1 + sizeof(\"-glue\")];\n \tvoid *handle = NULL;\n \n@@ -301,7 +279,47 @@ RTE_INIT_PRIO(mlx5_glue_init, CLASS)\n \t\tgoto glue_error;\n \t}\n \tmlx5_glue = *sym;\n-#endif /* RTE_IBVERBS_LINK_DLOPEN */\n+\treturn 0;\n+\n+glue_error:\n+\tif (handle)\n+\t\tdlclose(handle);\n+\treturn -1;\n+}\n+\n+#endif\n+\n+RTE_INIT_PRIO(mlx5_log_init, LOG)\n+{\n+\tmlx5_common_logtype = rte_log_register_type_and_pick_level(\"pmd.common.mlx5\", RTE_LOG_NOTICE);\n+}\n+\n+/**\n+ * Initialization routine for run-time dependency on rdma-core.\n+ */\n+RTE_INIT_PRIO(mlx5_glue_init, CLASS)\n+{\n+\t/*\n+\t * RDMAV_HUGEPAGES_SAFE tells ibv_fork_init() we intend to use\n+\t * huge pages. Calling ibv_fork_init() during init allows\n+\t * applications to use fork() safely for purposes other than\n+\t * using this PMD, which is not supported in forked processes.\n+\t */\n+\tsetenv(\"RDMAV_HUGEPAGES_SAFE\", \"1\", 1);\n+\t/* Match the size of Rx completion entry to the size of a cacheline. */\n+\tif (RTE_CACHE_LINE_SIZE == 128)\n+\t\tsetenv(\"MLX5_CQE_SIZE\", \"128\", 0);\n+\t/*\n+\t * MLX5_DEVICE_FATAL_CLEANUP tells ibv_destroy functions to\n+\t * cleanup all the Verbs resources even when the device was removed.\n+\t */\n+\tsetenv(\"MLX5_DEVICE_FATAL_CLEANUP\", \"1\", 1);\n+\n+#ifdef MLX5_GLUE\n+\tif (mlx5_glue_dlopen() != 0)\n+\t\tgoto glue_error;\n+#endif\n+\n #ifdef RTE_LIBRTE_MLX5_DEBUG\n \t/* Glue structure must not contain any NULL pointers. */\n \t{\n@@ -319,11 +337,8 @@ RTE_INIT_PRIO(mlx5_glue_init, CLASS)\n \t}\n \tmlx5_glue->fork_init();\n \treturn;\n+\n glue_error:\n-#ifdef RTE_IBVERBS_LINK_DLOPEN\n-\tif (handle)\n-\t\tdlclose(handle);\n-#endif\n \tDRV_LOG(WARNING, \"Cannot initialize MLX5 common due to missing\"\n \t\t\" run-time dependency on rdma-core libraries (libibverbs,\"\n \t\t\" libmlx5)\");\n", "prefixes": [ "v2", "1/3" ] }{ "id": 67918, "url": "