get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45881,
    "url": "http://patchwork.dpdk.org/api/patches/45881/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/89ca3e478e643d69a2115e008f5bf188a7210f39.1538486972.git.anatoly.burakov@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": "<89ca3e478e643d69a2115e008f5bf188a7210f39.1538486972.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/89ca3e478e643d69a2115e008f5bf188a7210f39.1538486972.git.anatoly.burakov@intel.com",
    "date": "2018-10-02T13:34:46",
    "name": "[v9,08/21] malloc: add name to malloc heaps",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "da95f5c4f0007b7324ac1f9b2a671491383d0efe",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/89ca3e478e643d69a2115e008f5bf188a7210f39.1538486972.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 1643,
            "url": "http://patchwork.dpdk.org/api/series/1643/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=1643",
            "date": "2018-10-02T13:34:42",
            "name": "Support externally allocated memory in DPDK",
            "version": 9,
            "mbox": "http://patchwork.dpdk.org/series/1643/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/45881/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/45881/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 B6225683E;\n\tTue,  2 Oct 2018 15:35:20 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id EB07E5B3A\n\tfor <dev@dpdk.org>; Tue,  2 Oct 2018 15:35:10 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t02 Oct 2018 06:35:09 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga001.jf.intel.com with ESMTP; 02 Oct 2018 06:35:05 -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\tw92DZ4xj009211; Tue, 2 Oct 2018 14:35:04 +0100",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w92DZ4Cq032075;\n\tTue, 2 Oct 2018 14:35:04 +0100",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w92DZ4TV032071;\n\tTue, 2 Oct 2018 14:35:04 +0100"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.54,332,1534834800\"; d=\"scan'208\";a=\"95772881\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "John McNamara <john.mcnamara@intel.com>,\n\tMarko Kovacevic <marko.kovacevic@intel.com>,\n\tlaszlo.madarassy@ericsson.com, laszlo.vadkerti@ericsson.com,\n\tandras.kovacs@ericsson.com, winnie.tian@ericsson.com,\n\tdaniel.andrasi@ericsson.com, janos.kobor@ericsson.com,\n\tgeza.koblo@ericsson.com, srinath.mannam@broadcom.com,\n\tscott.branden@broadcom.com, ajit.khaparde@broadcom.com,\n\tkeith.wiles@intel.com, bruce.richardson@intel.com, thomas@monjalon.net,\n\tshreyansh.jain@nxp.com, shahafs@mellanox.com,\n\tarybchenko@solarflare.com, alejandro.lucero@netronome.com",
        "Date": "Tue,  2 Oct 2018 14:34:46 +0100",
        "Message-Id": "<89ca3e478e643d69a2115e008f5bf188a7210f39.1538486972.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<cover.1538486972.git.anatoly.burakov@intel.com>",
            "<cover.1538486972.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1538486972.git.anatoly.burakov@intel.com>",
            "<cover.1538398379.git.anatoly.burakov@intel.com>\n\t<cover.1538486972.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v9 08/21] 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\nThis breaks the ABI, so document the change.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n doc/guides/rel_notes/release_18_11.rst          |  2 ++\n lib/librte_eal/common/include/rte_malloc_heap.h |  2 ++\n lib/librte_eal/common/malloc_heap.c             | 17 ++++++++++++++++-\n lib/librte_eal/common/rte_malloc.c              |  1 +\n 4 files changed, 21 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst\nindex 172c42f71..754c41755 100644\n--- a/doc/guides/rel_notes/release_18_11.rst\n+++ b/doc/guides/rel_notes/release_18_11.rst\n@@ -176,6 +176,8 @@ ABI Changes\n            ID the malloc heap belongs to\n          - structure ``rte_mem_config`` has had its ``malloc_heaps`` array\n            resized from ``RTE_MAX_NUMA_NODES`` to ``RTE_MAX_HEAPS`` value\n+         - structure ``rte_malloc_heap`` now has a ``heap_name`` member\n+\n \n Removed Items\n -------------\ndiff --git a/lib/librte_eal/common/include/rte_malloc_heap.h b/lib/librte_eal/common/include/rte_malloc_heap.h\nindex d432cef88..4a7e0eb1d 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@@ -28,6 +29,7 @@ struct malloc_heap {\n \tunsigned alloc_count;\n \tunsigned int socket_id;\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 09b06061d..b28905817 100644\n--- a/lib/librte_eal/common/malloc_heap.c\n+++ b/lib/librte_eal/common/malloc_heap.c\n@@ -131,7 +131,6 @@ malloc_add_seg(const struct rte_memseg_list *msl,\n \tmalloc_heap_add_memory(heap, found_msl, ms->addr, len);\n \n \theap->total_size += len;\n-\theap->socket_id = msl->socket_id;\n \n \tRTE_LOG(DEBUG, EAL, \"Added %zuM to heap on socket %i\\n\", len >> 20,\n \t\t\tmsl->socket_id);\n@@ -1024,6 +1023,22 @@ 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+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n+\t\t/* assign names to default DPDK heaps */\n+\t\tfor (i = 0; i < rte_socket_count(); i++) {\n+\t\t\tstruct malloc_heap *heap = &mcfg->malloc_heaps[i];\n+\t\t\tchar heap_name[RTE_HEAP_NAME_MAX_LEN];\n+\t\t\tint socket_id = rte_socket_id_by_idx(i);\n+\n+\t\t\tsnprintf(heap_name, sizeof(heap_name) - 1,\n+\t\t\t\t\t\"socket_%i\", socket_id);\n+\t\t\tstrlcpy(heap->name, heap_name, RTE_HEAP_NAME_MAX_LEN);\n+\t\t\theap->socket_id = socket_id;\n+\t\t}\n+\t}\n+\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 9ba1472c3..72632da56 100644\n--- a/lib/librte_eal/common/rte_malloc.c\n+++ b/lib/librte_eal/common/rte_malloc.c\n@@ -202,6 +202,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": [
        "v9",
        "08/21"
    ]
}