Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/45759/?format=api
http://patches.dpdk.org/api/patches/45759/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/9c2b6b3d3dd254b276a76f148bf000f2d9f1d746.1538398379.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": "<9c2b6b3d3dd254b276a76f148bf000f2d9f1d746.1538398379.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/9c2b6b3d3dd254b276a76f148bf000f2d9f1d746.1538398379.git.anatoly.burakov@intel.com", "date": "2018-10-01T12:56:16", "name": "[v8,08/21] malloc: add name to malloc heaps", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "5970e006bc08219b6bf5fc834e123673f8fca03a", "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/9c2b6b3d3dd254b276a76f148bf000f2d9f1d746.1538398379.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 1614, "url": "http://patches.dpdk.org/api/series/1614/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1614", "date": "2018-10-01T12:56:13", "name": "Support externally allocated memory in DPDK", "version": 8, "mbox": "http://patches.dpdk.org/series/1614/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/45759/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/45759/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 C0E3F1B145;\n\tMon, 1 Oct 2018 14:56:43 +0200 (CEST)", "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id AD54D1B131\n\tfor <dev@dpdk.org>; Mon, 1 Oct 2018 14:56:36 +0200 (CEST)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Oct 2018 05:56:35 -0700", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga005.fm.intel.com with ESMTP; 01 Oct 2018 05:56:32 -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\tw91CuVXT000602; Mon, 1 Oct 2018 13:56:31 +0100", "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w91CuVcu023862;\n\tMon, 1 Oct 2018 13:56:31 +0100", "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w91CuV5o023858;\n\tMon, 1 Oct 2018 13:56:31 +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,327,1534834800\"; d=\"scan'208\";a=\"267421467\"", "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": "Mon, 1 Oct 2018 13:56:16 +0100", "Message-Id": "<9c2b6b3d3dd254b276a76f148bf000f2d9f1d746.1538398379.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": [ "<cover.1538398379.git.anatoly.burakov@intel.com>", "<cover.1538398379.git.anatoly.burakov@intel.com>" ], "References": [ "<cover.1538398379.git.anatoly.burakov@intel.com>", "<cover.1538384304.git.anatoly.burakov@intel.com>\n\t<cover.1538398379.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [PATCH v8 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 9583f3eda..a6bddaaf4 100644\n--- a/doc/guides/rel_notes/release_18_11.rst\n+++ b/doc/guides/rel_notes/release_18_11.rst\n@@ -156,6 +156,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 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 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": [ "v8", "08/21" ] }{ "id": 45759, "url": "