DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Tyler Retzlaff <roretzla@linux.microsoft.com>
Cc: dev@dpdk.org
Subject: Re: [RFC 4/4] eal/malloc: remove type argument from internal malloc routines
Date: Fri, 26 Apr 2024 15:52:29 -0700	[thread overview]
Message-ID: <20240426155229.68bfc50f@hermes.local> (raw)
In-Reply-To: <20240426161627.GA29409@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>

On Fri, 26 Apr 2024 09:16:27 -0700
Tyler Retzlaff <roretzla@linux.microsoft.com> wrote:

> > 
> > 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.

I dropped the parameter from all the internal routines. Are you suggesting having
an different name/version for use internally?

  reply	other threads:[~2024-04-26 22:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25 18:23 [RFC 0/4] malloc type argument cleanup (part 1) Stephen Hemminger
2024-04-25 18:23 ` [RFC 1/4] rte_malloc: document that type is unused Stephen Hemminger
2024-04-25 18:31   ` Tyler Retzlaff
2024-04-25 18:42     ` Stephen Hemminger
2024-04-25 18:23 ` [RFC 2/4] devtools/cocci: add script to find unnecessary malloc type Stephen Hemminger
2024-04-25 18:24 ` [RFC 3/4] devtools/cocci: add script to find where rte_calloc should be used Stephen Hemminger
2024-04-25 18:24 ` [RFC 4/4] eal/malloc: remove type argument from internal malloc routines Stephen Hemminger
2024-04-26 16:16   ` Tyler Retzlaff
2024-04-26 22:52     ` Stephen Hemminger [this message]
2024-04-26 23:06       ` Tyler Retzlaff
2024-05-07  7:04   ` Morten Brørup
2024-04-26 21:32 ` [RFC 0/4] malloc type argument cleanup (part 1) Patrick Robb
2024-06-15 16:00 ` [PATCH v2 0/3] malloc related cleanups Stephen Hemminger
2024-06-15 16:00   ` [PATCH v2 1/3] rte_malloc: document that type is for tracing Stephen Hemminger
2024-06-15 16:00   ` [PATCH v2 2/3] eal: remove type argument from internal routines Stephen Hemminger
2024-06-15 16:00   ` [PATCH v2 3/3] event/sw: avoid snprintf truncation Stephen Hemminger
2024-06-15 21:40   ` [PATCH v2 0/3] malloc related cleanups Morten Brørup
2024-06-17 17:48   ` Patrick Robb
2024-06-18 14:44 ` [PATCH v3 0/2] malloc type cleanups Stephen Hemminger
2024-06-18 14:44   ` [PATCH v3 1/2] rte_malloc: document that type is for tracing Stephen Hemminger
2024-06-18 14:44   ` [PATCH v3 2/2] eal: remove type argument from internal routines Stephen Hemminger
2024-07-05 14:09   ` [PATCH v3 0/2] malloc type cleanups David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240426155229.68bfc50f@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=roretzla@linux.microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).