From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C1968A00C2; Tue, 27 Sep 2022 13:46:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 61B9041133; Tue, 27 Sep 2022 13:46:56 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id D2F1F40694 for ; Tue, 27 Sep 2022 13:46:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664279214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mGRc1tukQLeX/UN6693mpBXrirhPzIgznfUVuqzIYgM=; b=A+Lu41dYedR1qtFHSkkfAZH4gSprXTCytM7CNRQu6K9AZiM15lN2NJhcsWtFErfS9WRCjs 8ehm5dtABtICcENC5wXmgRA7GRyHkDULk+jCAta5+9yeOmmYWQ+4Aqn9zweYn1gO//r06H 42d9UVWUTfvk1xtTsQk76eqDzPnO6SA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-185-ow1MFmUTPhmgQ5ZvY6iHkg-1; Tue, 27 Sep 2022 07:46:43 -0400 X-MC-Unique: ow1MFmUTPhmgQ5ZvY6iHkg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 554FC862FDC; Tue, 27 Sep 2022 11:46:43 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DE4B4EA52; Tue, 27 Sep 2022 11:46:40 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: stephen@networkplumber.org, Anatoly Burakov , Ray Kinsella Subject: [PATCH] malloc: remove unused function to set limit Date: Tue, 27 Sep 2022 13:46:25 +0200 Message-Id: <20220927114625.3053221-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This function was never implemented and has been deprecated for a long time. We can remove it. Signed-off-by: David Marchand --- 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