* [PATCH] malloc: remove unused function to set limit
@ 2022-09-27 11:46 David Marchand
2022-10-04 8:21 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: David Marchand @ 2022-09-27 11:46 UTC (permalink / raw)
To: dev; +Cc: stephen, Anatoly Burakov, Ray Kinsella
This function was never implemented and has been deprecated for a long
time. We can remove it.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
doc/guides/rel_notes/release_22_11.rst | 2 ++
lib/eal/common/rte_malloc.c | 10 ----------
lib/eal/include/rte_malloc.h | 17 -----------------
lib/eal/version.map | 1 -
4 files changed, 2 insertions(+), 28 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 7f61cdf56a..2c042e1eec 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -112,6 +112,8 @@ API Changes
in the future. Applications can use ``devtools/cocci/func_or_ret.cocci``
to update their code.
+* mem: Removed not implemented and deprecated ``rte_malloc_set_limit``.
+
* mempool: Deprecated helper macro ``MEMPOOL_HEADER_SIZE()`` is removed.
The replacement macro ``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
diff --git a/lib/eal/common/rte_malloc.c b/lib/eal/common/rte_malloc.c
index 7c67d2156f..48db264449 100644
--- a/lib/eal/common/rte_malloc.c
+++ b/lib/eal/common/rte_malloc.c
@@ -352,16 +352,6 @@ rte_malloc_dump_stats(FILE *f, __rte_unused const char *type)
return;
}
-/*
- * TODO: Set limit to memory that can be allocated to memory type
- */
-int
-rte_malloc_set_limit(__rte_unused const char *type,
- __rte_unused size_t max)
-{
- return 0;
-}
-
/*
* Return the IO address of a virtual address obtained through rte_malloc
*/
diff --git a/lib/eal/include/rte_malloc.h b/lib/eal/include/rte_malloc.h
index 3892519fab..748dfa8697 100644
--- a/lib/eal/include/rte_malloc.h
+++ b/lib/eal/include/rte_malloc.h
@@ -521,23 +521,6 @@ rte_malloc_dump_stats(FILE *f, const char *type);
void
rte_malloc_dump_heaps(FILE *f);
-/**
- * Set the maximum amount of allocated memory for this type.
- *
- * This is not yet implemented
- *
- * @param type
- * A string identifying the type of allocated objects.
- * @param max
- * The maximum amount of allocated bytes for this type.
- * @return
- * - 0: Success.
- * - (-1): Error.
- */
-__rte_deprecated
-int
-rte_malloc_set_limit(const char *type, size_t max);
-
/**
* Return the IO address of a virtual address obtained through
* rte_malloc
diff --git a/lib/eal/version.map b/lib/eal/version.map
index f7d185155c..e617ba773c 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -165,7 +165,6 @@ DPDK_23 {
rte_malloc_heap_memory_detach;
rte_malloc_heap_memory_remove;
rte_malloc_heap_socket_is_external;
- rte_malloc_set_limit;
rte_malloc_socket;
rte_malloc_validate;
rte_malloc_virt2iova;
--
2.37.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] malloc: remove unused function to set limit
2022-09-27 11:46 [PATCH] malloc: remove unused function to set limit David Marchand
@ 2022-10-04 8:21 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2022-10-04 8:21 UTC (permalink / raw)
To: David Marchand; +Cc: dev, stephen, Anatoly Burakov, Ray Kinsella
27/09/2022 13:46, David Marchand:
> This function was never implemented and has been deprecated for a long
> time. We can remove it.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-04 8:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 11:46 [PATCH] malloc: remove unused function to set limit David Marchand
2022-10-04 8:21 ` Thomas Monjalon
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).