From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 67B96A046B for ; Thu, 27 Jun 2019 00:32:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D3812C19; Thu, 27 Jun 2019 00:32:23 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 81FCB2C12 for ; Thu, 27 Jun 2019 00:32:21 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id y72so37872pgd.8 for ; Wed, 26 Jun 2019 15:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pW6BRiVhhi9H8rLxFutH6r1/sevi4ZkrpN9czPTxpUk=; b=o0+4oDhYrd65BH9Stc6E2eRdAVRLKv+4zz2ZXaiBIqC9/DxuRhb3+FgWbW9XcEV/Ge sM5oOqNmduwT6jvq2svYrOBKr7N8rUaJraXYXtZQdgXZIqApeYXL3FMpNnLOPPvgq7P4 Y+rZo+S4czhkCQfu0/DMetRUdURfElavt9EAdMkak71JZXk5EoCws+9lN7FTNoGXdYJw A664R+iwgHyH8CdipokgGp05j5lZ085NR664AL6HSGQmxbtZnEyKJ9KPm8N5F+fiYb0+ cmN6djjG/9i8t1yfypaob36lABzEl+MHYnLGAZFZImCy8nPcS5VCkhBOlZQy0KUgNN76 yefQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pW6BRiVhhi9H8rLxFutH6r1/sevi4ZkrpN9czPTxpUk=; b=K3N+5D4P/qFdBcUkd+wFw9FXYY2vbDEuDHJo6tjuX0PkKRweuXnA/ukcpnxk6qEarY 8/MER8SxlKx51AMRCKaP/c0UTZQoAaHYOhnWOLgjXHAMYB6PnuN0aPcl2odNgySjkgey jADyp4FYLIYH72f+HEDgCaS3xo8yXeS6oHA1tGZLf1XzZ4/NzG+nHLW4z3V6s0oOe7id d3GbWqdYKsMKS6jRCHaUa7AbzqYzF0CRzgQ+XbOF9gTsSpVZ1SMNRXwjOAKkGR5yegf8 RFxrrsFJ2fljCwBwKK0tpt5UaDKPpSOmX95UZRau+x86QpOj7U22ivWC1DQqdTiCkfqm ANnQ== X-Gm-Message-State: APjAAAUDdsY1wFk3SloM6kP5KsU9m8qkOm5NsIEWiAi24ws+hnud36gh nevU0+X5YaZ4nWRGzSY8twoBgk8I1bc= X-Google-Smtp-Source: APXvYqxYJrM+BKjjuEUdq7+u38fEyQn3jitHvZemM4Faa3MRuvUwrSVENe+QGUddjVr/KqxQkLvYQg== X-Received: by 2002:a63:1141:: with SMTP id 1mr323161pgr.320.1561588340078; Wed, 26 Jun 2019 15:32:20 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id l44sm3038936pje.29.2019.06.26.15.32.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 15:32:19 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 26 Jun 2019 15:32:12 -0700 Message-Id: <20190626223212.25815-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] malloc: deprecate unused set limit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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