On Tue, Oct 15, 2024 at 7:42 AM <pbhagavat...@marvell.com> wrote: > > From: Pavan Nikhilesh <pbhagavat...@marvell.com> > > Introduce the ability for nodes to advertise xstats counters during > registration and increment them during the node process function in > the graph library. > This enhancement allows for better stats tracking and debugging > capabilities within the graph framework. > > The number of xstats and the mapping of xstat IDs to xstat descriptions > are defined during node registration. > > Example: > static struct rte_node_xstats ip4_reassembly_xstats = { > .nb_xstats = 1, > .xstat_desc = { > [0] = "ip4_reassembly_error", > }, > }; > > Here, "ip4_reassembly_error" is mapped to xstat ID 0, and the same ID is > used in the `ip4_reassembly_node_process` function to increment reassembly > errors as an xstat. > Depending on the node, there can be multiple such xstats that can be > updated independently and retrieved using `rte_graph_cluster_stats_get`. > > Example: > +-------------------------------+---------------+---------------+--------------+ > |Node |calls |objs > |realloc_count | > +-------------------------------+---------------+---------------+--------------+ > |ip4_lookup |1324083 |338965248 |2 > | > | ip4_lookup_error | |338965496 | > | > |pkt_drop |1324084 |338965504 |1 > | > |ethdev_rx-0-0 |1324086 |338966016 |2 > | > |pkt_cls |1324086 |338966016 |1 > | > +-------------------------------+---------------+---------------+--------------+ > > v2 Changes: > - Fix compilation. > v3 Changes: > - Resend as 1/5 didn't make it through. > v4 Changes: > - Address review comments. > - Rebase on main branch. > v5 Changes: > - Shrink structure member names.(Robin) > - add rte_node_error_increment utility function. (Robin) > - Squash patches. (Robin) > - Update RN, DN. (David) > v6 Changes: > - Rename error to xstat. (Robin) > - Rearranges patches, update SVG fonts. > v7 Changes: > - Fix doxygen. (Jerin) > > Pavan Nikhilesh (3): > graph: add support for node specific xstats > doc: update graph layout and node anatomy images > node: add xstats for ip4 nodes > > doc/guides/prog_guide/graph_lib.rst | 22 +- > .../prog_guide/img/anatomy_of_a_node.svg | 329 +++++-- > .../prog_guide/img/graph_mem_layout.svg | 921 +++++++++++++----- > doc/guides/rel_notes/deprecation.rst | 6 - > doc/guides/rel_notes/release_24_11.rst | 8 + > lib/graph/graph_populate.c | 20 +- > lib/graph/graph_private.h | 3 + > lib/graph/graph_stats.c | 79 +- > lib/graph/node.c | 37 +- > lib/graph/rte_graph.h | 15 + > lib/graph/rte_graph_worker_common.h | 23 + > lib/graph/version.map | 7 + > lib/node/ip4_lookup.c | 9 + > lib/node/ip4_lookup_neon.h | 5 + > lib/node/ip4_lookup_sse.h | 6 + > lib/node/ip4_reassembly.c | 9 + > lib/node/node_private.h | 8 + > 17 files changed, 1197 insertions(+), 310 deletions(-)
Series applied, thanks. -- David Marchand