[PATCH v2 0/4] add mbuf debug capabilities

Shani Peretz shperetz at nvidia.com
Tue Sep 16 17:12:03 CEST 2025


v2:
narrow scope to mbuf only - move the history tracking data to the rte_mbuf structure.
use a dynamic mbuf field to store the tracking bitmap.
remove the compilation flag.

v1:
This feature is designed to monitor the lifecycle of mempool objects
as they move between the application and the PMD.

It will allow us to track the operations and transitions of each mempool
object throughout the system, helping in debugging and understanding objects flow.

The implementation include several key components:
1. Added a bitmap to mempool's header (rte_mempool_objhdr)
   that represent the operations history.
2. Added functions that allow marking operations on an
   mempool objects.
3. Dumps the history to a file or the console
   (rte_mempool_objects_dump).
4. Added python script that can parse, analyze the data and
   present it in an human readable format.
5. Added compilation flag to enable the feature.


Shani Peretz (4):
  mbuf: record mbuf operations history
  net/mlx5: mark an operation in mbuf's history
  app/testpmd: add testpmd command to dump mbuf history
  usertool: add a script to parse mbuf history dump

 app/test-pmd/cmdline.c                |  60 ++++++++-
 config/meson.build                    |   1 +
 drivers/net/mlx5/mlx5_rx.c            |  25 ++++
 drivers/net/mlx5/mlx5_rx.h            |   6 +
 drivers/net/mlx5/mlx5_rxq.c           |  15 ++-
 drivers/net/mlx5/mlx5_rxtx_vec.c      |  16 +++
 drivers/net/mlx5/mlx5_tx.h            |  21 +++
 drivers/net/mlx5/mlx5_txq.c           |   3 +
 lib/ethdev/rte_ethdev.h               |  15 +++
 lib/mbuf/meson.build                  |   2 +
 lib/mbuf/rte_mbuf.c                   |  10 +-
 lib/mbuf/rte_mbuf.h                   |  23 +++-
 lib/mbuf/rte_mbuf_dyn.h               |   7 +
 lib/mbuf/rte_mbuf_history.c           | 181 ++++++++++++++++++++++++++
 lib/mbuf/rte_mbuf_history.h           | 154 ++++++++++++++++++++++
 meson_options.txt                     |   2 +
 usertools/dpdk-mbuf_history_parser.py | 173 ++++++++++++++++++++++++
 17 files changed, 708 insertions(+), 6 deletions(-)
 create mode 100644 lib/mbuf/rte_mbuf_history.c
 create mode 100644 lib/mbuf/rte_mbuf_history.h
 create mode 100755 usertools/dpdk-mbuf_history_parser.py

-- 
2.34.1



More information about the dev mailing list