From: "Robin Jarry" <rjarry@redhat.com>
To: <pbhagavatula@marvell.com>, <jerinj@marvell.com>,
<ndabilpuram@marvell.com>, <kirankumark@marvell.com>,
<zhirun.yan@intel.com>, "Zhirun Yan" <yanzhirun_163@163.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH v4 1/5] graph: add support for node specific errors
Date: Fri, 11 Oct 2024 12:02:59 +0200 [thread overview]
Message-ID: <D4SW32XIB6HE.357Z418JBWSZT@redhat.com> (raw)
In-Reply-To: <20240816150926.5789-1-pbhagavatula@marvell.com>
Hi Pavan,
, Aug 16, 2024 at 17:09:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add ability for Nodes to advertise error counters
> during registration.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
> v2 Changes:
> - Fix compilation.
> v3 Changes:
> - Resend as 1/5 didn't make it through.
> v4 Changes:
> - Address review comments.
> - Rebase on main branch.
>
> 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.
This feature could be useful to store detailed statistics per node, not
only for errors. It would be better to rename "errors" to "stats" or
"xstats".
See below for a concrete suggestion.
> diff --git a/lib/graph/graph_private.h b/lib/graph/graph_private.h
> index d557d55f2d..e663b04d8b 100644
> --- a/lib/graph/graph_private.h
> +++ b/lib/graph/graph_private.h
> @@ -61,6 +61,7 @@ struct node {
> rte_node_t id; /**< Allocated identifier for the node. */
> rte_node_t parent_id; /**< Parent node identifier. */
> rte_edge_t nb_edges; /**< Number of edges from this node. */
> + struct rte_node_errors *errs; /**< Node specific errors. */
How about:
struct rte_node_xstats *xstats; /**< Node specific extra statistics. */
And maybe const? I didn't check if you make a full copy, or if you only
copy the pointer.
> diff --git a/lib/graph/rte_graph.h b/lib/graph/rte_graph.h
> index ecfec2068a..b28143d737 100644
> --- a/lib/graph/rte_graph.h
> +++ b/lib/graph/rte_graph.h
> @@ -29,6 +29,7 @@ extern "C" {
>
> #define RTE_GRAPH_NAMESIZE 64 /**< Max length of graph name. */
> #define RTE_NODE_NAMESIZE 64 /**< Max length of node name. */
> +#define RTE_NODE_ERROR_DESC_SIZE 64 /**< Max length of node name. */
#define RTE_NODE_XSTATS_DESC_SIZE 64 /**< Max length of node xstats names. */
> #define RTE_GRAPH_PCAP_FILE_SZ 64 /**< Max length of pcap file name. */
> #define RTE_GRAPH_OFF_INVALID UINT32_MAX /**< Invalid graph offset. */
> #define RTE_NODE_ID_INVALID UINT32_MAX /**< Invalid node id. */
> @@ -460,6 +461,11 @@ void rte_graph_cluster_stats_get(struct rte_graph_cluster_stats *stat,
> */
> void rte_graph_cluster_stats_reset(struct rte_graph_cluster_stats *stat);
>
> +struct rte_node_errors {
> + uint16_t nb_errors; /**< Number of errors. */
> + char err_desc[][RTE_NODE_ERROR_DESC_SIZE]; /**< Names of errors. */
> +};
struct rte_node_xstats {
uint16_t xstats_num; /**< Number of xstats. */
char xstats_desc[RTE_NODE_XSTATS_DESC_SIZE]; /**< Names of xstats. */
};
> +
> /**
> * Structure defines the node registration parameters.
> *
> @@ -472,6 +478,7 @@ struct rte_node_register {
> rte_node_process_t process; /**< Node process function. */
> rte_node_init_t init; /**< Node init function. */
> rte_node_fini_t fini; /**< Node fini function. */
> + struct rte_node_errors *errs; /**< Node specific errors. */
struct rte_node_xstats *xstats; /**< Node specific extra statistics. */
Cheers!
next prev parent reply other threads:[~2024-10-11 10:03 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 16:26 [PATCH " pbhagavatula
2024-02-21 16:26 ` [PATCH 2/5] graph: add node fastpath error counters pbhagavatula
2024-02-21 16:26 ` [PATCH 3/5] graph: add stats for node specific errors pbhagavatula
2024-02-21 16:26 ` [PATCH 4/5] node: add error stats for ip4 lookup node pbhagavatula
2024-02-21 16:26 ` [PATCH 5/5] node: add error stats for ip4 reassembly node pbhagavatula
2024-02-22 5:36 ` [24.11 PATCH v2 1/5] graph: add support for node specific errors pbhagavatula
2024-02-22 5:36 ` [24.11 PATCH v2 2/5] graph: add node fastpath error counters pbhagavatula
2024-02-22 5:36 ` [24.11 PATCH v2 3/5] graph: add stats for node specific errors pbhagavatula
2024-02-22 5:36 ` [24.11 PATCH v2 4/5] node: add error stats for ip4 lookup node pbhagavatula
2024-02-22 5:36 ` [24.11 PATCH v2 5/5] node: add error stats for ip4 reassembly node pbhagavatula
2024-02-22 12:23 ` [24.11 PATCH v3 1/5] graph: add support for node specific errors pbhagavatula
2024-02-22 12:23 ` [24.11 PATCH v3 2/5] graph: add node fastpath error counters pbhagavatula
2024-02-23 7:15 ` Yan, Zhirun
2024-02-22 12:23 ` [24.11 PATCH v3 3/5] graph: add stats for node specific errors pbhagavatula
2024-02-22 12:23 ` [24.11 PATCH v3 4/5] node: add error stats for ip4 lookup node pbhagavatula
2024-02-23 7:18 ` Yan, Zhirun
2024-02-26 7:46 ` Pavan Nikhilesh Bhagavatula
2024-02-22 12:23 ` [24.11 PATCH v3 5/5] node: add error stats for ip4 reassembly node pbhagavatula
2024-02-23 7:13 ` [24.11 PATCH v3 1/5] graph: add support for node specific errors Yan, Zhirun
2024-02-26 7:49 ` Pavan Nikhilesh Bhagavatula
2024-08-16 15:09 ` [PATCH v4 " pbhagavatula
2024-08-16 15:09 ` [PATCH v4 2/5] graph: add node fastpath error counters pbhagavatula
2024-08-22 6:37 ` Kiran Kumar Kokkilagadda
2024-10-11 9:49 ` Robin Jarry
2024-08-16 15:09 ` [PATCH v4 3/5] graph: add stats for node specific errors pbhagavatula
2024-08-22 6:37 ` Kiran Kumar Kokkilagadda
2024-10-11 9:54 ` Robin Jarry
2024-10-11 17:15 ` [EXTERNAL] " Pavan Nikhilesh Bhagavatula
2024-10-12 15:13 ` Pavan Nikhilesh Bhagavatula
2024-08-16 15:09 ` [PATCH v4 4/5] node: add error stats for ip4 lookup node pbhagavatula
2024-08-22 6:38 ` Kiran Kumar Kokkilagadda
2024-10-11 9:48 ` Robin Jarry
2024-10-11 17:21 ` [EXTERNAL] " Pavan Nikhilesh Bhagavatula
2024-10-14 7:12 ` Jerin Jacob
2024-08-16 15:09 ` [PATCH v4 5/5] node: add error stats for ip4 reassembly node pbhagavatula
2024-08-22 6:38 ` Kiran Kumar Kokkilagadda
2024-08-22 6:37 ` [PATCH v4 1/5] graph: add support for node specific errors Kiran Kumar Kokkilagadda
2024-10-08 8:18 ` David Marchand
2024-10-11 10:02 ` Robin Jarry [this message]
2024-10-11 10:05 ` Robin Jarry
2024-10-11 17:23 ` [EXTERNAL] " Pavan Nikhilesh Bhagavatula
2024-10-11 14:28 ` David Marchand
2024-10-11 17:24 ` [EXTERNAL] " Pavan Nikhilesh Bhagavatula
2024-10-14 11:58 ` [PATCH v5 0/3] Introduce node-specific errors in graph library pbhagavatula
2024-10-14 11:58 ` [PATCH v5 1/3] graph: add support for node specific errors pbhagavatula
2024-10-14 11:58 ` [PATCH v5 2/3] graph: add node error counters pbhagavatula
2024-10-14 11:58 ` [PATCH v5 3/3] node: add error stats for ip4 nodes pbhagavatula
2024-10-14 13:04 ` [PATCH v5 0/3] Introduce node-specific errors in graph library Robin Jarry
2024-10-14 13:48 ` [EXTERNAL] " Pavan Nikhilesh Bhagavatula
2024-10-14 16:10 ` [PATCH v6 0/3] Introduce node-specific xstats " pbhagavatula
2024-10-14 16:10 ` [PATCH v6 1/3] graph: add support for node specific xstats pbhagavatula
2024-10-15 4:57 ` Jerin Jacob
2024-10-14 16:10 ` [PATCH v6 2/3] doc: update graph layout and node anatomy images pbhagavatula
2024-10-14 19:39 ` Robin Jarry
2024-10-14 16:10 ` [PATCH v6 3/3] node: add xstats for ip4 nodes pbhagavatula
2024-10-14 19:39 ` Robin Jarry
2024-10-15 5:42 ` [PATCH v7 0/3] Introduce node-specific xstats in graph library pbhagavatula
2024-10-15 5:42 ` [PATCH v7 1/3] graph: add support for node specific xstats pbhagavatula
2024-10-15 5:42 ` [PATCH v7 2/3] doc: update graph layout and node anatomy images pbhagavatula
2024-10-15 5:42 ` [PATCH v7 3/3] node: add xstats for ip4 nodes pbhagavatula
2024-10-16 8:39 ` David Marchand
2024-10-16 8:49 ` [PATCH v7 0/3] Introduce node-specific xstats in graph library David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D4SW32XIB6HE.357Z418JBWSZT@redhat.com \
--to=rjarry@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=pbhagavatula@marvell.com \
--cc=yanzhirun_163@163.com \
--cc=zhirun.yan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).