DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: stephen@networkplumber.org,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	Ray Kinsella <mdr@ashroe.eu>
Subject: [PATCH] malloc: remove unused function to set limit
Date: Tue, 27 Sep 2022 13:46:25 +0200	[thread overview]
Message-ID: <20220927114625.3053221-1-david.marchand@redhat.com> (raw)

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


             reply	other threads:[~2022-09-27 11:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 11:46 David Marchand [this message]
2022-10-04  8:21 ` Thomas Monjalon

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=20220927114625.3053221-1-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=mdr@ashroe.eu \
    --cc=stephen@networkplumber.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).