get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 60062,
    "url": "http://patchwork.dpdk.org/api/patches/60062/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190927194932.22197-3-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20190927194932.22197-3-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190927194932.22197-3-bruce.richardson@intel.com",
    "date": "2019-09-27T19:49:32",
    "name": "[2/2] build: support building ABI versioned files twice",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4c0032d53f78ba173bdf86b5a73a7eb92ea069ea",
    "submitter": {
        "id": 20,
        "url": "http://patchwork.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20190927194932.22197-3-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 6594,
            "url": "http://patchwork.dpdk.org/api/series/6594/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=6594",
            "date": "2019-09-27T19:49:30",
            "name": "Improve function versioning meson support",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/6594/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/60062/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/60062/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 549151B952;\n\tFri, 27 Sep 2019 21:49:54 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 879763195\n\tfor <dev@dpdk.org>; Fri, 27 Sep 2019 21:49:52 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t27 Sep 2019 12:49:51 -0700",
            "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.223.2])\n\tby fmsmga001.fm.intel.com with ESMTP; 27 Sep 2019 12:49:50 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,556,1559545200\"; d=\"scan'208\";a=\"204244155\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Andrzej Ostruszka <amo@semihalf.com>,\n\tThomas Monjalon <thomas@monjalon.net>, Ray Kinsella <mdr@ashroe.eu>, \n\tNeil Horman <nhorman@tuxdriver.com>,\n\tBruce Richardson <bruce.richardson@intel.com>",
        "Date": "Fri, 27 Sep 2019 20:49:32 +0100",
        "Message-Id": "<20190927194932.22197-3-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190927194932.22197-1-bruce.richardson@intel.com>",
        "References": "<20190927194932.22197-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 2/2] build: support building ABI versioned files\n\ttwice",
        "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": "Any file with ABI versioned functions needs different macros for shared and\nstatic builds, so we need to accomodate that. Rather than building\neverything twice, we just flag to the build system which libraries need\nthat handling, by setting use_function_versioning in the meson.build files.\n\nTo ensure we don't get silent errors at build time due to this meson flag\nbeing missed, we add an explicit error to the function versioning header\nfile if a known C macro is not defined. Since \"make\" builds always only\nbuild one of shared or static libraries, this define can be always set, and\nso is added to the common_base file. For meson, the build flag - and\ntherefore the C define - is set for the three libraries that need the\nfunction versioning: \"distributor\", \"lpm\" and \"timer\".\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n config/common_base                               |  1 +\n config/rte_config.h                              |  3 ---\n doc/guides/contributing/coding_style.rst         |  7 +++++++\n lib/librte_distributor/meson.build               |  1 +\n .../common/include/rte_function_versioning.h     |  4 ++++\n lib/librte_lpm/meson.build                       |  1 +\n lib/librte_timer/meson.build                     |  1 +\n lib/meson.build                                  | 16 +++++++++++++---\n 8 files changed, 28 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/config/common_base b/config/common_base\nindex 8ef75c203..655258a97 100644\n--- a/config/common_base\n+++ b/config/common_base\n@@ -111,6 +111,7 @@ CONFIG_RTE_MAX_VFIO_CONTAINERS=64\n CONFIG_RTE_MALLOC_DEBUG=n\n CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n\n CONFIG_RTE_USE_LIBBSD=n\n+CONFIG_RTE_USE_FUNCTION_VERSIONING=y\n \n #\n # Recognize/ignore the AVX/AVX512 CPU flags for performance/power testing.\ndiff --git a/config/rte_config.h b/config/rte_config.h\nindex 0bbbe274f..b63a2fdea 100644\n--- a/config/rte_config.h\n+++ b/config/rte_config.h\n@@ -31,9 +31,6 @@\n \n /****** library defines ********/\n \n-/* compat defines */\n-#define RTE_BUILD_SHARED_LIB\n-\n /* EAL defines */\n #define RTE_MAX_HEAPS 32\n #define RTE_MAX_MEMSEG_LISTS 128\ndiff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst\nindex 449b33494..e95a1a2be 100644\n--- a/doc/guides/contributing/coding_style.rst\n+++ b/doc/guides/contributing/coding_style.rst\n@@ -948,6 +948,13 @@ reason\n \tbuilt. For missing dependencies this should be of the form\n \t``'missing dependency, \"libname\"'``.\n \n+use_function_versioning\n+\t**Default Value = false**.\n+\tSpecifies if the library in question has ABI versioned functions. If it\n+\thas, this value should be set to ensure that the C files are compiled\n+\ttwice with suitable parameters for each of shared or static library\n+\tbuilds.\n+\n version\n \t**Default Value = 1**.\n \tSpecifies the ABI version of the library, and is used as the major\ndiff --git a/lib/librte_distributor/meson.build b/lib/librte_distributor/meson.build\nindex dba7e3b2a..5149f9bf5 100644\n--- a/lib/librte_distributor/meson.build\n+++ b/lib/librte_distributor/meson.build\n@@ -9,3 +9,4 @@ else\n endif\n headers = files('rte_distributor.h')\n deps += ['mbuf']\n+use_function_versioning = true\ndiff --git a/lib/librte_eal/common/include/rte_function_versioning.h b/lib/librte_eal/common/include/rte_function_versioning.h\nindex ce963d4b1..55e88ffae 100644\n--- a/lib/librte_eal/common/include/rte_function_versioning.h\n+++ b/lib/librte_eal/common/include/rte_function_versioning.h\n@@ -7,6 +7,10 @@\n #define _RTE_FUNCTION_VERSIONING_H_\n #include <rte_common.h>\n \n+#ifndef RTE_USE_FUNCTION_VERSIONING\n+#error Use of function versioning disabled, is \"use_function_versioning=true\" in meson.build?\n+#endif\n+\n #ifdef RTE_BUILD_SHARED_LIB\n \n /*\ndiff --git a/lib/librte_lpm/meson.build b/lib/librte_lpm/meson.build\nindex a5176d8ae..4e3920660 100644\n--- a/lib/librte_lpm/meson.build\n+++ b/lib/librte_lpm/meson.build\n@@ -8,3 +8,4 @@ headers = files('rte_lpm.h', 'rte_lpm6.h')\n # without worrying about which architecture we actually need\n headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h')\n deps += ['hash']\n+use_function_versioning = true\ndiff --git a/lib/librte_timer/meson.build b/lib/librte_timer/meson.build\nindex d3b828ce9..b7edfe2e7 100644\n--- a/lib/librte_timer/meson.build\n+++ b/lib/librte_timer/meson.build\n@@ -4,3 +4,4 @@\n sources = files('rte_timer.c')\n headers = files('rte_timer.h')\n allow_experimental_apis = true\n+use_function_versioning = true\ndiff --git a/lib/meson.build b/lib/meson.build\nindex e5ff83893..1b0ed767c 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -47,6 +47,7 @@ foreach l:libraries\n \tname = l\n \tversion = 1\n \tallow_experimental_apis = false\n+\tuse_function_versioning = false\n \tsources = []\n \theaders = []\n \tincludes = []\n@@ -96,6 +97,9 @@ foreach l:libraries\n \t\t\tif allow_experimental_apis\n \t\t\t\tcflags += '-DALLOW_EXPERIMENTAL_API'\n \t\t\tendif\n+\t\t\tif use_function_versioning\n+\t\t\t\tcflags += '-DRTE_USE_FUNCTION_VERSIONING'\n+\t\t\tendif\n \n \t\t\tif get_option('per_library_versions')\n \t\t\t\tlib_version = '@0@.1'.format(version)\n@@ -117,9 +121,15 @@ foreach l:libraries\n \t\t\t\t\tinclude_directories: includes,\n \t\t\t\t\tdependencies: static_deps)\n \n-\t\t\t# then use pre-build objects to build shared lib\n-\t\t\tsources = []\n-\t\t\tobjs += static_lib.extract_all_objects(recursive: false)\n+\t\t\tif not use_function_versioning\n+\t\t\t\t# use pre-build objects to build shared lib\n+\t\t\t\tsources = []\n+\t\t\t\tobjs += static_lib.extract_all_objects(recursive: false)\n+\t\t\telse\n+\t\t\t\t# for compat we need to rebuild with\n+\t\t\t\t# RTE_BUILD_SHARED_LIB defined\n+\t\t\t\tcflags += '-DRTE_BUILD_SHARED_LIB'\n+\t\t\tendif\n \t\t\tversion_map = '@0@/@1@/rte_@2@_version.map'.format(\n \t\t\t\t\tmeson.current_source_dir(), dir_name, name)\n \t\t\timplib = dir_name + '.dll.a'\n",
    "prefixes": [
        "2/2"
    ]
}