Skip to content

add mbuf debug capabilities

Thomas Monjalon dpdk-dev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest7 patches 7 repliesIn review
  2. v67 patches 14 repliesSuperseded
  3. v57 patches 8 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v47 patches0 repliesSuperseded
v35 patches12 repliesSuperseded

Changes in v7 from the cover letter

- loop for sum of allocated mbufs
- remove unused Python import

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7doc: explain debug options in mbuf guidedoc/guides/prog_guide/mbuf_lib.rst+7 -21 reply
2/7mbuf: move header include for logslib/mbuf/mbuf_log.h lib/mbuf/rte_mbuf.c+2 -10 replies
3/7mbuf: record mbuf operations historyconfig/rte_config.h doc/guides/howto/debug_troubleshoot.rst doc/guides/prog_guide/mbuf_lib.rst +7 more+485 -14 replies
4/7ethdev: mark mbufs in burst functionslib/ethdev/rte_ethdev.h+11 -00 replies
5/7app/testpmd: use space separator in dump commandsapp/test-pmd/cmdline.c doc/guides/testpmd_app_ug/testpmd_funcs.rst+99 -1170 replies
6/7app/testpmd: add commands to dump mbuf historyapp/test-pmd/cmdline.c doc/guides/testpmd_app_ug/testpmd_funcs.rst+156 -00 replies
7/7usertools/mbuf: parse mbuf history dumpdoc/guides/howto/debug_troubleshoot.rst doc/guides/prog_guide/mbuf_lib.rst doc/guides/rel_notes/release_25_11.rst +2 more+173 -10 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchMorten BrørupRobin Jarry
1/7A-b
2/7R-b
3/7A-b
4/7R-b
5/7A-b
6/7A-b
7/7A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 0/7] add mbuf debug capabilities

History is added to mbuf for debugging.

This series set some marks in mbuf allocation/freeing and ethdev Rx/Tx. More marks could be added in other libraries.
Drivers could benefit a finer debugging by marking alloc/free calls, in addition to marks already done in the mbuf library.
Even better, the application could add its own marks.

As part of this series, mbuf statistics can be dumped, and a Python script will help to parse mbuf history.

---

v7 changes:
- loop for sum of allocated mbufs
- remove unused Python import

v6 changes:
- simplify testpmd commands
- use enum op type
- rename Tx ops
- mark free before freeing
- mark out of sanity check loop

v5 change:
- fix MSVC build in testpmd

v4 changes:
- fix/rewrite testpmd commands
- fix python script
- fix thread safety
- fix checks
- fix logs
- change config (no Meson option)
- add documentation

v3 changes:
- use atomic
- fix prefix
- add asserts
- reformat dump
- remove #ifdef clutter
- remove mlx5 patch

v2 changes:
- move to mbuf in dynamic field

v1:
- mempool feature

---

Shani Peretz (3):
mbuf: record mbuf operations history
ethdev: mark mbufs in burst functions
usertools/mbuf: parse mbuf history dump

Thomas Monjalon (4):
doc: explain debug options in mbuf guide
mbuf: move header include for logs app/testpmd: use space separator in dump commands app/testpmd: add commands to dump mbuf history

 app/test-pmd/cmdline.c                      | 309 ++++++++++++++------
 config/rte_config.h                         |   1 +
 doc/guides/howto/debug_troubleshoot.rst     |   7 +
 doc/guides/prog_guide/mbuf_lib.rst          |  18 +-
 doc/guides/rel_notes/release_25_11.rst      |   7 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  33 ++-
 lib/ethdev/rte_ethdev.h                     |  11 +
 lib/mbuf/mbuf_history.c                     | 223 ++++++++++++++
 lib/mbuf/mbuf_log.h                         |   2 +
 lib/mbuf/meson.build                        |   2 +
 lib/mbuf/rte_mbuf.c                         |   5 +-
 lib/mbuf/rte_mbuf.h                         |  15 +-
 lib/mbuf/rte_mbuf_dyn.h                     |  18 ++
 lib/mbuf/rte_mbuf_history.h                 | 207 +++++++++++++
 usertools/dpdk-mbuf-history-parser.py       | 165 +++++++++++
 15 files changed, 917 insertions(+), 106 deletions(-)
 create mode 100644 lib/mbuf/mbuf_history.c
 create mode 100644 lib/mbuf/rte_mbuf_history.h
 create mode 100755 usertools/dpdk-mbuf-history-parser.py
Signature · 1 line
2.51.0