While debugging TAP rte_flow discovered that test pmd verbose output was confusing and unhelpful. Instead, made a simple dissector that prints one line per packet like this in test-pmd.
The new commands are: testpmd> set output /tmp/packet.log testpmd> set format dissect To enable packet logging need to use: testpmd> set verbose 3 v8 - added JSON output format, and ability to redirect packet log, and don't overload verbose option. v7 - change rte_dissect to return number of characters that would be printed (same as snprintf). And tests around that. v6 - validate result of rte_dissect for simple packet v5 - breakout the additional ICMP types into header - fix some decoding bugs in ARP and ICMP Stephen Hemminger (7): net: add more icmp types net: add new packet dissector test: add test for packet dissector test-pmd: add option to redirect packet log test-pmd: add hex decode test-pmd: add packet dissect format test-pmd: add a JSON packet output app/test-pmd/cmdline.c | 81 ++++ app/test-pmd/config.c | 47 +++ app/test-pmd/testpmd.c | 4 + app/test-pmd/testpmd.h | 12 + app/test-pmd/util.c | 225 +++++++++- app/test/meson.build | 1 + app/test/test_dissect.c | 302 ++++++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 22 + lib/net/meson.build | 2 + lib/net/rte_dissect.c | 428 ++++++++++++++++++++ lib/net/rte_dissect.h | 45 ++ lib/net/rte_icmp.h | 22 +- lib/net/version.map | 7 + 13 files changed, 1187 insertions(+), 11 deletions(-) create mode 100644 app/test/test_dissect.c create mode 100644 lib/net/rte_dissect.c create mode 100644 lib/net/rte_dissect.h -- 2.45.2