From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [RFC 1/4] rte_malloc: document that type is unused
Date: Thu, 25 Apr 2024 11:23:58 -0700 [thread overview]
Message-ID: <20240425182738.4771-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20240425182738.4771-1-stephen@networkplumber.org>
The string type is left over from first version of DPDK and
was never implemented.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/eal/include/rte_malloc.h | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/lib/eal/include/rte_malloc.h b/lib/eal/include/rte_malloc.h
index 54a8ac211e..91c9214c57 100644
--- a/lib/eal/include/rte_malloc.h
+++ b/lib/eal/include/rte_malloc.h
@@ -37,8 +37,7 @@ struct rte_malloc_socket_stats {
* NUMA socket as the core that calls this function.
*
* @param type
- * A string identifying the type of allocated objects (useful for debug
- * purposes, such as identifying the cause of a memory leak). Can be NULL.
+ * Legacy argument, never unused should be NULL.
* @param size
* Size (in bytes) to be allocated.
* @param align
@@ -64,8 +63,7 @@ rte_malloc(const char *type, size_t size, unsigned align)
* same NUMA socket as the core that calls this function.
*
* @param type
- * A string identifying the type of allocated objects (useful for debug
- * purposes, such as identifying the cause of a memory leak). Can be NULL.
+ * Legacy argument, never unused should be NULL.
* @param size
* Size (in bytes) to be allocated.
* @param align
@@ -89,8 +87,7 @@ rte_zmalloc(const char *type, size_t size, unsigned align)
* same NUMA socket as the core that calls this function.
*
* @param type
- * A string identifying the type of allocated objects (useful for debug
- * purposes, such as identifying the cause of a memory leak). Can be NULL.
+ * Legacy argument, never unused should be NULL.
* @param num
* Number of elements to be allocated.
* @param size
@@ -165,8 +162,7 @@ rte_realloc_socket(void *ptr, size_t size, unsigned int align, int socket)
* is not cleared.
*
* @param type
- * A string identifying the type of allocated objects (useful for debug
- * purposes, such as identifying the cause of a memory leak). Can be NULL.
+ * Legacy argument, never unused should be NULL.
* @param size
* Size (in bytes) to be allocated.
* @param align
@@ -194,8 +190,7 @@ rte_malloc_socket(const char *type, size_t size, unsigned align, int socket)
* initialised with zeros.
*
* @param type
- * A string identifying the type of allocated objects (useful for debug
- * purposes, such as identifying the cause of a memory leak). Can be NULL.
+ * Legacy argument, never unused should be NULL.
* @param size
* Size (in bytes) to be allocated.
* @param align
@@ -221,8 +216,7 @@ rte_zmalloc_socket(const char *type, size_t size, unsigned align, int socket)
* initialised with zeros.
*
* @param type
- * A string identifying the type of allocated objects (useful for debug
- * purposes, such as identifying the cause of a memory leak). Can be NULL.
+ * Legacy argument, never unused should be NULL.
* @param num
* Number of elements to be allocated.
* @param size
@@ -502,8 +496,7 @@ rte_malloc_heap_socket_is_external(int socket_id);
* @param f
* A pointer to a file for output
* @param type
- * A string identifying the type of objects to dump, or NULL
- * to dump all objects.
+ * Legacy argument, never unused should be NULL.
*/
void
rte_malloc_dump_stats(FILE *f, const char *type);
--
2.43.0
next prev parent reply other threads:[~2024-04-25 18:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 18:23 [RFC 0/4] malloc type argument cleanup (part 1) Stephen Hemminger
2024-04-25 18:23 ` Stephen Hemminger [this message]
2024-04-25 18:31 ` [RFC 1/4] rte_malloc: document that type is unused Tyler Retzlaff
2024-04-25 18:42 ` Stephen Hemminger
2024-04-25 18:23 ` [RFC 2/4] devtools/cocci: add script to find unnecessary malloc type Stephen Hemminger
2024-04-25 18:24 ` [RFC 3/4] devtools/cocci: add script to find where rte_calloc should be used Stephen Hemminger
2024-04-25 18:24 ` [RFC 4/4] eal/malloc: remove type argument from internal malloc routines Stephen Hemminger
2024-04-26 16:16 ` Tyler Retzlaff
2024-04-26 22:52 ` Stephen Hemminger
2024-04-26 23:06 ` Tyler Retzlaff
2024-05-07 7:04 ` Morten Brørup
2024-04-26 21:32 ` [RFC 0/4] malloc type argument cleanup (part 1) Patrick Robb
2024-06-15 16:00 ` [PATCH v2 0/3] malloc related cleanups Stephen Hemminger
2024-06-15 16:00 ` [PATCH v2 1/3] rte_malloc: document that type is for tracing Stephen Hemminger
2024-06-15 16:00 ` [PATCH v2 2/3] eal: remove type argument from internal routines Stephen Hemminger
2024-06-15 16:00 ` [PATCH v2 3/3] event/sw: avoid snprintf truncation Stephen Hemminger
2024-06-15 21:40 ` [PATCH v2 0/3] malloc related cleanups Morten Brørup
2024-06-17 17:48 ` Patrick Robb
2024-06-18 14:44 ` [PATCH v3 0/2] malloc type cleanups Stephen Hemminger
2024-06-18 14:44 ` [PATCH v3 1/2] rte_malloc: document that type is for tracing Stephen Hemminger
2024-06-18 14:44 ` [PATCH v3 2/2] eal: remove type argument from internal routines Stephen Hemminger
2024-07-05 14:09 ` [PATCH v3 0/2] malloc type cleanups David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240425182738.4771-2-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).