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 514A745844; Thu, 22 Aug 2024 08:37:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D2B9742E52; Thu, 22 Aug 2024 08:37:43 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 1543340DCD for ; Thu, 22 Aug 2024 08:37:41 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47LKKJ5A025676; Wed, 21 Aug 2024 23:37:38 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2172.outbound.protection.outlook.com [104.47.57.172]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 415aw2mmky-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Aug 2024 23:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=o5I3fmE9qC1jXSpQiKg1i6vx1YmhehFIbhpKMm60bYaUZOOTxRyAv/yi0qz+OgEiBcKsmPXfXkVRvwzvmfU5/tqVenDFgM93Oq+T/Q6vKnFt2YIDvPIeezctzNGnG1LxMlK0EgGuRrHcTVxfWqV2HDofJ9c+H02Vv4jk71ARt5fxjdySyTBrINj1GrAdJptqEAXNJJFZkovVXs647nb0Edi/nnQYSBnQlKagFwKyVSGaPZcfh7ZsbBBLNpIyyFtH1QXlBXsyqr137o0bAmX+x0shRHqdDPmnZzO6ntn8LCd/S4elQqJyxTMCyva31M2pvEEynbfoZU0FEfIyxjjR1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9HXuc03y8g0FncVT2KVPLm5CqIdQJxP7CQQj25eFczs=; b=mih9SXy0MJk08ThyUahw634ToRF2XnZcXXOrfRlFIup9JdOfC2zq7AqK1HPZwRQK7w/R+lkzuQ22ZkpjiNEcQR8XX5yNtWUTepyO1dKxHa4EjGCOkBFcJvn+TlFB6ZZJhDZ4/T560QzzuL0wrqVb+alkEPUW6irzhSH/OGWHuNKxFaAuUE+Fora0wNvzs2xNiJI8yclOjXcMt9nZptEM4X6Afqp3ihUgWkryQ45F/6Dl6TYKnxNwcnnn4IO5DgyAjNjx2VLKOq7/V/wlrfvbJR0N+l995ZgDgxmheg3rCRn1lBR8NG3WfShzuiqlAKpHl7tP5hZrCySsScaRR7buyw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9HXuc03y8g0FncVT2KVPLm5CqIdQJxP7CQQj25eFczs=; b=EXkY3jQZhvTCY0KkP773I8IhWzJ6M5LAVpXU+rrZhofSkkq2DBvlTt5+E8XgJ0ij5rvDvKf+w7R1YEMfJ24hZEW14DVHIZZjhSX96Ipv9okAKtkbetTMCqrU3vZV2LSB9uDCfaceIr0k5KVbcJu0JFcrLiQfsCFh4NVkDfFV9SU= Received: from PH0PR18MB5071.namprd18.prod.outlook.com (2603:10b6:510:16b::15) by PH7PR18MB5101.namprd18.prod.outlook.com (2603:10b6:510:157::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Thu, 22 Aug 2024 06:37:36 +0000 Received: from PH0PR18MB5071.namprd18.prod.outlook.com ([fe80::25e:7:91b:8f1c]) by PH0PR18MB5071.namprd18.prod.outlook.com ([fe80::25e:7:91b:8f1c%5]) with mapi id 15.20.7875.023; Thu, 22 Aug 2024 06:37:34 +0000 From: Kiran Kumar Kokkilagadda To: Pavan Nikhilesh Bhagavatula , Jerin Jacob , Nithin Kumar Dabilpuram , "zhirun.yan@intel.com" , Zhirun Yan CC: "dev@dpdk.org" , Pavan Nikhilesh Bhagavatula Subject: RE: [PATCH v4 2/5] graph: add node fastpath error counters Thread-Topic: [PATCH v4 2/5] graph: add node fastpath error counters Thread-Index: AQHa7+5Y+atVtAIY8062qoW8U5ieCLIy26NA Date: Thu, 22 Aug 2024 06:37:34 +0000 Message-ID: References: <20240222122342.16375-1-pbhagavatula@marvell.com> <20240816150926.5789-1-pbhagavatula@marvell.com> <20240816150926.5789-2-pbhagavatula@marvell.com> In-Reply-To: <20240816150926.5789-2-pbhagavatula@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR18MB5071:EE_|PH7PR18MB5101:EE_ x-ms-office365-filtering-correlation-id: 50e92c98-e8f1-41ec-6428-08dcc274e833 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016|376014|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?bVFPe3Z3DNI2COu41wtb2s8b9QCq+5t/hXJtxUFDjfXGS4fklOTTr/nJWgLJ?= =?us-ascii?Q?rRNdR3otuIhm8z7FDWGsipYqa9ib25s4jcxoT1LN7kAema27YvESPk15Hnkr?= =?us-ascii?Q?Xsz8ZJrSpO1KWUEn05sBZSo3eKflv9iYLIl17BhxiyJJixn46kXTP1IomJJ+?= =?us-ascii?Q?e5DrWVOOOfcmR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rhl3J?= =?us-ascii?Q?JSnUVapIMVymOgDZ+cZTh3dXX3tBFrxOWo8pkUhQEmrcK8ls4OCnmynkoh+I?= =?us-ascii?Q?Hh/+53wZ2vU222hl/ycv50YasMN3qY6qvzZpdKQW/jUcxZ59FNZ4NiJh6jf/?= =?us-ascii?Q?Ps0/pGrrXlI/VOZFthL3R0z3tT0n9aqiFgp6RlTX7X9xi03WyHv3bGikbkN0?= =?us-ascii?Q?PBkC7qpXqyYiKkqYO8HEwb7rynIoMof/+D0+nZpiqbjz5rplTwb8NhTbu2h+?= =?us-ascii?Q?Z/GiEsC2njQRNTLV5eVhCWz7EzoChLVTq6a/eyopDUXnlBR8V83rnXaujB+z?= =?us-ascii?Q?GXLO5XfGx86HorlDCgjLJRmtL7agCJSTB23uG1GPksGc5hrtPQ=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB5071.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mVaEY3gdHRV1S2IX1IwSq6mjY7pbBEtB+Vl9bNAg7sm1NIcGvcUmXQ0CdScr?= =?us-ascii?Q?vtoj5sCHJugYJPfaZgTJ1yIaizSSRaed4w0+aDO+Vx95UxFUM5dNUmd5LbJv?= =?us-ascii?Q?mawcL09w5GxHMfCAdi7nIH00nyVDb2vNZiav5ixJtq+be4K08khxtqGnYNSm?= =?us-ascii?Q?4U/Kg/T1cPctHxqv8fEJvgraVOrZLLN9+yHsbGOYxR82yJ7di/nCqpPhFWQ6?= =?us-ascii?Q?rks9eHnGwFNzVNmcfpT2qYS9SlzwPWaAe68rAUf8YfjSQomGLrs51v9FwlcV?= =?us-ascii?Q?PIHQYS7/2Vwg1FSK5VMlRqdHlxliBtmBXskLTse1MLYVtRgy62MsEgmUGe0y?= =?us-ascii?Q?5+cKsutFg8kAHKbP9wJxf7yTOcUcYvmnzOK5JkW7cJgtC/lyr5DbMjTL04P+?= =?us-ascii?Q?yXvibXFND6OzVjMq4R3ot7IkN8dG/GKmS56GMgC1+slUHl7qYryfL87f7VE/?= =?us-ascii?Q?6a8BufMjKYNdNKVhcjPMK6FSTOfLImViknRHLsq507ShxQc21MRn/SvsreaH?= =?us-ascii?Q?9HjggioWoBInHQYu/j4EBKpwmffeIWoFyraLy3oefH+z2pQGg/9EcpEG+5mm?= =?us-ascii?Q?W1nNgfAgTYgZeO0jhIUT34Yq8rTpACxbn0TPyW9cc/GwqxHu/5syOyoaW7gR?= =?us-ascii?Q?eCP76cM19++yDs4nDtAxldFPxvH8bOJyOj2P7JS2kuEluUr0APVFwY00Sr2r?= =?us-ascii?Q?kaqk0QjPVQf114aujYLWvmlpaWZzT2lIOVM3jPLRacenE7UEiqub5iTVBpWH?= =?us-ascii?Q?u2XOAeCEmkcXyjnBaEzFpmgOtTmRgOXH20+TxoLwv6ylNa6+wQzHsAJMfAAa?= =?us-ascii?Q?m1br7lhNal3VdqpNHmnEdPkPNVlJQSnlp3knjm8ojCAxGArnbFIKvz5XMNEp?= =?us-ascii?Q?E6PUtnu1QVne7/2GkQbw7GgC2Jgm+/no9vMkhuqSQpBJEyTw+4VFUAhBij5A?= =?us-ascii?Q?5p2li0U1zSZhVWELUGVEVIciD4u6AMvR4F5024ihr7IQo7VxbbEPLN8D5WRE?= =?us-ascii?Q?EybkhcBz7kVeAXXon6gZzDl17kLZzXBgzKVP/N55XpRSG/arZ8VwGDlYckkz?= =?us-ascii?Q?2D8p1Hsgej7dFZ7Bmb71mDNFfK5umVwi20as3IUs8yCxbkgEHfHiwgcENYAY?= =?us-ascii?Q?OvdOTPmAaXDYjfEjsLkafNKE+NuBuGqcuyb5xbWhF/2dsio5uI1Pw0a0/ke/?= =?us-ascii?Q?vCiz50ylwLiIs+mhmlRGgC36pC7unZi31s1tyndHoSiFVuRkRtTQTEzZ1wNm?= =?us-ascii?Q?ZhYytEuhILW8TjN6yfQdieEZ9eh1IiUm9rDDB50wm1lUl3baaI6W5Rjk5kDF?= =?us-ascii?Q?DdHX5hHT3yhXkNy7sY7x4GjkPur6f2nI8KA59+EDsC7UvbJ/wUD9F2lSvm+e?= =?us-ascii?Q?aDBBzU8wdJwXFa5i5BwWNBCX4KW/LmWTCd2Oq2+1t+FyzFXVEqmMf1uBDbTB?= =?us-ascii?Q?uu0SR5aEsGeF2M+niguaq5mWbvXlOF4TWyHbxGvdlXSE0laZR1Gj4FY33ezh?= =?us-ascii?Q?yEWP/c7Ou9JH8HCTjgfOYH4A3LVkScCIzWjRJjp0rOXCKuxHVsFsSA6taUb7?= =?us-ascii?Q?fIU4fmMEcYOYkqXIyrEVj0yHlhjLdFDU/ai81UAF?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB5071.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50e92c98-e8f1-41ec-6428-08dcc274e833 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Aug 2024 06:37:34.6936 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LYm40tPX3cyNxnIfgFQILSPMLbvj4rDqbVI274RAEnBMa1vrvRsL5yQK6GNyAOFmVGPPJpnkiwLhvwGtmq7dMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR18MB5101 X-Proofpoint-GUID: TolmA_2cseRLeDfjz1zMk2D_CWjVcTDe X-Proofpoint-ORIG-GUID: TolmA_2cseRLeDfjz1zMk2D_CWjVcTDe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-22_03,2024-08-19_03,2024-05-17_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 > -----Original Message----- > From: pbhagavatula@marvell.com > Sent: Friday, August 16, 2024 8:39 PM > To: Jerin Jacob ; Nithin Kumar Dabilpuram > ; Kiran Kumar Kokkilagadda > ; zhirun.yan@intel.com; Zhirun Yan > > Cc: dev@dpdk.org; Pavan Nikhilesh Bhagavatula > Subject: [PATCH v4 2/5] graph: add node fastpath error counters >=20 > From: Pavan Nikhilesh >=20 > Add node fastpath error counters advertised during node registration. >=20 > Signed-off-by: Pavan Nikhilesh > --- Acked-by: Kiran Kumar Kokkilagadda > lib/graph/graph_populate.c | 20 ++++++++++++++++++-- > lib/graph/graph_private.h | 2 ++ > lib/graph/rte_graph_worker_common.h | 1 + > 3 files changed, 21 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/graph/graph_populate.c b/lib/graph/graph_populate.c inde= x > ed596a7711..9c4c919e14 100644 > --- a/lib/graph/graph_populate.c > +++ b/lib/graph/graph_populate.c > @@ -39,6 +39,15 @@ graph_fp_mem_calc_size(struct graph *graph) > /* Pointer to next nodes(edges) */ > sz +=3D sizeof(struct rte_node *) * graph_node->node->nb_edges; > } > + sz =3D RTE_ALIGN(sz, RTE_CACHE_LINE_SIZE); > + graph->errors_start =3D sz; > + /* For 0..N node objects with error counters */ > + STAILQ_FOREACH(graph_node, &graph->node_list, next) { > + if (graph_node->node->errs =3D=3D NULL) > + continue; > + sz =3D RTE_ALIGN(sz, RTE_CACHE_LINE_SIZE); > + sz +=3D sizeof(uint64_t) * graph_node->node->errs->nb_errors; > + } >=20 > graph->mem_sz =3D sz; > return sz; > @@ -64,6 +73,7 @@ graph_header_popluate(struct graph *_graph) static voi= d > graph_nodes_populate(struct graph *_graph) { > + rte_graph_off_t err_off =3D _graph->errors_start; > rte_graph_off_t off =3D _graph->nodes_start; > struct rte_graph *graph =3D _graph->graph; > struct graph_node *graph_node; > @@ -99,6 +109,12 @@ graph_nodes_populate(struct graph *_graph) > ->adjacency_list[count] > ->node->name[0]; >=20 > + if (graph_node->node->errs !=3D NULL) { > + node->err_off =3D err_off - off; > + err_off +=3D sizeof(uint64_t) * graph_node->node->errs- > >nb_errors; > + err_off =3D RTE_ALIGN(err_off, RTE_CACHE_LINE_SIZE); > + } > + > off +=3D sizeof(struct rte_node *) * nb_edges; > off =3D RTE_ALIGN(off, RTE_CACHE_LINE_SIZE); > node->next =3D off; > @@ -158,7 +174,7 @@ graph_node_nexts_populate(struct graph *_graph) } >=20 > static int > -graph_src_nodes_populate(struct graph *_graph) > +graph_src_nodes_offset_populate(struct graph *_graph) > { > struct rte_graph *graph =3D _graph->graph; > struct graph_node *graph_node; > @@ -193,7 +209,7 @@ graph_fp_mem_populate(struct graph *graph) > graph_pcap_init(graph); > graph_nodes_populate(graph); > rc =3D graph_node_nexts_populate(graph); > - rc |=3D graph_src_nodes_populate(graph); > + rc |=3D graph_src_nodes_offset_populate(graph); >=20 > return rc; > } > diff --git a/lib/graph/graph_private.h b/lib/graph/graph_private.h index > e663b04d8b..01921b254c 100644 > --- a/lib/graph/graph_private.h > +++ b/lib/graph/graph_private.h > @@ -103,6 +103,8 @@ struct graph { > /**< Memzone to store graph data. */ > rte_graph_off_t nodes_start; > /**< Node memory start offset in graph reel. */ > + rte_graph_off_t errors_start; > + /**< Node error memory start offset in graph reel. */ > rte_node_t src_node_count; > /**< Number of source nodes in a graph. */ > struct rte_graph *graph; > diff --git a/lib/graph/rte_graph_worker_common.h > b/lib/graph/rte_graph_worker_common.h > index 36d864e2c1..fa59d40f57 100644 > --- a/lib/graph/rte_graph_worker_common.h > +++ b/lib/graph/rte_graph_worker_common.h > @@ -110,6 +110,7 @@ struct __rte_cache_aligned rte_node { > uint64_t total_sched_fail; /**< Number of scheduled > failure. */ > } dispatch; > }; > + rte_graph_off_t err_off; /**< Offset to error counters. */ > /* Fast path area */ > #define RTE_NODE_CTX_SZ 16 > alignas(RTE_CACHE_LINE_SIZE) uint8_t ctx[RTE_NODE_CTX_SZ]; /**< > Node Context. */ > -- > 2.25.1