get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 5792,
    "url": "http://patches.dpdk.org/api/patches/5792/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1435242949-31520-2-git-send-email-nhorman@tuxdriver.com/",
    "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": "<1435242949-31520-2-git-send-email-nhorman@tuxdriver.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1435242949-31520-2-git-send-email-nhorman@tuxdriver.com",
    "date": "2015-06-25T14:35:48",
    "name": "[dpdk-dev,PATCHv3,2/3] rte_compat: Add MAP_STATIC_SYMBOL macro",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3877dca02e5b2228a64604c03c6d64c407bf5b91",
    "submitter": {
        "id": 32,
        "url": "http://patches.dpdk.org/api/people/32/?format=api",
        "name": "Neil Horman",
        "email": "nhorman@tuxdriver.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1435242949-31520-2-git-send-email-nhorman@tuxdriver.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/5792/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/5792/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 83DA1C68C;\n\tThu, 25 Jun 2015 16:36:16 +0200 (CEST)",
            "from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58])\n\tby dpdk.org (Postfix) with ESMTP id 8F4C4C604\n\tfor <dev@dpdk.org>; Thu, 25 Jun 2015 16:36:15 +0200 (CEST)",
            "from hmsreliant.think-freely.org\n\t([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost)\n\tby smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63)\n\t(envelope-from <nhorman@tuxdriver.com>)\n\tid 1Z88GB-0001gy-31; Thu, 25 Jun 2015 10:36:14 -0400"
        ],
        "From": "Neil Horman <nhorman@tuxdriver.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 25 Jun 2015 10:35:48 -0400",
        "Message-Id": "<1435242949-31520-2-git-send-email-nhorman@tuxdriver.com>",
        "X-Mailer": "git-send-email 2.1.0",
        "In-Reply-To": "<1435242949-31520-1-git-send-email-nhorman@tuxdriver.com>",
        "References": "<1435088014-18973-1-git-send-email-nhorman@tuxdriver.com>\n\t<1435242949-31520-1-git-send-email-nhorman@tuxdriver.com>",
        "X-Spam-Score": "-2.9 (--)",
        "X-Spam-Status": "No",
        "Subject": "[dpdk-dev] [PATCHv3 2/3] rte_compat: Add MAP_STATIC_SYMBOL macro",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "It was pointed out in my examples that doing shared library symbol versioning by\npartitioning symbols to version specific functions (as opposed to leaving the\nlatest symol version at the base symbol name), neglects to take into account\nstatic builds.  Add a macro to handle that.  If you choose a versioning approach\nthat uniquely names every version of the symbol, then this macro lets you map\nyour symbol choice to the base name when building a static library\n\nAlso, while I'm at it, since we're documenting this in the guide, take the\nabbreviated example out of the header\n\nSigned-off-by: Neil Horman <nhorman@tuxdriver.com>\nCC: thomas.monjalon@6wind.com\n---\n lib/librte_compat/rte_compat.h | 35 ++++++++++++++++++-----------------\n 1 file changed, 18 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h\nindex 75920a1..d7768d5 100644\n--- a/lib/librte_compat/rte_compat.h\n+++ b/lib/librte_compat/rte_compat.h\n@@ -49,22 +49,8 @@\n  * Assumptions: DPDK 2.(X) contains a function int foo(char *string)\n  *              DPDK 2.(X+1) needs to change foo to be int foo(int index)\n  *\n- * To accomplish this:\n- * 1) Edit lib/<library>/library_version.map to add a DPDK_2.(X+1) node, in which\n- * foo is exported as a global symbol.\n- *\n- * 2) rename the existing function int foo(char *string) to\n- *\tint foo_v20(char *string)\n- *\n- * 3) Add this macro immediately below the function\n- *\tVERSION_SYMBOL(foo, _v20, 2.0);\n- *\n- * 4) Implement a new version of foo.\n- *\tchar foo(int value, int otherval) { ...}\n- *\n- * 5) Mark the newest version as the default version\n- *\tBIND_DEFAULT_SYMBOL(foo, _v21, 2.1);\n- *\n+ * Refer to the guidelines document in the docs subdirectory for details on the\n+ * use of these macros\n  */\n \n /*\n@@ -72,6 +58,8 @@\n  * b - function base name\n  * e - function version extension, to be concatenated with base name\n  * n - function symbol version string to be applied\n+ * f - function prototype\n+ * p - full function symbol name\n  */\n \n /*\n@@ -96,6 +84,19 @@\n #define BIND_DEFAULT_SYMBOL(b, e, n) __asm__(\".symver \" RTE_STR(b) RTE_STR(e) \", \" RTE_STR(b) \"@@DPDK_\" RTE_STR(n))\n #define __vsym __attribute__((used))\n \n+/*\n+ * MAP_STATIC_SYMBOL\n+ * If a function has been bifurcated into multiple versions, none of which\n+ * are defined as the exported symbol name in the map file, this macro can be\n+ * used to alias a specific version of the symbol to its exported name.  For\n+ * example, if you have 2 versions of a function foo_v1 and foo_v2, where the\n+ * former is mapped to foo@DPDK_1 and the latter is mapped to foo@DPDK_2 when\n+ * building a shared library, this macro can be used to map either foo_v1 or\n+ * foo_v2 to the symbol foo when building a static library, e.g.:\n+ * MAP_STATIC_SYMBOL(void foo(), foo_v2);\n+ */\n+#define MAP_STATIC_SYMBOL(f, p)\n+\n #else\n /*\n  * No symbol versioning in use\n@@ -104,7 +105,7 @@\n #define __vsym\n #define BASE_SYMBOL(b, n)\n #define BIND_DEFAULT_SYMBOL(b, e, n)\n-\n+#define MAP_STATIC_SYMBOL(f, p) f  __attribute__((alias( RTE_STR(p))))\n /*\n  * RTE_BUILD_SHARED_LIB=n\n  */\n",
    "prefixes": [
        "dpdk-dev",
        "PATCHv3",
        "2/3"
    ]
}