DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [RFC 0/4] malloc type argument cleanup (part 1)
Date: Thu, 25 Apr 2024 11:23:57 -0700	[thread overview]
Message-ID: <20240425182738.4771-1-stephen@networkplumber.org> (raw)

This part documents and provides script to replace the unused
type argument in rte_malloc.  The type was intended to be a string
but never implemented, and if it hasn't been implemented in 10 years
it won't be. Too invasive to completely remove it.

Stephen Hemminger (4):
  rte_malloc: document that type is unused
  devtools/cocci: add script to find unnecessary malloc type
  devtools/cocci: add script to find where rte_calloc should be used
  eal/malloc: remove type argument from internal malloc routines

 devtools/cocci/malloc-type.cocci     | 27 +++++++++++++++++++
 devtools/cocci/prefer-calloc.cocci   | 19 ++++++++++++++
 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 +--
 lib/eal/include/rte_malloc.h         | 21 +++++----------
 8 files changed, 82 insertions(+), 57 deletions(-)
 create mode 100644 devtools/cocci/malloc-type.cocci
 create mode 100644 devtools/cocci/prefer-calloc.cocci

-- 
2.43.0


             reply	other threads:[~2024-04-25 18:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25 18:23 Stephen Hemminger [this message]
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
2024-04-26 23:06       ` Tyler Retzlaff
2024-04-26 21:32 ` [RFC 0/4] malloc type argument cleanup (part 1) Patrick Robb

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=20240425182738.4771-1-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /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).