DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
To: "Yan, Zhirun" <zhirun.yan@intel.com>,
	Jerin Jacob <jerinj@marvell.com>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar Kokkilagadda <kirankumark@marvell.com>,
	Ruifeng Wang <ruifeng.wang@arm.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [24.11 PATCH v3 4/5] node: add error stats for ip4 lookup node
Date: Mon, 26 Feb 2024 07:46:03 +0000	[thread overview]
Message-ID: <PH0PR18MB408681FC2F2733E4AC553FBBDE5A2@PH0PR18MB4086.namprd18.prod.outlook.com> (raw)
In-Reply-To: <SN7PR11MB677527540907195DF8C097C485552@SN7PR11MB6775.namprd11.prod.outlook.com>

> > -----Original Message-----
> > From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> > Sent: Thursday, February 22, 2024 8:24 PM
> > To: jerinj@marvell.com; ndabilpuram@marvell.com;
> kirankumark@marvell.com;
> > Yan, Zhirun <zhirun.yan@intel.com>; Pavan Nikhilesh
> > <pbhagavatula@marvell.com>; Ruifeng Wang <ruifeng.wang@arm.com>;
> > Richardson, Bruce <bruce.richardson@intel.com>; Konstantin Ananyev
> > <konstantin.v.ananyev@yandex.ru>
> > Cc: dev@dpdk.org
> > Subject: [24.11 PATCH v3 4/5] node: add error stats for ip4 lookup node
> >
> > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> > Add error counters for ip4 LPM lookup failures in ip4_lookup node.
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> > ---
> >  lib/node/ip4_lookup.c      | 9 +++++++++
> >  lib/node/ip4_lookup_neon.h | 5 +++++
> >  lib/node/ip4_lookup_sse.h  | 6 ++++++
> >  lib/node/node_private.h    | 8 ++++++++
> >  4 files changed, 28 insertions(+)
> >
> > diff --git a/lib/node/ip4_lookup.c b/lib/node/ip4_lookup.c index
> > 18955971f6..5a7921db75 100644
> > --- a/lib/node/ip4_lookup.c
> > +++ b/lib/node/ip4_lookup.c
> > @@ -86,6 +86,7 @@ ip4_lookup_node_process_scalar(struct rte_graph
> *graph,
> > struct rte_node *node,
> >  		rc = rte_lpm_lookup(lpm, rte_be_to_cpu_32(ipv4_hdr-
> > >dst_addr),
> >  				    &next_hop);
> >  		next_hop = (rc == 0) ? next_hop : drop_nh;
> > +		NODE_INCREMENT_ERROR_ID(node, 0, (rc != 0), 1);
> >
> >  		node_mbuf_priv1(mbuf, dyn)->nh = (uint16_t)next_hop;
> >  		next_hop = next_hop >> 16;
> > @@ -219,11 +220,19 @@ ip4_lookup_node_init(const struct rte_graph
> *graph,
> > struct rte_node *node)
> >  	return 0;
> >  }
> >
> > +static struct rte_node_errors ip4_lookup_errors = {
> > +	.nb_errors = 1,
> > +	.err_desc = {
> > +		[0] = "ip4_lookup_error",
> 
> Here, if one node has a list of err_desc, should we add a table for counting?

A more complex node can have a table of errors, the lookup node has only one type of failure i.e. lpm lookup failure.

The id to increment can be selected by 
NODE_INCREMENT_ERROR_ID(node, 0, (rc != 0), 1); -> increments id 0 error
NODE_INCREMENT_ERROR_ID(node, 1, (rc != 0), 1); -> increments id 1 error


> like:
>   err_type  count
>   type_a        1
>   type_b        2
>   type_c        3
> 
> or we can report the total number of failed pkts for one node only.


  reply	other threads:[~2024-02-26  7:46 UTC|newest]

Thread overview: 20+ 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 [this message]
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

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=PH0PR18MB408681FC2F2733E4AC553FBBDE5A2@PH0PR18MB4086.namprd18.prod.outlook.com \
    --to=pbhagavatula@marvell.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=ndabilpuram@marvell.com \
    --cc=ruifeng.wang@arm.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).