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 52ED045B37; Mon, 14 Oct 2024 13:58:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C458402DB; Mon, 14 Oct 2024 13:58:33 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 00B3F402D7 for ; Mon, 14 Oct 2024 13:58:30 +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 49EBSvAv025710; Mon, 14 Oct 2024 04:58:29 -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=J SqaY/vi/9jmkgrQx9vAoeriBF39+w2/nKchUcPpi6o=; b=Zejyxro99Pby8wPZD aQDewazAwVI+/Y6AMcEn9g0gJoeeVLJClMXdCRf2qMAcMYisMTmBV7pm62j93D3F 3IRzo2vAjlquIsQ7pOMpHcz66zNOWTUrp/RZQrhSdp4r0RZN8RrjN4rhWM0EAEvE /gcayLkpRFMYRhtaylnqJkLvEfNVQPcF9Nn9oP8nuA/+eeMHrjNPdIz6TivKmpXl GBZb7hY4WTQYOrOD0HUrOy6pIbzzWQuQnfKnGWP/188jvWIC22BPPL/Zht0Sb2Gt vDapfD25D31z+UDjr0HHi6bPvHbsQVwdvTda2Y1OdrfRqs2vE+kUfHnpIFZmFZrU GSOcQ== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 4292fd016v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Oct 2024 04:58:29 -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 04:58:28 -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 04:58:28 -0700 Received: from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com [10.28.164.106]) by maili.marvell.com (Postfix) with ESMTP id B9B075B6926; Mon, 14 Oct 2024 04:58:25 -0700 (PDT) From: To: , , , , , CC: , Pavan Nikhilesh Subject: [PATCH v5 0/3] Introduce node-specific errors in graph library Date: Mon, 14 Oct 2024 17:28:18 +0530 Message-ID: <20241014115821.4204-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240816150926.5789-1-pbhagavatula@marvell.com> References: <20240816150926.5789-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: U_qN16aHXYryZDswSL6LatqfvmbEhiZT X-Proofpoint-ORIG-GUID: U_qN16aHXYryZDswSL6LatqfvmbEhiZT 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 error counters during registration and increment them during the node process function in the graph library. This enhancement allows for better error tracking and debugging capabilities within the graph framework. The number of errors and the mapping of error IDs to error descriptions are defined during node registration. If an error is encountered during the node process function while walking the graph, the respective error counter is incremented. Example: static struct rte_node_errors ip4_reassembly_errors = { .nb_errors = 1, .err_desc = { [0] = "ip4_reassembly_error", }, }; Here, "ip4_reassembly_error" is mapped to error ID 0, and the same ID is used in the `ip4_reassembly_node_process` function to increment reassembly errors. Depending on the node, there can be multiple such errors 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) Pavan Nikhilesh (3): graph: add support for node specific errors graph: add node error counters node: add error stats 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 | 78 +- 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, 1192 insertions(+), 310 deletions(-) -- 2.25.1