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 05DAF43F09; Thu, 25 Apr 2024 20:31:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C1FB143943; Thu, 25 Apr 2024 20:31:33 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5348740A67 for ; Thu, 25 Apr 2024 20:31:32 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 818AD210DED4; Thu, 25 Apr 2024 11:31:31 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 818AD210DED4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1714069891; bh=fhD8gPRQWwkAaBmnDd7y5WIVOf8P8ixhJ2bLe8qj76M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q+QR0dZB9DJ2rOzwb5tBLPOe1rvLpbbrXfwavTBfGTD9jySsol81nsNKBTstoeNkw t/WxL09jGWBIVJW8oosY/cWVL1TQZNLedEB+jhugUo0tiTa0yKnUW38kT6oOeHtNpT NZ3luCpsQbfQO1sYyFlggACa51tcVOQ7awzL2etg= Date: Thu, 25 Apr 2024 11:31:31 -0700 From: Tyler Retzlaff To: Stephen Hemminger Cc: dev@dpdk.org Subject: Re: [RFC 1/4] rte_malloc: document that type is unused Message-ID: <20240425183131.GA9356@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20240425182738.4771-1-stephen@networkplumber.org> <20240425182738.4771-2-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240425182738.4771-2-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:23:58AM -0700, Stephen Hemminger wrote: > The string type is left over from first version of DPDK and > was never implemented. > > Signed-off-by: Stephen Hemminger > --- > lib/eal/include/rte_malloc.h | 21 +++++++-------------- > 1 file changed, 7 insertions(+), 14 deletions(-) > > diff --git a/lib/eal/include/rte_malloc.h b/lib/eal/include/rte_malloc.h > index 54a8ac211e..91c9214c57 100644 > --- a/lib/eal/include/rte_malloc.h > +++ b/lib/eal/include/rte_malloc.h > @@ -37,8 +37,7 @@ struct rte_malloc_socket_stats { > * NUMA socket as the core that calls this function. > * > * @param type > - * A string identifying the type of allocated objects (useful for debug > - * purposes, such as identifying the cause of a memory leak). Can be NULL. > + * Legacy argument, never unused should be NULL. never unused seems unintended double negative. should it be 'unused' or 'never used' > * @param size > * Size (in bytes) to be allocated. > * @param align > @@ -64,8 +63,7 @@ rte_malloc(const char *type, size_t size, unsigned align) > * same NUMA socket as the core that calls this function. > * > * @param type > - * A string identifying the type of allocated objects (useful for debug > - * purposes, such as identifying the cause of a memory leak). Can be NULL. > + * Legacy argument, never unused should be NULL. > * @param size > * Size (in bytes) to be allocated. > * @param align > @@ -89,8 +87,7 @@ rte_zmalloc(const char *type, size_t size, unsigned align) > * same NUMA socket as the core that calls this function. > * > * @param type > - * A string identifying the type of allocated objects (useful for debug > - * purposes, such as identifying the cause of a memory leak). Can be NULL. > + * Legacy argument, never unused should be NULL. > * @param num > * Number of elements to be allocated. > * @param size > @@ -165,8 +162,7 @@ rte_realloc_socket(void *ptr, size_t size, unsigned int align, int socket) > * is not cleared. > * > * @param type > - * A string identifying the type of allocated objects (useful for debug > - * purposes, such as identifying the cause of a memory leak). Can be NULL. > + * Legacy argument, never unused should be NULL. > * @param size > * Size (in bytes) to be allocated. > * @param align > @@ -194,8 +190,7 @@ rte_malloc_socket(const char *type, size_t size, unsigned align, int socket) > * initialised with zeros. > * > * @param type > - * A string identifying the type of allocated objects (useful for debug > - * purposes, such as identifying the cause of a memory leak). Can be NULL. > + * Legacy argument, never unused should be NULL. > * @param size > * Size (in bytes) to be allocated. > * @param align > @@ -221,8 +216,7 @@ rte_zmalloc_socket(const char *type, size_t size, unsigned align, int socket) > * initialised with zeros. > * > * @param type > - * A string identifying the type of allocated objects (useful for debug > - * purposes, such as identifying the cause of a memory leak). Can be NULL. > + * Legacy argument, never unused should be NULL. > * @param num > * Number of elements to be allocated. > * @param size > @@ -502,8 +496,7 @@ rte_malloc_heap_socket_is_external(int socket_id); > * @param f > * A pointer to a file for output > * @param type > - * A string identifying the type of objects to dump, or NULL > - * to dump all objects. > + * Legacy argument, never unused should be NULL. > */ > void > rte_malloc_dump_stats(FILE *f, const char *type); > -- > 2.43.0