From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D447945B3D; Tue, 15 Oct 2024 06:58:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D9A24027D; Tue, 15 Oct 2024 06:58:25 +0200 (CEST) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by mails.dpdk.org (Postfix) with ESMTP id B941940270 for ; Tue, 15 Oct 2024 06:58:24 +0200 (CEST) Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-7b13bf566c0so1655685a.3 for ; Mon, 14 Oct 2024 21:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728968304; x=1729573104; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/xXSlytWs2NXzDLL++hAK9Vq+MOXhe0n9ShRyQBMnXg=; b=WY7gpt5SGmuI2qbNmUjUHhH1VWfyYmxwts9FkFsNgJhfAefMReEw9S0lZCpTn7fS0V gWS9t/XGIlHH2y0/hScwLbHSVYCkQ1tJG0eXpnbjU5xKrj7zTh5quXH3QYAErysFmSX/ UUBJVNRPa9hwDcX/ejNxwKzk/xNHxo7Zb+RxD1UM4NSOLs+kpKxp482wzXgk7Luzf3PD FqnepGLMqr5DINktotzlgDwDejfaxgV7RpoEd30p+L2hO4hkg7Z0SRJwbUgkBLXfxkCi fdV7bum+KlU278P6sih4OY1yVE7iXDkqCsYZZiGhmSsC2mm64/TgsxUhEoC30vNy7imX nFnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728968304; x=1729573104; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/xXSlytWs2NXzDLL++hAK9Vq+MOXhe0n9ShRyQBMnXg=; b=Fr/rc6ahb4+g3dk/5LD6d3lbIXuqXNRBAOEDNKMexFg5+nhDaieGUbL7GPHREoab+K pmSyLDWymD16E5/x8mIj7fZjvF2IUfXPdzfKIbEVDHHHb638k9OgZwz3gZN0IdGcDVfM RQB3Cp5YBEAHgax30mJa8eVTT3aRHpXOpVOxtQZjRCEemunSJp6fuODymZjnjiTFOorI QqsT4bGU9xJVQMldffIb5LyPufT1wFywbTUXn3lz3xJmCntqesqPqh8jFcAm8SN+o/l+ 9wEmwwYhJsycIvBJyjt6SmXM38hHpi3KnBtwHGi0rUiKZ6adJy11XWRFd+PmrmxASSqB OKDg== X-Forwarded-Encrypted: i=1; AJvYcCVbhXIMD5nXG8yM4wAQAVn6OmbJeG+zkKJmn7ZA2j1RyotO0wBMNHioPuZx67GWiX6itTM=@dpdk.org X-Gm-Message-State: AOJu0Yx1gUgowHE8x59ylpLm1Ln4QUvUuu0y+0VXsjiucZI0o2YGJb6F u/cjEj0IHvhuAtEj8tAyynp34qQFse9+2VfKxPQzV8lnOJVZ0cZIeBs1bo2q7qFH/f97/FBip/n E7YiXQKdn0bIyQAsE3PCjgxlQJsk= X-Google-Smtp-Source: AGHT+IFVipOU1WhoslMM1yRidotGM4Q8p9rEO18iyJhK48Wg37rRXd+yb5d0enZGEaCnOhZOOKwOg95kmtlf/YxJHIg= X-Received: by 2002:a05:620a:4714:b0:7ac:b197:9e3f with SMTP id af79cd13be357-7b11a3c32b8mr1831326085a.51.1728968303878; Mon, 14 Oct 2024 21:58:23 -0700 (PDT) MIME-Version: 1.0 References: <20241014115821.4204-1-pbhagavatula@marvell.com> <20241014161036.12225-1-pbhagavatula@marvell.com> <20241014161036.12225-2-pbhagavatula@marvell.com> In-Reply-To: <20241014161036.12225-2-pbhagavatula@marvell.com> From: Jerin Jacob Date: Tue, 15 Oct 2024 10:27:57 +0530 Message-ID: Subject: Re: [PATCH v6 1/3] graph: add support for node specific xstats To: pbhagavatula@marvell.com Cc: jerinj@marvell.com, ndabilpuram@marvell.com, kirankumark@marvell.com, zhirun.yan@intel.com, rjarry@redhat.com, david.marchand@redhat.com, Zhirun Yan , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Oct 14, 2024 at 9:41=E2=80=AFPM wrote: > > From: Pavan Nikhilesh > > Add ability for Nodes to advertise xstat counters > during registration and increment them in fastpath. > Add support for retrieving/printing stats for node > specific xstats using rte_graph_cluster_stats_get(). > Add `rte_node_xstat_increment` API to increment node > specific xstat counters. > > Signed-off-by: Pavan Nikhilesh > Acked-by: Kiran Kumar K > Reviewed-by: Robin Jarry > --- > doc/guides/prog_guide/graph_lib.rst | 22 +++++-- > 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 | 79 +++++++++++++++++++++++++- > lib/graph/node.c | 37 +++++++++++- > lib/graph/rte_graph.h | 11 ++++ > lib/graph/rte_graph_worker_common.h | 23 ++++++++ > lib/graph/version.map | 7 +++ > 10 files changed, 201 insertions(+), 15 deletions(-) > Doxygen comment is missing for rte_node_xstats structure. > +struct rte_node_xstats { > + uint16_t nb_xstats; /**< Number of xstat= s. */ > + char xstat_desc[][RTE_NODE_XSTAT_DESC_SIZE]; /**< Names of xstats= . */ > +}; > + > > +/** > + * Increment Node xstat count. > + * > + * Increment the count of an xstat for a given node. > + * > + * @param node > + * Pointer to the node. > + * @param xstat_id > + * Error ID. Extend stats ID With the above fixes: Acked-by: Jerin Jacob > + * @param value > + * Value to increment. > + */ > +__rte_experimental > +static inline void > +rte_node_xstat_increment(struct rte_node *node, uint16_t xstat_id, uint6= 4_t value) > +{ > + if (rte_graph_has_stats_feature()) { > + uint64_t *xstat =3D (uint64_t *)RTE_PTR_ADD(node, node->x= stat_off); > + xstat[xstat_id] +=3D value; > + } > +} > +