DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] malloc: deprecate unused set limit
@ 2019-06-26 22:32 Stephen Hemminger
  2019-06-27  8:09 ` Burakov, Anatoly
  2019-07-01 16:37 ` Thomas Monjalon
  0 siblings, 2 replies; 3+ messages in thread
From: Stephen Hemminger @ 2019-06-26 22:32 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

The function rte_malloc_set_limit was defined but never implemented.
Mark it as deprecated for now, and remove in next release.

There is no point in keeping dead code.
"You Aren't Going to Need It"

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test/test_malloc.c                     | 21 ---------------------
 doc/guides/rel_notes/release_19_08.rst     |  3 +++
 lib/librte_eal/common/include/rte_malloc.h |  2 +-
 3 files changed, 4 insertions(+), 22 deletions(-)

diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index f0e608cdaf22..7243e8389472 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -372,18 +372,6 @@ test_multi_alloc_statistics(void)
 	return 0;
 }
 
-static int
-test_rte_malloc_type_limits(void)
-{
-	/* The type-limits functionality is not yet implemented,
-	 * so always return 0 no matter what the retval.
-	 */
-	const char *typename = "limit_test";
-	rte_malloc_set_limit(typename, 64 * 1024);
-	rte_malloc_dump_stats(stdout, typename);
-	return 0;
-}
-
 static int
 test_realloc(void)
 {
@@ -952,15 +940,6 @@ test_malloc(void)
 	}
 	else printf("test_random_alloc_free() passed\n");
 
-	/*----------------------------*/
-	ret = test_rte_malloc_type_limits();
-	if (ret < 0){
-		printf("test_rte_malloc_type_limits() failed\n");
-		return ret;
-	}
-	/* TODO: uncomment following line once type limits are valid */
-	/*else printf("test_rte_malloc_type_limits() passed\n");*/
-
 	/*----------------------------*/
 	ret = test_rte_malloc_validate();
 	if (ret < 0){
diff --git a/doc/guides/rel_notes/release_19_08.rst b/doc/guides/rel_notes/release_19_08.rst
index 3da26670550d..0e79390e16a1 100644
--- a/doc/guides/rel_notes/release_19_08.rst
+++ b/doc/guides/rel_notes/release_19_08.rst
@@ -135,6 +135,9 @@ API Changes
 * The network structures, definitions and functions have
   been prefixed by ``rte_`` to resolve conflicts with libc headers.
 
+* malloc: The function ``rte_malloc_set_limit`` was never implemented
+  is deprecated and will be removed in a future release.
+
 
 ABI Changes
 -----------
diff --git a/lib/librte_eal/common/include/rte_malloc.h b/lib/librte_eal/common/include/rte_malloc.h
index 5ff1a39a2e78..924a08605998 100644
--- a/lib/librte_eal/common/include/rte_malloc.h
+++ b/lib/librte_eal/common/include/rte_malloc.h
@@ -526,7 +526,7 @@ rte_malloc_dump_heaps(FILE *f);
  *   - 0: Success.
  *   - (-1): Error.
  */
-int
+int __rte_deprecated
 rte_malloc_set_limit(const char *type, size_t max);
 
 /**
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] malloc: deprecate unused set limit
  2019-06-26 22:32 [dpdk-dev] [PATCH] malloc: deprecate unused set limit Stephen Hemminger
@ 2019-06-27  8:09 ` Burakov, Anatoly
  2019-07-01 16:37 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Burakov, Anatoly @ 2019-06-27  8:09 UTC (permalink / raw)
  To: Stephen Hemminger, dev

On 26-Jun-19 11:32 PM, Stephen Hemminger wrote:
> The function rte_malloc_set_limit was defined but never implemented.
> Mark it as deprecated for now, and remove in next release.
> 
> There is no point in keeping dead code.
> "You Aren't Going to Need It"
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] malloc: deprecate unused set limit
  2019-06-26 22:32 [dpdk-dev] [PATCH] malloc: deprecate unused set limit Stephen Hemminger
  2019-06-27  8:09 ` Burakov, Anatoly
@ 2019-07-01 16:37 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2019-07-01 16:37 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, anatoly.burakov

27/06/2019 00:32, Stephen Hemminger:
> The function rte_malloc_set_limit was defined but never implemented.
> Mark it as deprecated for now, and remove in next release.
> 
> There is no point in keeping dead code.
> "You Aren't Going to Need It"
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> -int
> +int __rte_deprecated
>  rte_malloc_set_limit(const char *type, size_t max);

Tag moved in a separate line before the return type.

Applied, thanks



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-01 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 22:32 [dpdk-dev] [PATCH] malloc: deprecate unused set limit Stephen Hemminger
2019-06-27  8:09 ` Burakov, Anatoly
2019-07-01 16:37 ` 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).