malloc: remove unused function to set limit

Message ID 20220927114625.3053221-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series malloc: remove unused function to set limit |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

David Marchand Sept. 27, 2022, 11:46 a.m. UTC
  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(-)
  

Comments

Thomas Monjalon Oct. 4, 2022, 8:21 a.m. UTC | #1
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.
  

Patch

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;