[24.11 PATCH v3 1/5] graph: add support for node specific errors

Pavan Nikhilesh Bhagavatula pbhagavatula at marvell.com
Mon Feb 26 08:49:59 CET 2024


> > -----Original Message-----
> > From: pbhagavatula at marvell.com <pbhagavatula at marvell.com>
> > Sent: Thursday, February 22, 2024 8:24 PM
> > To: jerinj at marvell.com; ndabilpuram at marvell.com;
> kirankumark at marvell.com;
> > Yan, Zhirun <zhirun.yan at intel.com>
> > Cc: dev at dpdk.org; Pavan Nikhilesh <pbhagavatula at marvell.com>
> > Subject: [24.11 PATCH v3 1/5] graph: add support for node specific errors
> >
> > From: Pavan Nikhilesh <pbhagavatula at marvell.com>
> >
> > Add ability for Nodes to advertise error counters
> > during registration.
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
> > ---
> >  v2 Changes:
> >  - Fix compilation.
> >  v3 Changes:
> >  - Resend as 1/5 didn't make it through.
> >
> >  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 +++++++++++++-----
> >  lib/graph/graph_private.h                     |   1 +
> >  lib/graph/node.c                              |  37 +-
> >  lib/graph/rte_graph.h                         |   7 +
> >  6 files changed, 1016 insertions(+), 301 deletions(-)
> >
> > diff --git a/doc/guides/prog_guide/graph_lib.rst
> > b/doc/guides/prog_guide/graph_lib.rst
> > index ad09bdfe26..018900caea 100644
> > --- a/doc/guides/prog_guide/graph_lib.rst
> > +++ b/doc/guides/prog_guide/graph_lib.rst
> > @@ -21,6 +21,7 @@ Features of the Graph library are:
> >  - Nodes as plugins.
> >  - Support for out of tree nodes.
> >  - Inbuilt nodes for packet processing.
> > +- Node specific error counts.
> >  - Multi-process support.
> >  - Low overhead graph walk and node enqueue.
> >  - Low overhead statistics collection infrastructure.
> > @@ -124,6 +125,18 @@ Source nodes are static nodes created using
> > ``RTE_NODE_REGISTER`` by passing
> >  While performing the graph walk, the ``process()`` function of all the source
> >  nodes will be called first. So that these nodes can be used as input nodes for
> a
> > graph.
> >
> > +nb_errors:
> > +^^^^^^^^^^
> > +
> > +The number of errors that this node can report. The ``err_desc[]`` stores the
> > error
> > +descriptions which will later be propagated to stats.
> > +
> > +err_desc[]:
> > +^^^^^^^^^^^
> > +
> > +The dynamic array to store the error descriptions that will be reported by
> this
> > +node.
> 
> If there are no more detail infos reported by node, why not reuse the node-
> >name directly.
> 

The nodes can describe the errors they encounter in detail, and depending on how 
complex the node is it can have multiple kinds of errors.

> > +
> >  Node creation and registration
> >  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >  * Node implementer creates the node by implementing ops and attributes
> of
> > @@ -141,13 +154,13 @@ Link the Nodes to create the graph topology
> >     Topology after linking the nodes
> >
> >  Once nodes are available to the program, Application or node public API
> > -functions can links them together to create a complex packet processing
> graph.
> > +functions can link them together to create a complex packet processing
> graph.
> >
> >  There are multiple different types of strategies to link the nodes.
> >
> >  Method (a):
> >  ^^^^^^^^^^^
> > -Provide the ``next_nodes[]`` at the node registration time. See  ``struct
> > rte_node_register::nb_edges``.
> > +Provide the ``next_nodes[]`` at the node registration time. See ``struct
> > rte_node_register::nb_edges``.
> 
> No need to change this line.



More information about the dev mailing list