All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH 00/20] pktmbuf free bulk cleanups
Date: Fri,  8 May 2026 13:33:21 -0700	[thread overview]
Message-ID: <20260508203607.1003036-1-stephen@networkplumber.org> (raw)

Looking at one driver noticed that rte_pktmbuf_free_bulk
was not being used. That motivated me to make a coccinelle
script to do a tree wide cleanup.

Then noticed that callers were having to check for NULL
before calling rte_pktmbuf_free_bulk, so changed it to
handle NULL array similar to free() and rte_free().

Do another tree wide pass to fix that and catch some
other unnecessary null checks in code.

Stephen Hemminger (20):
  devtools/cocci: add transform for rte_pktmbuf_free_bulk
  eventdev: use rte_pktmbuf_free_bulk
  gso: use rte_pktmbuf_free_bulk
  ip_frag: use rte_pktmbuf_free_bulk
  pipeline: use rte_pktmbuf_free_bulk
  port: use rte_pktmbuf_free_bulk
  net/af_xdp: use rte_pktmbuf_free_bulk
  net/cnxk: use rte_pktmbuf_free_bulk
  net/pfe: use rte_pktmbuf_free_bulk
  net/virtio: use rte_pktmbuf_free_bulk
  net/zxdh: use rte_pktmbuf_free_bulk
  app/compress-perf: use rte_pktmbuf_free_bulk
  mbuf: allow NULL array in rte_pktmbuf_free_bulk
  net/zxdh: remove unnecessary null check
  net/ice: remove unnecessary null check
  net/bnxt: remove unnecessary null check
  test: use rte_pktmbuf_free_bulk
  app/test-dma-perf: remove unnecessary null check
  app/test-compress-perf: remove unnecessary null check
  examples: use rte_pktmbuf_free_bulk

 .../comp_perf_test_common.c                   |  8 +--
 app/test-compress-perf/main.c                 |  6 +-
 app/test-dma-perf/benchmark.c                 |  6 +-
 app/test/sample_packet_forward.c              |  5 +-
 app/test/test_distributor.c                   |  4 +-
 app/test/test_dmadev.c                        |  6 +-
 app/test/test_ipfrag.c                        |  4 +-
 app/test/test_link_bonding.c                  | 13 ++---
 app/test/test_pmd_perf.c                      |  3 +-
 app/test/test_pmd_tap.c                       |  3 +-
 app/test/test_reorder.c                       | 12 ++--
 app/test/test_table_ports.c                   | 12 ++--
 app/test/test_table_tables.c                  | 21 +++----
 devtools/cocci/free_bulk.cocci                | 57 +++++++++++++++++++
 devtools/cocci/nullfree.cocci                 |  5 +-
 doc/guides/rel_notes/release_26_07.rst        |  5 ++
 drivers/net/af_xdp/rte_eth_af_xdp.c           |  3 +-
 drivers/net/bnxt/tf_core/v3/tfo.c             |  6 +-
 drivers/net/bnxt/tf_ulp/ulp_sc_mgr.c          |  6 +-
 drivers/net/cnxk/cnxk_ethdev.c                |  5 +-
 drivers/net/intel/ice/ice_dcf_sched.c         |  6 +-
 drivers/net/pfe/pfe_ethdev.c                  |  4 +-
 drivers/net/virtio/virtio_rxtx.c              | 20 +++----
 drivers/net/zxdh/zxdh_np.c                    |  3 +-
 drivers/net/zxdh/zxdh_queue.c                 |  7 +--
 drivers/net/zxdh/zxdh_rxtx.c                  |  3 +-
 examples/bbdev_app/main.c                     |  4 +-
 examples/l2fwd-crypto/main.c                  |  4 +-
 .../client_server_mp/mp_client/client.c       |  7 +--
 .../client_server_mp/mp_server/main.c         |  5 +-
 examples/ntb/ntb_fwd.c                        | 12 ++--
 examples/packet_ordering/main.c               |  5 +-
 examples/server_node_efd/efd_node/node.c      |  7 +--
 examples/server_node_efd/efd_server/main.c    |  5 +-
 examples/vhost/main.c                         |  3 +-
 lib/eventdev/rte_event_eth_tx_adapter.c       |  4 +-
 lib/gso/gso_common.c                          |  5 +-
 lib/ip_frag/rte_ipv6_fragmentation.c          |  4 +-
 lib/mbuf/rte_mbuf.c                           |  3 +
 lib/mbuf/rte_mbuf.h                           |  1 +
 lib/pipeline/rte_pipeline.c                   |  4 +-
 lib/port/rte_port_fd.c                        |  6 +-
 lib/port/rte_swx_port_fd.c                    |  8 +--
 lib/port/rte_swx_port_source_sink.c           |  6 +-
 44 files changed, 152 insertions(+), 174 deletions(-)
 create mode 100644 devtools/cocci/free_bulk.cocci

-- 
2.53.0


             reply	other threads:[~2026-05-08 20:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08 20:33 Stephen Hemminger [this message]
2026-05-08 20:33 ` [PATCH 01/20] devtools/cocci: add transform for rte_pktmbuf_free_bulk Stephen Hemminger
2026-05-08 20:33 ` [PATCH 02/20] eventdev: use rte_pktmbuf_free_bulk Stephen Hemminger
2026-05-08 20:33 ` [PATCH 03/20] gso: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 04/20] ip_frag: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 05/20] pipeline: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 06/20] port: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 07/20] net/af_xdp: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 08/20] net/cnxk: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 09/20] net/pfe: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 10/20] net/virtio: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 11/20] net/zxdh: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 12/20] app/compress-perf: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 13/20] mbuf: allow NULL array in rte_pktmbuf_free_bulk Stephen Hemminger
2026-05-09  8:47   ` Morten Brørup
2026-05-09 15:46     ` Stephen Hemminger
2026-05-10 12:31       ` Morten Brørup
2026-05-10 15:21         ` Stephen Hemminger
2026-05-08 20:33 ` [PATCH 14/20] net/zxdh: remove unnecessary null check Stephen Hemminger
2026-05-08 20:33 ` [PATCH 15/20] net/ice: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 16/20] net/bnxt: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 17/20] test: use rte_pktmbuf_free_bulk Stephen Hemminger
2026-05-08 20:33 ` [PATCH 18/20] app/test-dma-perf: remove unnecessary null check Stephen Hemminger
2026-05-11  1:16   ` fengchengwen
2026-05-08 20:33 ` [PATCH 19/20] app/test-compress-perf: " Stephen Hemminger
2026-05-08 20:33 ` [PATCH 20/20] examples: use rte_pktmbuf_free_bulk Stephen Hemminger

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=20260508203607.1003036-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.