get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 49503,
    "url": "http://patches.dpdk.org/api/patches/49503/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190109020524.3633-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": "<20190109020524.3633-2-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190109020524.3633-2-thomas@monjalon.net",
    "date": "2019-01-09T02:05:24",
    "name": "[2/2] config: add static linkage of mlx dependency",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "73136c99231fdebd4d53544e31bc10cf196e5e39",
    "submitter": {
        "id": 685,
        "url": "http://patches.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "delegate": {
        "id": 6624,
        "url": "http://patches.dpdk.org/api/users/6624/?format=api",
        "username": "shahafs",
        "first_name": "Shahaf",
        "last_name": "Shuler",
        "email": "shahafs@mellanox.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190109020524.3633-2-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 3052,
            "url": "http://patches.dpdk.org/api/series/3052/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3052",
            "date": "2019-01-09T02:05:23",
            "name": "[1/2] config: gather options for dlopen mlx dependency",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/3052/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/49503/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/49503/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8C5101B227;\n\tWed,  9 Jan 2019 03:05:54 +0100 (CET)",
            "from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com\n\t[66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 01A3F1B217\n\tfor <dev@dpdk.org>; Wed,  9 Jan 2019 03:05:53 +0100 (CET)",
            "from compute1.internal (compute1.nyi.internal [10.202.2.41])\n\tby mailout.nyi.internal (Postfix) with ESMTP id 627822153B;\n\tTue,  8 Jan 2019 21:05:52 -0500 (EST)",
            "from mailfrontend2 ([10.202.2.163])\n\tby compute1.internal (MEProxy); Tue, 08 Jan 2019 21:05:52 -0500",
            "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id 60589102DD;\n\tTue,  8 Jan 2019 21:05:51 -0500 (EST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n\tfrom:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding; s=mesmtp; bh=WIn9vnmgmU\n\tUDrVwFbhWECuRxTe/AoCSIxzzSzaDy6lc=; b=HGfRqqO94RW1ykzhd1NLX242Lg\n\tVcD1CBGAns+TW+7obpBbdbkBOXv4pBrz3pOgqVurO9RrHjZH4aZ/G5Lvqv0jYJUq\n\typk7Xb9QuYpjWhE6Y8/EjfddLdpDq+p0obRgAqIAVefQt2py3Olw8PQmavygkoIn\n\tNNDUmHS0IbrXYisUk=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:content-transfer-encoding:date:from\n\t:in-reply-to:message-id:mime-version:references:subject:to\n\t:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n\tfm1; bh=WIn9vnmgmUUDrVwFbhWECuRxTe/AoCSIxzzSzaDy6lc=; b=IeZMxg4S\n\tJxohUNXmUa+ai5gyyHx44agtqstLjD4HpH0wwL/fwWBbAHvgjGBR2Tjqrcw4RzPm\n\tIVFmVXxaexhnzk7Eg/jsxGXRA21MMrwIFIStnlz9C17/EwYyHT36cJrLXKwJphrJ\n\tFl+Hn7+5igb08a4viVsbLTAazM80MjIg7KPW41DRHX1OzSOODOJuQXiTeoeNswcQ\n\tlxFgIYGUtMP0/GHylaMnUMTJRByi5eTeEdZIFnAbRtawn5LWYcnNE4yHE9W4wPEq\n\t7RrkRCkKB2oziDY4pGAh5lmTxSHpV7gCqStQ6LrGOukzmVw7pK4OJy0OMLF7txSg\n\txaowJGbTc+JWwQ=="
        ],
        "X-ME-Sender": "<xms:AFc1XGa8fr8CyTeRVEU0ij8PA9853RPl4GirK2KwcMX0Jd0Z1GXENA>",
        "X-ME-Proxy-Cause": "gggruggvucftvghtrhhoucdtuddrgedtledrfedtgdegfeculddtuddrgedtkedrtddtmd\n\tcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen\n\tuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre\n\tdtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes\n\tmhhonhhjrghlohhnrdhnvghtqeenucffohhmrghinhepkhgvrhhnvghlrdhorhhgpdhgih\n\ththhhusghushgvrhgtohhnthgvnhhtrdgtohhmnecukfhppeejjedrudefgedrvddtfedr\n\tudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonh\n\tdrnhgvthenucevlhhushhtvghrufhiiigvpedt",
        "X-ME-Proxy": "<xmx:AFc1XE-CU07D7lxiisRttuQ7qb58HOLHTvrqVFyJhlTUB6tbPdu8DA>\n\t<xmx:AFc1XA8ScNG15DeLi1oaVInJp8rcR-yZgmo_lyl-OoU_Mz935Qwbbw>\n\t<xmx:AFc1XNkdFofc0Us4Y-197Ik3PZh8_lbnl4zzsWc2dXNf9DxKOL8gBg>\n\t<xmx:AFc1XCyYu1IKRclwt2mkznRgPkLIwWVRXVM2E0ypN_dG8Jw2zOJYBQ>",
        "From": "Thomas Monjalon <thomas@monjalon.net>",
        "To": "yskoh@mellanox.com,\n\tshahafs@mellanox.com",
        "Cc": "dev@dpdk.org,\n\tferruh.yigit@intel.com,\n\tbruce.richardson@intel.com",
        "Date": "Wed,  9 Jan 2019 03:05:24 +0100",
        "Message-Id": "<20190109020524.3633-2-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190109020524.3633-1-thomas@monjalon.net>",
        "References": "<20190109020524.3633-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 2/2] config: add static linkage of mlx dependency",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The libraries provided by rdma-core may be statically linked\nif enabling CONFIG_RTE_IBVERBS_LINK_STATIC in the make-based build.\nIf CONFIG_RTE_BUILD_SHARED_LIB is disabled,\nthe applications will embed the mlx PMDs with ibverbs and the mlx libraries.\nIf CONFIG_RTE_BUILD_SHARED_LIB is enabled,\nthe mlx PMDs will embed ibverbs and the mlx libraries.\n\nSupport with meson may be added later.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n buildtools/options-ibverbs-static.sh | 14 ++++++++++++++\n config/common_base                   |  3 ++-\n doc/guides/nics/mlx4.rst             | 18 ++++++++++++++++++\n doc/guides/nics/mlx5.rst             | 18 ++++++++++++++++++\n drivers/net/mlx4/Makefile            |  2 ++\n drivers/net/mlx5/Makefile            |  2 ++\n mk/rte.app.mk                        |  4 ++++\n 7 files changed, 60 insertions(+), 1 deletion(-)\n create mode 100755 buildtools/options-ibverbs-static.sh",
    "diff": "diff --git a/buildtools/options-ibverbs-static.sh b/buildtools/options-ibverbs-static.sh\nnew file mode 100755\nindex 000000000..0f285a343\n--- /dev/null\n+++ b/buildtools/options-ibverbs-static.sh\n@@ -0,0 +1,14 @@\n+#! /bin/sh\n+# SPDX-License-Identifier: BSD-3-Clause\n+#\n+# Print link options -l for static link of ibverbs.\n+#\n+# Static flavour of ibverbs and the providers libs are explicitly picked,\n+# thanks to the syntax -l:libfoo.a\n+# Other libs (pthread and nl) are unchanged, i.e. linked dynamically by default.\n+#\n+# PKG_CONFIG_PATH may be required to be set if libibverbs.pc is not installed.\n+\n+pkg-config --libs-only-l --static libibverbs |\n+\ttr '[:space:]' '\\n' |\n+\tsed -r '/^-l(pthread|nl)/! s,(^-l)(.*),\\1:lib\\2.a,'\ndiff --git a/config/common_base b/config/common_base\nindex 37f692ce1..f6e5a5396 100644\n--- a/config/common_base\n+++ b/config/common_base\n@@ -330,8 +330,9 @@ CONFIG_RTE_LIBRTE_MLX5_DEBUG=n\n \n # Linking method for mlx4/5 dependency on ibverbs and related libraries\n # Default linking is dynamic by linker.\n-# Other option is dynamic by dlopen at run-time.\n+# Other options are: dynamic by dlopen at run-time, or statically embedded.\n CONFIG_RTE_IBVERBS_LINK_DLOPEN=n\n+CONFIG_RTE_IBVERBS_LINK_STATIC=n\n \n #\n # Compile burst-oriented Netronome NFP PMD driver\ndiff --git a/doc/guides/nics/mlx4.rst b/doc/guides/nics/mlx4.rst\nindex 88d467a23..4d4842cde 100644\n--- a/doc/guides/nics/mlx4.rst\n+++ b/doc/guides/nics/mlx4.rst\n@@ -79,6 +79,11 @@ These options can be modified in the ``.config`` file.\n \n   This option has no performance impact.\n \n+- ``CONFIG_RTE_IBVERBS_LINK_STATIC`` (default **n**)\n+\n+  Embed static flavour of the dependencies **libibverbs** and **libmlx4**\n+  in the PMD shared library or the executable static binary.\n+\n - ``CONFIG_RTE_LIBRTE_MLX4_DEBUG`` (default **n**)\n \n   Toggle debugging code and stricter compilation flags. Enabling this option\n@@ -206,8 +211,21 @@ Current RDMA core package and Linux kernel (recommended)\n - Minimal Linux kernel version: 4.14.\n - Minimal RDMA core version: v15 (see `RDMA core installation documentation`_).\n \n+- Starting with rdma-core v21, static libraries can be built::\n+\n+    cd build\n+    CFLAGS=-fPIC cmake -DIN_PLACE=1 -DENABLE_STATIC=1 -GNinja ..\n+    ninja\n+\n .. _`RDMA core installation documentation`: https://raw.githubusercontent.com/linux-rdma/rdma-core/master/README.md\n \n+If rdma-core libraries are built but not installed, DPDK makefile can link them,\n+thanks to these environment variables:\n+\n+   - ``EXTRA_CFLAGS=-I/path/to/rdma-core/build/include``\n+   - ``EXTRA_LDFLAGS=-L/path/to/rdma-core/build/lib``\n+   - ``PKG_CONFIG_PATH=/path/to/rdma-core/build/lib/pkgconfig``\n+\n .. _Mellanox_OFED_as_a_fallback:\n \n Mellanox OFED as a fallback\ndiff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst\nindex 749acd222..5ddca44ee 100644\n--- a/doc/guides/nics/mlx5.rst\n+++ b/doc/guides/nics/mlx5.rst\n@@ -210,6 +210,11 @@ These options can be modified in the ``.config`` file.\n \n   This option has no performance impact.\n \n+- ``CONFIG_RTE_IBVERBS_LINK_STATIC`` (default **n**)\n+\n+  Embed static flavour of the dependencies **libibverbs** and **libmlx5**\n+  in the PMD shared library or the executable static binary.\n+\n - ``CONFIG_RTE_LIBRTE_MLX5_DEBUG`` (default **n**)\n \n   Toggle debugging code and stricter compilation flags. Enabling this option\n@@ -577,9 +582,22 @@ RMDA Core with Linux Kernel\n   - rdma-core version 18.0 or above built with 32bit support.\n   - Kernel version 4.14.41 or above.\n \n+- Starting with rdma-core v21, static libraries can be built::\n+\n+    cd build\n+    CFLAGS=-fPIC cmake -DIN_PLACE=1 -DENABLE_STATIC=1 -GNinja ..\n+    ninja\n+\n .. _`Linux installation documentation`: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/plain/Documentation/admin-guide/README.rst\n .. _`RDMA Core installation documentation`: https://raw.githubusercontent.com/linux-rdma/rdma-core/master/README.md\n \n+If rdma-core libraries are built but not installed, DPDK makefile can link them,\n+thanks to these environment variables:\n+\n+   - ``EXTRA_CFLAGS=-I/path/to/rdma-core/build/include``\n+   - ``EXTRA_LDFLAGS=-L/path/to/rdma-core/build/lib``\n+   - ``PKG_CONFIG_PATH=/path/to/rdma-core/build/lib/pkgconfig``\n+\n Mellanox OFED\n ^^^^^^^^^^^^^\n \ndiff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile\nindex 724a4dcbc..1f1b92748 100644\n--- a/drivers/net/mlx4/Makefile\n+++ b/drivers/net/mlx4/Makefile\n@@ -43,6 +43,8 @@ CFLAGS += -DMLX4_GLUE='\"$(LIB_GLUE)\"'\n CFLAGS += -DMLX4_GLUE_VERSION='\"$(LIB_GLUE_VERSION)\"'\n CFLAGS_mlx4_glue.o += -fPIC\n LDLIBS += -ldl\n+else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y)\n+LDLIBS += $(shell $(RTE_SDK)/buildtools/options-ibverbs-static.sh)\n else\n LDLIBS += -libverbs -lmlx4\n endif\ndiff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile\nindex 47a7f4d68..28460c56f 100644\n--- a/drivers/net/mlx5/Makefile\n+++ b/drivers/net/mlx5/Makefile\n@@ -57,6 +57,8 @@ CFLAGS += -DMLX5_GLUE='\"$(LIB_GLUE)\"'\n CFLAGS += -DMLX5_GLUE_VERSION='\"$(LIB_GLUE_VERSION)\"'\n CFLAGS_mlx5_glue.o += -fPIC\n LDLIBS += -ldl\n+else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y)\n+LDLIBS += $(shell $(RTE_SDK)/buildtools/options-ibverbs-static.sh)\n else\n LDLIBS += -libverbs -lmlx5\n endif\ndiff --git a/mk/rte.app.mk b/mk/rte.app.mk\nindex d5b1ec6b7..3ac396236 100644\n--- a/mk/rte.app.mk\n+++ b/mk/rte.app.mk\n@@ -174,6 +174,10 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -lrte_pmd_mlx5 -lmnl\n ifeq ($(CONFIG_RTE_IBVERBS_LINK_DLOPEN),y)\n _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -ldl\n _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -ldl\n+else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y)\n+LIBS_IBVERBS_STATIC = $(shell $(RTE_SDK)/buildtools/options-ibverbs-static.sh)\n+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += $(LIBS_IBVERBS_STATIC)\n+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += $(LIBS_IBVERBS_STATIC)\n else\n _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs -lmlx4\n _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -libverbs -lmlx5\n",
    "prefixes": [
        "2/2"
    ]
}