get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 17000,
    "url": "https://patches.dpdk.org/api/patches/17000/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20161110232540.GA18054@labs.hpe.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20161110232540.GA18054@labs.hpe.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20161110232540.GA18054@labs.hpe.com",
    "date": "2016-11-10T23:25:40",
    "name": "[dpdk-dev,v3] mempool: Add sanity check when secondary link-in less mempools than primary",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "bf66011d236dafba115a10dca9416b1843bef4cb",
    "submitter": {
        "id": 570,
        "url": "https://patches.dpdk.org/api/people/570/?format=api",
        "name": "Jean Tourrilhes",
        "email": "jt@labs.hpe.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20161110232540.GA18054@labs.hpe.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/17000/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/17000/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 0D81FD4FE;\n\tFri, 11 Nov 2016 00:25:50 +0100 (CET)",
            "from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26])\n\tby dpdk.org (Postfix) with ESMTP id 3BA7AD4FC\n\tfor <dev@dpdk.org>; Fri, 11 Nov 2016 00:25:45 +0100 (CET)",
            "from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net\n\t[16.196.225.135])\n\tby g2t2353.austin.hpe.com (Postfix) with ESMTP id 3655B49;\n\tThu, 10 Nov 2016 23:25:44 +0000 (UTC)",
            "from postal.labs.hpecorp.net (postal.labs.hpe.com [16.111.35.25])\n\tby g2t2360.austin.hpecorp.net (Postfix) with ESMTP id DA7A039;\n\tThu, 10 Nov 2016 23:25:43 +0000 (UTC)",
            "from bougret.labs.hpecorp.net (bougret.labs.hpecorp.net\n\t[16.111.8.16])\n\tby postal.labs.hpecorp.net (8.14.4/8.14.4/HPL-PA Hub) with ESMTP id\n\tuAANPek2002005\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128\n\tverify=NOT); Thu, 10 Nov 2016 15:25:42 -0800",
            "from jt by bougret.labs.hpecorp.net with local (Exim 4.84_2)\n\t(envelope-from <jt@labs.hpe.com>)\n\tid 1c4yiy-00058R-R3; Thu, 10 Nov 2016 15:25:40 -0800"
        ],
        "Date": "Thu, 10 Nov 2016 15:25:40 -0800",
        "From": "Jean Tourrilhes <jt@labs.hpe.com>",
        "To": "dev@dpdk.org, Thomas Monjalon <thomas.monjalon@6wind.com>,\n\tDavid Marchand <david.marchand@6wind.com>,\n\tSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>",
        "Message-ID": "<20161110232540.GA18054@labs.hpe.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "Organisation": "HP Labs Palo Alto",
        "Address": "HP Labs, MS1184, 1501 Page Mill road, Palo Alto, CA 94304, USA.",
        "E-mail": "jean.tourrilhes@hpe.com",
        "User-Agent": "Mutt/1.5.23 (2014-03-12)",
        "Subject": "[dpdk-dev] [PATCH v3] mempool: Add sanity check when secondary\n\tlink-in less mempools than primary",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "Reply-To": "jean.tourrilhes@hpe.com",
        "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": "If the mempool ops the caller wants to use is not registered, the\nlibrary will segfault in an obscure way when trying to use that\nmempool. It's better to catch it early and warn the user.\n\nIf the primary and secondary process were build using different build\nsystems, the list of constructors included by the linker in each\nbinary might be different. Mempools are registered via constructors, so\nthe linker magic will directly impact which mempools are registered with\nthe primary and the secondary.\nDPDK currently assumes that the secondary has a superset of the\nmempools registered at the primary, and they are in the same order\n(same index in primary and secondary). In some build scenario, the\nsecondary might not initialise any mempools at all.\n\nThis would also catch cases where there is a bug in the mempool\nregistration, or some memory corruptions, but this has not been\nobserved.\n\nSigned-off-by: Jean Tourrilhes <jt@labs.hpe.com>\n---\n lib/librte_mempool/rte_mempool.c | 23 +++++++++++++++++++++++\n 1 file changed, 23 insertions(+)",
    "diff": "diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c\nindex e94e56f..bbb6723 100644\n--- a/lib/librte_mempool/rte_mempool.c\n+++ b/lib/librte_mempool/rte_mempool.c\n@@ -1273,6 +1273,29 @@ rte_mempool_lookup(const char *name)\n \t\treturn NULL;\n \t}\n \n+\t/* Sanity check : secondary may have initialised less mempools\n+\t * than primary due to linker and constructor magic. Or maybe\n+\t * there is a mempool corruption or bug. In any case, we can't\n+\t * go on, we will segfault in an obscure way.\n+\t * This does not detect the cases where the constructor order\n+\t * is different between primary and secondary or where the\n+\t * index points to the wrong ops. This would require more\n+\t * extensive changes, and is much less likely. Jean II */\n+\tif (mp->ops_index >= (int32_t) rte_mempool_ops_table.num_ops) {\n+\t\tunsigned i;\n+\t\t/* Dump list of mempool ops for further investigation.\n+\t\t * In most cases, list is empty... */\n+\t\tfor (i = 0; i < rte_mempool_ops_table.num_ops; i++) {\n+\t\t\tRTE_LOG(ERR, EAL, \"Registered mempool[%d] is %s\\n\",\n+\t\t\t\ti, rte_mempool_ops_table.ops[i].name);\n+\t\t}\n+\t\t/* Do not dump mempool list itself, it will segfault. */\n+\t\trte_panic(\"Cannot find ops for mempool, ops_index %d, \"\n+\t\t\t  \"num_ops %d - maybe due to build process or \"\n+\t\t\t  \"linker configuration\\n\",\n+\t\t\t  mp->ops_index, rte_mempool_ops_table.num_ops);\n+\t}\n+\n \treturn mp;\n }\n \n",
    "prefixes": [
        "dpdk-dev",
        "v3"
    ]
}