get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45030,
    "url": "http://patches.dpdk.org/api/patches/45030/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/f6927ea5ef254a56efadb6cc9e3179c937773f2c.1537443103.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": "<f6927ea5ef254a56efadb6cc9e3179c937773f2c.1537443103.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/f6927ea5ef254a56efadb6cc9e3179c937773f2c.1537443103.git.anatoly.burakov@intel.com",
    "date": "2018-09-20T11:36:21",
    "name": "[v3,08/20] malloc: add name to malloc heaps",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c6d83fbdf3dc0c8c62256b8a11fb197371771b92",
    "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/f6927ea5ef254a56efadb6cc9e3179c937773f2c.1537443103.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 1415,
            "url": "http://patches.dpdk.org/api/series/1415/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1415",
            "date": "2018-09-20T11:36:13",
            "name": "Support externally allocated memory in DPDK",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/1415/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/45030/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45030/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 637F81B153;\n\tThu, 20 Sep 2018 13:38:28 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id 6BF4F7CD2\n\tfor <dev@dpdk.org>; Thu, 20 Sep 2018 13:38:22 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t20 Sep 2018 04:38:20 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga005.jf.intel.com with ESMTP; 20 Sep 2018 04:36:40 -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\tw8KBada5022819; Thu, 20 Sep 2018 12:36:39 +0100",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w8KBadwI011480;\n\tThu, 20 Sep 2018 12:36:39 +0100",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w8KBadip011476;\n\tThu, 20 Sep 2018 12:36:39 +0100"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,398,1531810800\"; d=\"scan'208\";a=\"258849960\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "laszlo.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, arybchenko@solarflare.com",
        "Date": "Thu, 20 Sep 2018 12:36:21 +0100",
        "Message-Id": "<f6927ea5ef254a56efadb6cc9e3179c937773f2c.1537443103.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<cover.1537443103.git.anatoly.burakov@intel.com>",
            "<cover.1537443103.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1537443103.git.anatoly.burakov@intel.com>",
            "<cover.1537363686.git.anatoly.burakov@intel.com>\n\t<cover.1537443103.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v3 08/20] 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             | 15 ++++++++++++++-\n lib/librte_eal/common/rte_malloc.c              |  1 +\n 3 files changed, 17 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_malloc_heap.h b/lib/librte_eal/common/include/rte_malloc_heap.h\nindex e7ac32d42..1c08ef3e0 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 \tsize_t total_size;\n \tunsigned int socket_id;\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 73e478076..2a5d2a381 100644\n--- a/lib/librte_eal/common/malloc_heap.c\n+++ b/lib/librte_eal/common/malloc_heap.c\n@@ -127,7 +127,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@@ -1020,6 +1019,20 @@ 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\theap->socket_id = socket_id;\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 458c44ba6..0515d47f3 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": [
        "v3",
        "08/20"
    ]
}