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 18AD645B3D; Tue, 15 Oct 2024 07:42:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CBD04402A1; Tue, 15 Oct 2024 07:42:50 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 6962140270 for ; Tue, 15 Oct 2024 07:42:49 +0200 (CEST) Received: from pps.filterd (m0431383.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49F1OTXE010966; Mon, 14 Oct 2024 22:42:48 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=W h5bKnLClpR0fhHrrBKdrXZd4klPeGgf3GH1RGCeHfo=; b=SEYzPqseXqYoosXVm D2UMZYlEEOY/ra/clgsCwVwolgtlCkNHN3GiFYv1sv1r7VO18lt5LX7+vlICX6tr 2sGLgchchrTEfDpyyQ0Dpy86oXHQqyREyFtxt08KG6XWMuSt2gqnu0LcDSPTjObM Ohr2TN3rxsjfKCTrGb1ZFEIfS3tpXYxVku7bXTvYoYhqFsZGDC/AmrByEmrNs6hX RDwRRpFRFLqdx7oXabhQ0874imIMMDf1bY5ufyYIIxCrMKHq15hTDMo7vjCJLZnD GmtW/+RmTgQRtR29H+4+i6n0y4runz0GLizQpwmravhzyns+68CM/xBc930Ooph6 DvF1w== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 429eq18c71-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Oct 2024 22:42:48 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 14 Oct 2024 22:42:47 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 14 Oct 2024 22:42:47 -0700 Received: from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com [10.28.164.106]) by maili.marvell.com (Postfix) with ESMTP id 8347D3F7072; Mon, 14 Oct 2024 22:42:44 -0700 (PDT) From: To: , , , , , CC: , Pavan Nikhilesh Subject: [PATCH v7 0/3] Introduce node-specific xstats in graph library Date: Tue, 15 Oct 2024 11:12:38 +0530 Message-ID: <20241015054241.2447-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241014161036.12225-1-pbhagavatula@marvell.com> References: <20241014161036.12225-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: TRPfaPBcE_ArCa2F9oR5Kx1M-wN0LOyh X-Proofpoint-GUID: TRPfaPBcE_ArCa2F9oR5Kx1M-wN0LOyh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_01 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 From: Pavan Nikhilesh Introduce the ability for nodes to advertise xstats counters during registration and increment them during the node process function in the graph library. This enhancement allows for better stats tracking and debugging capabilities within the graph framework. The number of xstats and the mapping of xstat IDs to xstat descriptions are defined during node registration. Example: static struct rte_node_xstats ip4_reassembly_xstats = { .nb_xstats = 1, .xstat_desc = { [0] = "ip4_reassembly_error", }, }; Here, "ip4_reassembly_error" is mapped to xstat ID 0, and the same ID is used in the `ip4_reassembly_node_process` function to increment reassembly errors as an xstat. Depending on the node, there can be multiple such xstats 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) v6 Changes: - Rename error to xstat. (Robin) - Rearranges patches, update SVG fonts. v7 Changes: - Fix doxygen. (Jerin) Pavan Nikhilesh (3): graph: add support for node specific xstats doc: update graph layout and node anatomy images node: add xstats 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 | 79 +- lib/graph/node.c | 37 +- lib/graph/rte_graph.h | 15 + 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, 1197 insertions(+), 310 deletions(-) -- 2.25.1