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 46B8F45B3A; Mon, 14 Oct 2024 18:10:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE9AE4027F; Mon, 14 Oct 2024 18:10:58 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id F40F840151 for ; Mon, 14 Oct 2024 18:10:56 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49EBU8X5029663; Mon, 14 Oct 2024 09:10:55 -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=E foj2rqE8/SrOm7k7ruIcsZsMmD4GXPajGlkl5Ac+rQ=; b=cGfhjGaPsK1DKJ20o t4h0xubMcZrVHYDoBHmdR8VnVjCwZ9Vzxvs1zY4JO1heH4knu18h1+jrbg+IscQa I9m57t4MQL95aeVnAHSApnpKWB3UNAy7h7CpGL4rGgBhJ51MjV1N8TaqtxuHUDZ2 hCEVphLgRVjy4z+IA7Yj1tMX4IEYVbk/PP/kL8lUQWUrr7bzmvnHEVxQ4o8hY4hU JnuKX6EFXANEaeZrGYz2LJ0mJHFLNSY3h3K2NChBW6BARvFKrXve4jhHFurp0hYV +mwlxi7Fo5XUY7a4S/fGAQUYPS+xOfQUoSLNmKtAH6sxHEwSp8YUycoXZoXKp12K dH7vA== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 4292fd0htp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Oct 2024 09:10:55 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.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 09:10:43 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 14 Oct 2024 09:10:43 -0700 Received: from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com [10.28.164.106]) by maili.marvell.com (Postfix) with ESMTP id DD9173F7055; Mon, 14 Oct 2024 09:10:40 -0700 (PDT) From: To: , , , , , CC: , Pavan Nikhilesh Subject: [PATCH v6 0/3] Introduce node-specific xstats in graph library Date: Mon, 14 Oct 2024 21:40:33 +0530 Message-ID: <20241014161036.12225-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241014115821.4204-1-pbhagavatula@marvell.com> References: <20241014115821.4204-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: zG-sSMPN-DMP1gIwsywFQAGnfaOmMnYt X-Proofpoint-ORIG-GUID: zG-sSMPN-DMP1gIwsywFQAGnfaOmMnYt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_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. 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 | 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, 1193 insertions(+), 310 deletions(-) -- 2.25.1