get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 42506,
    "url": "http://patches.dpdk.org/api/patches/42506/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/e0cd03264d6aef49731e9c38ae613d3a96e55364.1530881548.git.anatoly.burakov@intel.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": "<e0cd03264d6aef49731e9c38ae613d3a96e55364.1530881548.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/e0cd03264d6aef49731e9c38ae613d3a96e55364.1530881548.git.anatoly.burakov@intel.com",
    "date": "2018-07-06T13:17:25",
    "name": "[RFC,04/11] malloc: add name to malloc heaps",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ef0fb2dce149a4bd5477ababf502af47f20725d3",
    "submitter": {
        "id": 4,
        "url": "http://patches.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.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/e0cd03264d6aef49731e9c38ae613d3a96e55364.1530881548.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 453,
            "url": "http://patches.dpdk.org/api/series/453/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=453",
            "date": "2018-07-06T13:17:21",
            "name": "Support externally allocated memory in DPDK",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/453/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/42506/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/42506/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 D086A1BF1B;\n\tFri,  6 Jul 2018 15:17:51 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 3AF5D1BE41\n\tfor <dev@dpdk.org>; Fri,  6 Jul 2018 15:17:39 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t06 Jul 2018 06:17:38 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby FMSMGA003.fm.intel.com with ESMTP; 06 Jul 2018 06:17:34 -0700",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tw66DHXS5027478; Fri, 6 Jul 2018 14:17:33 +0100",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w66DHXea003768;\n\tFri, 6 Jul 2018 14:17:33 +0100",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w66DHXJx003764;\n\tFri, 6 Jul 2018 14:17:33 +0100"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,316,1526367600\"; d=\"scan'208\";a=\"62751146\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "srinath.mannam@broadcom.com, scott.branden@broadcom.com,\n\tajit.khaparde@broadcom.com",
        "Date": "Fri,  6 Jul 2018 14:17:25 +0100",
        "Message-Id": "<e0cd03264d6aef49731e9c38ae613d3a96e55364.1530881548.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<cover.1530881548.git.anatoly.burakov@intel.com>",
            "<cover.1530881548.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1530881548.git.anatoly.burakov@intel.com>",
            "<cover.1530881548.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [RFC 04/11] malloc: add name to malloc heaps",
        "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": "We will need to refer to external heaps in some way. While we use\nheap ID's internally, for external API use it has to be something\nmore user-friendly. So, we will be using a string to uniquely\nidentify a heap.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/include/rte_malloc_heap.h |  2 ++\n lib/librte_eal/common/malloc_heap.c             | 13 +++++++++++++\n lib/librte_eal/common/rte_malloc.c              |  1 +\n 3 files changed, 16 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_malloc_heap.h b/lib/librte_eal/common/include/rte_malloc_heap.h\nindex d43fa9097..bd64dff03 100644\n--- a/lib/librte_eal/common/include/rte_malloc_heap.h\n+++ b/lib/librte_eal/common/include/rte_malloc_heap.h\n@@ -12,6 +12,7 @@\n \n /* Number of free lists per heap, grouped by size. */\n #define RTE_HEAP_NUM_FREELISTS  13\n+#define RTE_HEAP_NAME_MAX_LEN 32\n \n /* dummy definition, for pointers */\n struct malloc_elem;\n@@ -27,6 +28,7 @@ struct malloc_heap {\n \n \tunsigned alloc_count;\n \tsize_t total_size;\n+\tchar name[RTE_HEAP_NAME_MAX_LEN];\n } __rte_cache_aligned;\n \n #endif /* _RTE_MALLOC_HEAP_H_ */\ndiff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c\nindex e7e1838b1..8f22c062b 100644\n--- a/lib/librte_eal/common/malloc_heap.c\n+++ b/lib/librte_eal/common/malloc_heap.c\n@@ -848,6 +848,7 @@ malloc_heap_dump(struct malloc_heap *heap, FILE *f)\n \n \trte_spinlock_lock(&heap->lock);\n \n+\tfprintf(f, \"Heap name: %s\\n\", heap->name);\n \tfprintf(f, \"Heap size: 0x%zx\\n\", heap->total_size);\n \tfprintf(f, \"Heap alloc count: %u\\n\", heap->alloc_count);\n \n@@ -864,6 +865,18 @@ int\n rte_eal_malloc_heap_init(void)\n {\n \tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n+\tunsigned int i;\n+\n+\t/* assign names to default DPDK heaps */\n+\tfor (i = 0; i < rte_socket_count(); i++) {\n+\t\tstruct malloc_heap *heap = &mcfg->malloc_heaps[i];\n+\t\tchar heap_name[RTE_HEAP_NAME_MAX_LEN];\n+\t\tint socket_id = rte_socket_id_by_idx(i);\n+\n+\t\tsnprintf(heap_name, sizeof(heap_name) - 1,\n+\t\t\t\t\"socket_%i\", socket_id);\n+\t\tstrlcpy(heap->name, heap_name, RTE_HEAP_NAME_MAX_LEN);\n+\t}\n \n \tif (register_mp_requests()) {\n \t\tRTE_LOG(ERR, EAL, \"Couldn't register malloc multiprocess actions\\n\");\ndiff --git a/lib/librte_eal/common/rte_malloc.c b/lib/librte_eal/common/rte_malloc.c\nindex 4387bc494..75d6e0b4d 100644\n--- a/lib/librte_eal/common/rte_malloc.c\n+++ b/lib/librte_eal/common/rte_malloc.c\n@@ -198,6 +198,7 @@ rte_malloc_dump_stats(FILE *f, __rte_unused const char *type)\n \t\tmalloc_heap_get_stats(heap, &sock_stats);\n \n \t\tfprintf(f, \"Heap id:%u\\n\", heap_id);\n+\t\tfprintf(f, \"\\tHeap name:%s\\n\", heap->name);\n \t\tfprintf(f, \"\\tHeap_size:%zu,\\n\", sock_stats.heap_totalsz_bytes);\n \t\tfprintf(f, \"\\tFree_size:%zu,\\n\", sock_stats.heap_freesz_bytes);\n \t\tfprintf(f, \"\\tAlloc_size:%zu,\\n\", sock_stats.heap_allocsz_bytes);\n",
    "prefixes": [
        "RFC",
        "04/11"
    ]
}