get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65687,
    "url": "http://patches.dpdk.org/api/patches/65687/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200210103216.1168439-2-thomas@monjalon.net/",
    "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": "<20200210103216.1168439-2-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200210103216.1168439-2-thomas@monjalon.net",
    "date": "2020-02-10T10:32:14",
    "name": "[1/3] common/mlx5: split glue initialization",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b05d4b36dbd43c4dd7ac9d3f33a26298426ca3a1",
    "submitter": {
        "id": 685,
        "url": "http://patches.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "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/20200210103216.1168439-2-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 8483,
            "url": "http://patches.dpdk.org/api/series/8483/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8483",
            "date": "2020-02-10T10:32:13",
            "name": "mlx: fix build with -fno-common (gcc 10)",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8483/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65687/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65687/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 D387CA052F;\n\tMon, 10 Feb 2020 11:32:31 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CFAF51BE9C;\n\tMon, 10 Feb 2020 11:32:28 +0100 (CET)",
            "from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com\n [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 4408E1BE94\n for <dev@dpdk.org>; Mon, 10 Feb 2020 11:32:27 +0100 (CET)",
            "from compute1.internal (compute1.nyi.internal [10.202.2.41])\n by mailout.nyi.internal (Postfix) with ESMTP id E8BEB21873;\n Mon, 10 Feb 2020 05:32:26 -0500 (EST)",
            "from mailfrontend1 ([10.202.2.162])\n by compute1.internal (MEProxy); Mon, 10 Feb 2020 05:32:26 -0500",
            "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA id 160BD3280066;\n Mon, 10 Feb 2020 05:32:26 -0500 (EST)"
        ],
        "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=QgrBtlZlNq\n +6D2nyqghqqu8tbjm+kynIsfeOT81ljtc=; b=YTw3gBfE/QI+XQgf4CILS/m2Bf\n nekG8Jo8mFxXfwgLBIOBezZvz4uMGbXAvdE+R5FC1urY8xh3dIVJMwgxz4C6Hs1l\n fKFcZJHK2y/y3MECqgDtfxlGcZdDcUYuWIn+KZKPBW4G3qjip5j5Y7nWviTKQiIO\n qGTWQr1uY0MgC9f0s=",
            "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=QgrBtlZlNq+6D2nyqghqqu8tbjm+kynIsfeOT81ljtc=; b=MWjM0X0p\n ditekGHoGITAKeGNhGwjDgL4/9a3Lws4jx2Arg64JOtH+gwQCE+q6l5ddA4+yIlk\n l57ukYIEfD0xU+fyRXmAH2JhGzEpxjjAciQ7imWJaNrwHoHr/DRE1XSfu419nka6\n H+5lr5DpTi79WaD+tiai3h96K5ZAm6wVpctmeMEP1XGBwOlk2asM/BVqOShnmour\n fNbpMmCw6kqbu/nIGuYGhGL4rB84pzxu3oJsWC32unr+gClnxfQY4LGWQIeTEdTp\n 1+jt6yiOTs+q/Eb+ycTKXpAW4MmCQiuNAD1CXknDaVpneRTJB5aQGN2X4Q+NLrPp\n DC2KRcA8bpzo1g=="
        ],
        "X-ME-Sender": "<xms:OjFBXlMPrPy_4j-6XNF8U6di8n8o7RMa-EYdRT1tq-k2OqeSm0KsZA>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedugedriedugdduiecutefuodetggdotefrodftvf\n curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu\n uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc\n fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs\n ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph\n epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr\n rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth",
        "X-ME-Proxy": "<xmx:OjFBXsMNsOZRaZ0kEhBjrYo4hV45VkfOX3WTcbHkfXlmix0zh0tJzw>\n <xmx:OjFBXvT6wfB5_7E9XntcD9cNJzW1ywEDnvPYU4hDJksTBJIKP3Bb7A>\n <xmx:OjFBXmAb_sn-0XnVkN2R2vX-F6_PxBAHO2Pyu6TURTvc3_Rpj0897A>\n <xmx:OjFBXi8Xy9zxMagnC35kYOwMRNs1wJ-DKx87z9FJlN-qjTcQqQlQRQ>",
        "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": "Mon, 10 Feb 2020 11:32:14 +0100",
        "Message-Id": "<20200210103216.1168439-2-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.25.0",
        "In-Reply-To": "<20200210103216.1168439-1-thomas@monjalon.net>",
        "References": "<20200210103216.1168439-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 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>\n---\n drivers/common/mlx5/mlx5_common.c | 77 +++++++++++++++++++------------\n 1 file changed, 47 insertions(+), 30 deletions(-)",
    "diff": "diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c\nindex 610fb480b5..f96506c27a 100644\n--- a/drivers/common/mlx5/mlx5_common.c\n+++ b/drivers/common/mlx5/mlx5_common.c\n@@ -160,7 +160,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@@ -202,36 +202,12 @@ 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 \tvoid *handle = NULL;\n \n-\t/* Initialize common log type. */\n-\tmlx5_common_logtype = rte_log_register(\"pmd.common.mlx5\");\n-\tif (mlx5_common_logtype >= 0)\n-\t\trte_log_set_level(mlx5_common_logtype, RTE_LOG_NOTICE);\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 \tconst char *path[] = {\n \t\t/*\n@@ -301,7 +277,49 @@ 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(\"pmd.common.mlx5\");\n+\tif (mlx5_common_logtype >= 0)\n+\t\trte_log_set_level(mlx5_common_logtype, 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,9 +337,8 @@ RTE_INIT_PRIO(mlx5_glue_init, CLASS)\n \t}\n \tmlx5_glue->fork_init();\n \treturn;\n+\n glue_error:\n-\tif (handle)\n-\t\tdlclose(handle);\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": [
        "1/3"
    ]
}