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 2B6CD43F1A; Fri, 26 Apr 2024 18:16:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BF6D43EC8; Fri, 26 Apr 2024 18:16:29 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C3F7A43D7A for ; Fri, 26 Apr 2024 18:16:27 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2057A210EF28; Fri, 26 Apr 2024 09:16:27 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2057A210EF28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1714148187; bh=5AGaHjduLUgGjIwcmz8JGaplrXwxdt/AijW9HpzXSns=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p0qL8gZ12AfgnFMBwbwdmewbJZIFUEBltpoglMgEC6e6mWBW83iUkzdT0yi/bH5PB cU/phv37lMjRiXUuic45KrBJ7E+BBNuWiwsMs4hX1bG+CXSiEpYoYMGHKZVEYgzSSf u0rw/Xl/CSOO6otLWBMhEXOKdweOUU+p1s/K+Pwg= Date: Fri, 26 Apr 2024 09:16:27 -0700 From: Tyler Retzlaff To: Stephen Hemminger Cc: dev@dpdk.org Subject: Re: [RFC 4/4] eal/malloc: remove type argument from internal malloc routines Message-ID: <20240426161627.GA29409@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20240425182738.4771-1-stephen@networkplumber.org> <20240425182738.4771-5-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240425182738.4771-5-stephen@networkplumber.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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 On Thu, Apr 25, 2024 at 11:24:01AM -0700, Stephen Hemminger wrote: > The type argument is carried through malloc heap routines but > never used. > > Signed-off-by: Stephen Hemminger > --- > lib/eal/common/eal_common_memzone.c | 6 ++--- > lib/eal/common/malloc_heap.c | 39 ++++++++++++---------------- > lib/eal/common/malloc_heap.h | 7 +++-- > lib/eal/common/rte_malloc.c | 16 +++++------- > lib/eal/include/eal_trace_internal.h | 4 +-- > 5 files changed, 29 insertions(+), 43 deletions(-) > > diff --git a/lib/eal/common/eal_common_memzone.c b/lib/eal/common/eal_common_memzone.c > index 32e6b78f87..2d9b6aa3e3 100644 > --- a/lib/eal/common/eal_common_memzone.c > +++ b/lib/eal/common/eal_common_memzone.c > @@ -191,14 +191,12 @@ memzone_reserve_aligned_thread_unsafe(const char *name, size_t len, > if (len == 0 && bound == 0) { > /* no size constraints were placed, so use malloc elem len */ > requested_len = 0; > - mz_addr = malloc_heap_alloc_biggest(NULL, socket_id, flags, > - align, contig); > + mz_addr = malloc_heap_alloc_biggest(socket_id, flags, align, contig); i may have missed if this was discussed already. for the public api i understand for now we need to keep the unused parameter in the function signatures but for internal api/functions i would prefer the parameter be removed entirely. also somewhat related side-note i don't think msvc has a way of marking function parameters unused as is done with __rte_unused. currently i expand the macro empty and suppress the warning globally which is not great.