get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 12127,
    "url": "http://patches.dpdk.org/api/patches/12127/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1461152657-19969-6-git-send-email-david.marchand@6wind.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": "<1461152657-19969-6-git-send-email-david.marchand@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1461152657-19969-6-git-send-email-david.marchand@6wind.com",
    "date": "2016-04-20T11:44:05",
    "name": "[dpdk-dev,v2,05/17] eal: introduce init macros",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3d046b6ac233ab9528e929d0f7ebefcc0db433ca",
    "submitter": {
        "id": 3,
        "url": "http://patches.dpdk.org/api/people/3/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@6wind.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1461152657-19969-6-git-send-email-david.marchand@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/12127/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/12127/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 C5271559C;\n\tWed, 20 Apr 2016 13:44:32 +0200 (CEST)",
            "from mail-wm0-f46.google.com (mail-wm0-f46.google.com\n\t[74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 4967947CD\n\tfor <dev@dpdk.org>; Wed, 20 Apr 2016 13:44:28 +0200 (CEST)",
            "by mail-wm0-f46.google.com with SMTP id 127so10945155wmz.0\n\tfor <dev@dpdk.org>; Wed, 20 Apr 2016 04:44:28 -0700 (PDT)",
            "from gloops.dev.6wind.com (144.77.126.78.rev.sfr.net.\n\t[78.126.77.144]) by smtp.gmail.com with ESMTPSA id\n\tm6sm5195708wje.21.2016.04.20.04.44.27\n\t(version=TLSv1/SSLv3 cipher=OTHER);\n\tWed, 20 Apr 2016 04:44:27 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=LbAh0JOmaWNwsrF0g+n5CxBwe3+rMXWG9t2+k7emmjE=;\n\tb=08xKL7L7Hf9Z7SMopVPix2ajw50IQAOrkjoEQ4p++NMT+jUpJoEOFFeJOc5ZKbdD/h\n\tOvZ6A3M9mv3F2Q1c9SMix50BJCc2UmPq68f6wnZ7T7HaYVJyYp6CxkjaY2kP1lbNVgxg\n\toCEfK9mJAsFlrArs1+HDOWTXpBLQu9nR5Dwg+rRxXBc1g/FG75SkU/+hZNlRcC5k0TWp\n\t26tujiq3MHvO3aEQvRBoyIzondN5U/bSO+ibmFxwqCHCpDAXAN7d3aerAJWkGyI0l1xe\n\tbt/YHqFxSmH4HLgMdgbYJfF6PSMnvJ2rdFgWMWN9aWn/aoFdn/8jEEMHoKWxUEyi5nAn\n\tQl9w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=LbAh0JOmaWNwsrF0g+n5CxBwe3+rMXWG9t2+k7emmjE=;\n\tb=MyLsYbDGi4MXCE0U53A8sLOUl5tsdL3LfDydjUiQo++LNvKyGFW005wIokc+cxLroK\n\teTcoc2TlyZIXFTIH9MDOueNuSspGE7fhW5aS+VCpRYqq9SLr0d8Qoq2FPy1TPlyWL0kA\n\txi3+PAiTrbBKoO29iVdETplG/xcfZFGgEvDEJU1t9DST2581zqZK5LctGWmjWYW9huvD\n\tMBW7zajY0MYHbyP6AZ7tun610G5KsLT9AJ6wv9tzM4WldnvaQWGdGTSQfSCpapn8u7Vh\n\txHbbMqPi7ZehXONvvXjPUwh7KWvCYa2WNrNLunVLm4V7dFn9wze86qpNofJTLB6qZRxL\n\tq5Sg==",
        "X-Gm-Message-State": "AOPr4FUdRP8piC5/mQLUzV5kE6P6XfBOaYjXpmlGxDXr5OkrIvKJQnDhFaD/RJfYuP667jxh",
        "X-Received": "by 10.194.87.103 with SMTP id w7mr8301529wjz.13.1461152668127;\n\tWed, 20 Apr 2016 04:44:28 -0700 (PDT)",
        "From": "David Marchand <david.marchand@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas.monjalon@6wind.com,\n\tviktorin@rehivetech.com",
        "Date": "Wed, 20 Apr 2016 13:44:05 +0200",
        "Message-Id": "<1461152657-19969-6-git-send-email-david.marchand@6wind.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1461152657-19969-1-git-send-email-david.marchand@6wind.com>",
        "References": "<1454076516-21591-1-git-send-email-david.marchand@6wind.com>\n\t<1461152657-19969-1-git-send-email-david.marchand@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v2 05/17] eal: introduce init macros",
        "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": "Introduce a RTE_INIT macro used to mark an init function as a constructor.\nCurrent eal macros have been converted to use this (no functional impact).\nRTE_EAL_PCI_REGISTER is added as a helper for pci drivers.\n\nSuggested-by: Jan Viktorin <viktorin@rehivetech.com>\nSigned-off-by: David Marchand <david.marchand@6wind.com>\n---\n lib/librte_eal/common/include/rte_dev.h   | 4 ++--\n lib/librte_eal/common/include/rte_eal.h   | 3 +++\n lib/librte_eal/common/include/rte_pci.h   | 7 +++++++\n lib/librte_eal/common/include/rte_tailq.h | 4 ++--\n 4 files changed, 14 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h\nindex f1b5507..85e48f2 100644\n--- a/lib/librte_eal/common/include/rte_dev.h\n+++ b/lib/librte_eal/common/include/rte_dev.h\n@@ -179,8 +179,8 @@ int rte_eal_vdev_init(const char *name, const char *args);\n int rte_eal_vdev_uninit(const char *name);\n \n #define PMD_REGISTER_DRIVER(d)\\\n-void devinitfn_ ##d(void);\\\n-void __attribute__((constructor, used)) devinitfn_ ##d(void)\\\n+RTE_INIT(devinitfn_ ##d);\\\n+static void devinitfn_ ##d(void)\\\n {\\\n \trte_eal_driver_register(&d);\\\n }\ndiff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h\nindex a71d6f5..186f3c6 100644\n--- a/lib/librte_eal/common/include/rte_eal.h\n+++ b/lib/librte_eal/common/include/rte_eal.h\n@@ -252,6 +252,9 @@ static inline int rte_gettid(void)\n \treturn RTE_PER_LCORE(_thread_id);\n }\n \n+#define RTE_INIT(func) \\\n+static void __attribute__((constructor, used)) func(void)\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h\nindex e692094..f99b33a 100644\n--- a/lib/librte_eal/common/include/rte_pci.h\n+++ b/lib/librte_eal/common/include/rte_pci.h\n@@ -471,6 +471,13 @@ void rte_eal_pci_dump(FILE *f);\n  */\n void rte_eal_pci_register(struct rte_pci_driver *driver);\n \n+#define RTE_EAL_PCI_REGISTER(name, d) \\\n+RTE_INIT(pciinitfn_ ##name); \\\n+static void pciinitfn_ ##name(void) \\\n+{ \\\n+\trte_eal_pci_register(&d); \\\n+}\n+\n /**\n  * Unregister a PCI driver.\n  *\ndiff --git a/lib/librte_eal/common/include/rte_tailq.h b/lib/librte_eal/common/include/rte_tailq.h\nindex 4a686e6..71ed3bb 100644\n--- a/lib/librte_eal/common/include/rte_tailq.h\n+++ b/lib/librte_eal/common/include/rte_tailq.h\n@@ -148,8 +148,8 @@ struct rte_tailq_head *rte_eal_tailq_lookup(const char *name);\n int rte_eal_tailq_register(struct rte_tailq_elem *t);\n \n #define EAL_REGISTER_TAILQ(t) \\\n-void tailqinitfn_ ##t(void); \\\n-void __attribute__((constructor, used)) tailqinitfn_ ##t(void) \\\n+RTE_INIT(tailqinitfn_ ##t); \\\n+static void tailqinitfn_ ##t(void) \\\n { \\\n \tif (rte_eal_tailq_register(&t) < 0) \\\n \t\trte_panic(\"Cannot initialize tailq: %s\\n\", t.name); \\\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "05/17"
    ]
}