DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
To: Robin Jarry <rjarry@redhat.com>, Jerin Jacob <jerinj@marvell.com>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar Kokkilagadda <kirankumark@marvell.com>,
	"zhirun.yan@intel.com" <zhirun.yan@intel.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [EXTERNAL] Re: [PATCH v5 0/3] Introduce node-specific errors in graph library
Date: Mon, 14 Oct 2024 13:48:16 +0000	[thread overview]
Message-ID: <CO6PR18MB4084E924D4FBE51D7D6ADF0CDE442@CO6PR18MB4084.namprd18.prod.outlook.com> (raw)
In-Reply-To: <D4VJTT5V3Y2Z.32IFMLZKRHLY6@redhat.com>

> Hi Pavan,
> 
> I am resending my review here. It seems you didn't get it.
> 
> , Oct 14, 2024 at 13:58:
> > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> >
> > Introduce the ability for nodes to advertise error counters during
> > registration and increment them during the node process function in
> > the graph library.
> > This enhancement allows for better error tracking and debugging
> > capabilities within the graph framework.
> >
> > The number of errors and the mapping of error IDs to error descriptions
> > are defined during node registration.
> > If an error is encountered during the node process function while walking
> > the graph, the respective error counter is incremented.
> 
> This feature could be useful to store detailed statistics per node, not
> only for errors. It would be better to rename "errors" to "xstats".
> 
> See below for a concrete suggestion.
> 
> >
> > Example:
> > 	static struct rte_node_errors ip4_reassembly_errors = {
> > 		.nb_errors = 1,
> > 		.err_desc = {
> > 			[0] = "ip4_reassembly_error",
> > 		},
> > 	};
> 
>   static const struct rte_node_xstats ip4_reassembly_xstats = {
>     .xstats_num = 1,
>     .xstats_desc = {
>       [0] = "ip4_reassembly_error",
>     },
>   }
> 

Ah, yes that makes sense, I will s/error/xstats.

> >
> > Here, "ip4_reassembly_error" is mapped to error ID 0, and the same ID is
> > used in the `ip4_reassembly_node_process` function to increment
> reassembly
> > errors.
> > Depending on the node, there can be multiple such errors 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)
> >
> > Pavan Nikhilesh (3):
> >   graph: add support for node specific errors
> >   graph: add node error counters
> 
> I think patch 1/3 and 2/3 should be split differently. My preference
> would be to have documentation (especially large svg images) in
> a separate commit. Other than that, the changes in lib/graph should be
> squashed in the same patch.
> 

Ack, I will rework them in next series.

> >   node: add error stats 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                       |  78 +-
> >  lib/graph/node.c                              |  37 +-
> >  lib/graph/rte_graph.h                         |  11 +
> >  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, 1192 insertions(+), 310 deletions(-)
> 
> To summarize changes, here is my proposal:
> 
>  struct rte_node_xstats {
>    uint8_t xstats_num; /**< Number of xstats. */
>    char (*xstats_desc)[RTE_NODE_XSTATS_DESC_SIZE]; /**< Names of xstats.
> */
>  };
> 
>  struct rte_node_register {
>    ...
>    const struct rte_node_xstats *xstats; /**< Node specific extra statistics. */
>    ...
>  };
> 
>  static inline void
>  rte_node_xstat_increment(struct rte_node *node, uint16_t stat_id, uint64_t
> value)
>  {
>  #ifdef RTE_LIBRTE_GRAPH_STATS
>    uint64_t *errors = RTE_PTR_ADD(node, node->err_off);
>    errors[err_id] += value;
>  #else
>    RTE_SET_USED(node);
>    RTE_SET_USED(err_id);
>    RTE_SET_USED(value);
>  #endif
>  }
> 
>  struct __rte_cache_aligned rte_graph_cluster_node_stats {
>    ...
>    uint8_t xstats_num;
>    char (*xstats_desc)[RTE_NODE_XSTATS_DESC_SIZE];
>    uint64_t *xstats_val;
>    ...
>  };
> 
> Let me know what you think. Thanks!


  reply	other threads:[~2024-10-14 13:48 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 16:26 [PATCH 1/5] graph: add support for node specific errors 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
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           ` Pavan Nikhilesh Bhagavatula [this message]
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=CO6PR18MB4084E924D4FBE51D7D6ADF0CDE442@CO6PR18MB4084.namprd18.prod.outlook.com \
    --to=pbhagavatula@marvell.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=rjarry@redhat.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).