DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
Cc: 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>,
	 Wathsala Vithanage <wathsala.vithanage@arm.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	 Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [EXTERNAL] Re: [PATCH v4 4/5] node: add error stats for ip4 lookup node
Date: Mon, 14 Oct 2024 12:42:52 +0530	[thread overview]
Message-ID: <CALBAE1PU6r0ThOU7O2smxOnnLRByDDHsd=sftL9pagw77_1weA@mail.gmail.com> (raw)
In-Reply-To: <PH0PR18MB40865407290C71431B06DB46DE792@PH0PR18MB4086.namprd18.prod.outlook.com>

On Fri, Oct 11, 2024 at 10:51 PM Pavan Nikhilesh Bhagavatula
<pbhagavatula@marvell.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Robin Jarry <rjarry@redhat.com>
> > Sent: Friday, October 11, 2024 3:19 PM
> > To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Jerin Jacob
> > <jerinj@marvell.com>; Nithin Kumar Dabilpuram
> > <ndabilpuram@marvell.com>; Kiran Kumar Kokkilagadda
> > <kirankumark@marvell.com>; zhirun.yan@intel.com; Wathsala Vithanage
> > <wathsala.vithanage@arm.com>; Bruce Richardson
> > <bruce.richardson@intel.com>; Konstantin Ananyev
> > <konstantin.v.ananyev@yandex.ru>
> > Cc: dev@dpdk.org
> > Subject: [EXTERNAL] Re: [PATCH v4 4/5] node: add error stats for ip4 lookup
> > node
> >
> > Hi Pavan, , Aug 16, 2024 at 17: 09: > 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>
> >
> > Hi Pavan,
> >
> > , Aug 16, 2024 at 17:09:
> > > 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>
> >
> > [snip]
> >
> > > diff --git a/lib/node/node_private.h b/lib/node/node_private.h
> > > index 1de7306792..36b2a733db 100644
> > > --- a/lib/node/node_private.h
> > > +++ b/lib/node/node_private.h
> > > @@ -12,6 +12,8 @@
> > >  #include <rte_mbuf.h>
> > >  #include <rte_mbuf_dyn.h>
> > >
> > > +#include <rte_graph_worker_common.h>
> > > +
> > >  extern int rte_node_logtype;
> > >  #define RTE_LOGTYPE_NODE rte_node_logtype
> > >
> > > @@ -88,4 +90,10 @@ node_mbuf_priv2(struct rte_mbuf *m)
> > >     return (struct node_mbuf_priv2 *)rte_mbuf_to_priv(m);
> > >  }
> > >
> > > +#define NODE_INCREMENT_ERROR_ID(node, id, cond, cnt)
> > \
> > > +   {                                                                                          \
> > > +           if (unlikely(rte_graph_has_stats_feature() && (cond)))
> > \
> > > +                   ((uint64_t *)RTE_PTR_ADD(node, node->err_off))[id]
> > += (cnt);               \
> > > +   }
> >
> > This is private API which is not usable with out-of-tree nodes. Could
> > you expose a way to increment a given error stat that does not involve
> > a hacky macro?
> >
> > How about something like this in rte_graph_worker_common.h:
> >
>
> I would prefer nodes having their own error increment implementation, leaves room
> for optimization rather than forcing all the nodes to use a single implementation.
>
> Some nodes might also be able to use SIMD to increment error count at once.
>
> Also, I really hate doing
>         if (error)
>                 rte_node_increment_error()
>
> The macro really looks really clean atleast for inbuild nodes.
> We can still have this additional inline function as a utility function.
>
> I will leave it upto the maintainers to decide.

IMO, it is OK to expose a version of rte_node_increment_error() as
Robin suggested.
Application is free to use public or more optimized version based on the needed.
Prefers rte_node_error_increment() (Keeping action/verb as last) though.

  reply	other threads:[~2024-10-14  7:13 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 [this message]
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           ` [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='CALBAE1PU6r0ThOU7O2smxOnnLRByDDHsd=sftL9pagw77_1weA@mail.gmail.com' \
    --to=jerinjacobk@gmail.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=pbhagavatula@marvell.com \
    --cc=rjarry@redhat.com \
    --cc=wathsala.vithanage@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).