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 CE5F042A68; Fri, 5 May 2023 04:10:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BEA524161A; Fri, 5 May 2023 04:10:56 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id C6D544161A for ; Fri, 5 May 2023 04:10:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683252655; x=1714788655; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Odd6ao0TsQwJFb5In6/78M61+SmgAPEfnrFPVZQQ+lg=; b=X96ijnEx1YcsxJvw+Pmzh1B7gpHbZ+Gfw4rk0xQbl/CTW5nrziO1fKK6 dkumsg0odF5YcISMdB4isOEjqD24v7bZRsE6q+eHYGlwOvTtob59MLCIq O6wRi1uNJAPcV6wDaaIrasywqD2FoOsE/+VoeoWAqM5jr9xDRk2l8AX5c 21moRI7YvHaWmrXswRz8gX82w/GJgovsKofSQi7yPJ915Re9D/cOJE7VO xsxQF07dLUwDfptdRabcCL0EOUBCE5a9JmSS6ff4L1cN19kWP7GSav4XQ gMfG++brtJiaQILoIaY4/nukwhXK9c4NV6IMYKHzK3H/4JQXvsDQ5uMVD Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10700"; a="351238382" X-IronPort-AV: E=Sophos;i="5.99,250,1677571200"; d="scan'208";a="351238382" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2023 19:10:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10700"; a="727837332" X-IronPort-AV: E=Sophos;i="5.99,250,1677571200"; d="scan'208";a="727837332" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga008.jf.intel.com with ESMTP; 04 May 2023 19:10:53 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 4 May 2023 19:10:53 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 4 May 2023 19:10:53 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Thu, 4 May 2023 19:10:53 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.41) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Thu, 4 May 2023 19:10:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UTMMD5igHr8sljjGfvFyl7w+p6812KG1wgbfLw/0qH/H73DMKeV0Bv24NEkB/QgkCljcdYsLisiB2buincAJasjkZEZw9RXSlFjC/pNj7CC1YBQ1DvWk4eGWAdiypt4OZtStl3aF4JcuC23EAjAhT2pBQyHXmdxNNOhmu2ATqDg3y/dCPg1mP/J6CqHjEqghcStcQDDDrKvN3BTuWMeOHHY/ToI+1zB/UkZGcLRMDDtqdrUNSeF3xkk+mvNad4nwK5jUhItyfI6Mdrxuhuv/yRFWLspzy4pg2P22AZTtpqhigFPJOE+lY2Cvy0BG9kYPZFYM4+cU4LTQ2MdbR5nt+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=OEWndYteWF9Uiwts44b0BSZm/8o50JBHl67RYHtqy6M=; b=ifHblgOxnz6cGPT/nLNLJAuD7WSSVPDwwtnjjgx0ARR6BLqeLdYJx1jR3g8Bl0OyvKtuiYWtvgJAYW+uFGFmvP2hALXj0/+jEjzYfz/uWuENay63BFmqkBAvqtWV8FMnuN8J62oWEsiPslU2OKtP9ZLC40OYs9d9ZVNE/8Ofk0k1niGjZz92A+gsyyjSqJcqBu/GaOJv5OxBFrAqS2S82rEzlF/pd920hzET8x426X0lk9C1X4fo/SKUNhZT2jvMKVc5e8NNeCsC3WAlm9AOpGik5anL5zuoLzu8tjkXNTE+svnJGDx3ChMH6cFHDbPyDAvHAfUkYmGPEVMhR+WaYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SN7PR11MB6775.namprd11.prod.outlook.com (2603:10b6:806:264::21) by PH7PR11MB7497.namprd11.prod.outlook.com (2603:10b6:510:270::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.26; Fri, 5 May 2023 02:10:51 +0000 Received: from SN7PR11MB6775.namprd11.prod.outlook.com ([fe80::7972:8de5:546c:65f0]) by SN7PR11MB6775.namprd11.prod.outlook.com ([fe80::7972:8de5:546c:65f0%8]) with mapi id 15.20.6340.031; Fri, 5 May 2023 02:10:51 +0000 From: "Yan, Zhirun" To: Pavan Nikhilesh Bhagavatula , "dev@dpdk.org" , Jerin Jacob Kollanukkaran , "Kiran Kumar Kokkilagadda" , Nithin Kumar Dabilpuram , "stephen@networkplumber.org" CC: "Liang, Cunming" , "Wang, Haiyue" Subject: RE: [EXT] [PATCH v5 03/15] graph: move node process into inline function Thread-Topic: [EXT] [PATCH v5 03/15] graph: move node process into inline function Thread-Index: AQHZY4W+h/aJgqCi+k6wVAKIN+geLq8/a7GAgAu5AWA= Date: Fri, 5 May 2023 02:10:50 +0000 Message-ID: References: <20230330061834.3118201-1-zhirun.yan@intel.com> <20230331040306.3143693-1-zhirun.yan@intel.com> <20230331040306.3143693-4-zhirun.yan@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR11MB6775:EE_|PH7PR11MB7497:EE_ x-ms-office365-filtering-correlation-id: cb3d6de9-bb94-4f9b-0f41-08db4d0df309 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JIo4I5hTZw73rwNW7jTPpI1aRXdcJPYmZc8uSoN5lfKIoC/slcW8qT3CBoKm2TgNh/hCfYSJsvksIjEVwBxcaEeIy6KlmMNKGpJAuuuwf2yWjsCgnmGTBE+E+TiuIitxyKNhRwCqD8GS2KBfwW4AYgWT5BcaJnQlgJUg9JIxiw2tdP0E0XCOk5W+NmTItykbY394ZnzivehaV/5UiH7Wu1yUNz4xNL7zPcn+Do5NWajSPYZQQZeF3uRcUoZjNO8y0qUb0lPNzsT+741uVd0uYCYKgEaeH7IQHi8W1uvxdBMvQ8kyyDZBliF477mTkVtjDVcDkY4T8CkmTIfjx+jqK9t4nxVJ9sdxnPQqN+qH5yJx10he+PA6yKHdRJ8EkR80PjMxg6HmFpcCMzIXEzP0oWc4a9F8MM4dDW+fJ4Vfdvn4zDsD3EV3wI7o2sk1sPMn9a5ZuREATzseRUHf/OTdk3MmQWAVWLk4IO7bdg+RVf/X9A7oCBKv/KnMewZeO3iINL770Im+8Q9PUJECQQlTUuD5/jkx7Gybe1MBo2faNBxSzZn9SRT95uBpwe1chH4kxRls1HYJ5kDSmSttvPjaZjVccsg5TOPDckbB75RjyhzMBz2M03+Clgb6SmGMoeBn x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB6775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(376002)(136003)(346002)(39860400002)(366004)(396003)(451199021)(7696005)(55016003)(83380400001)(26005)(53546011)(9686003)(6506007)(107886003)(186003)(38100700002)(38070700005)(86362001)(82960400001)(122000001)(33656002)(71200400001)(8676002)(8936002)(2906002)(4326008)(316002)(76116006)(66946007)(66556008)(66446008)(64756008)(66476007)(110136005)(52536014)(41300700001)(478600001)(5660300002)(54906003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?V0ht2BZZd7eGyg8KlBQpQqK7q9ebdmXCF7SMEPAqX/gKc9aoT5I03Z3K/8ST?= =?us-ascii?Q?6yMhTcCrPlPDt2sfWrgSYaUW5+G7Z8bVXOrD4Mq2OGPLupwWT4xLmPhp29Nc?= =?us-ascii?Q?mdhwZ4ULXZ6454GSSjH+osGVF+zXhRgb5AGg6X60pXOSqlFvbixnb9LISq3/?= =?us-ascii?Q?VTvVIU1pToDcp0hP1RFWjFhIcrCuWLSqNHAnFvqhK8YKj+5AVEcCpdr1RggI?= =?us-ascii?Q?7h8hYfnBnDxTyMXCu3TDgROaPVLJW228QC5vtSf97qwPEPWL2mobhKBPTp+U?= =?us-ascii?Q?7Uo9FPbyHz50KpWs0yDO7ffQAXQUWpyHcPmR3AObHnos0u38vDVqmugMrpSN?= =?us-ascii?Q?Bd+C3gOQ4Pbjhl0GOWpOxEQ428fLZ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ascii?Q?qSxt2PphLKbdRxPo+IiVxhFDCiA+RfK3vydE1AIMOtnnEj7UEwWyfOP2I3v2?= =?us-ascii?Q?muXrnsgmKn2FNP4eAwvcxMqM/WKl4SdlnSLMWxdmd2P98NFPsFGG/6jNRHWX?= =?us-ascii?Q?X1X8Fw7rZYmJo0rikoI9SBUYiYNtlH/6SLkvY8DUBTySqCFloORkCTZzK6Lc?= =?us-ascii?Q?L17xU3a+7xrAztEPrnOdo5gyWFGXovJ+Gz0pJMVRoB2uemjYMLYyYfbqPW5b?= =?us-ascii?Q?8cUFkwzahhci/R7YTdoDxc5CWzdbbX2EcaGy2QewAig7R23BsW5QhCs12LxL?= =?us-ascii?Q?+gV2DIhZB/FgxjssjFhIRhBQstXledBjh8hFGvw7?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB6775.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb3d6de9-bb94-4f9b-0f41-08db4d0df309 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2023 02:10:50.9863 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: u51YnGWvv6Xzd/R52pmPbuTHUeD69WgSbAdZp31eM8R73bUPFV2Wf15OaJeftlteHNSBJEx4wmi7IsCZ/omcYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7497 X-OriginatorOrg: intel.com 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: Pavan Nikhilesh Bhagavatula > Sent: Thursday, April 27, 2023 11:03 PM > To: Yan, Zhirun ; dev@dpdk.org; Jerin Jacob > Kollanukkaran ; Kiran Kumar Kokkilagadda > ; Nithin Kumar Dabilpuram > ; stephen@networkplumber.org > Cc: Liang, Cunming ; Wang, Haiyue > > Subject: RE: [EXT] [PATCH v5 03/15] graph: move node process into inline > function >=20 > > Node process is a single and reusable block, move the code into an > > inline function. > > > > Signed-off-by: Haiyue Wang > > Signed-off-by: Cunming Liang > > Signed-off-by: Zhirun Yan > > --- > > lib/graph/rte_graph_model_rtc.h | 20 ++--------------- > > lib/graph/rte_graph_worker_common.h | 33 > > +++++++++++++++++++++++++++++ > > 2 files changed, 35 insertions(+), 18 deletions(-) > > > > diff --git a/lib/graph/rte_graph_model_rtc.h > > b/lib/graph/rte_graph_model_rtc.h index 665560f831..0dcb7151e9 100644 > > --- a/lib/graph/rte_graph_model_rtc.h > > +++ b/lib/graph/rte_graph_model_rtc.h > > @@ -20,9 +20,6 @@ rte_graph_walk_rtc(struct rte_graph *graph) > > const rte_node_t mask =3D graph->cir_mask; > > uint32_t head =3D graph->head; > > struct rte_node *node; > > - uint64_t start; > > - uint16_t rc; > > - void **objs; > > > > /* > > * Walk on the source node(s) ((cir_start - head) -> cir_start) and > > then @@ -41,21 +38,8 @@ rte_graph_walk_rtc(struct rte_graph *graph) > > */ > > while (likely(head !=3D graph->tail)) { > > node =3D (struct rte_node *)RTE_PTR_ADD(graph, > > cir_start[(int32_t)head++]); > > - RTE_ASSERT(node->fence =3D=3D RTE_GRAPH_FENCE); > > - objs =3D node->objs; > > - rte_prefetch0(objs); > > - > > - if (rte_graph_has_stats_feature()) { > > - start =3D rte_rdtsc(); >=20 > Since we are refactoring this function could you change rte_rdtsc() to > rte_rdtsc_precise(). Sure, I will do in next version. >=20 > > - rc =3D node->process(graph, node, objs, node->idx); > > - node->total_cycles +=3D rte_rdtsc() - start; > > - node->total_calls++; > > - node->total_objs +=3D rc; > > - } else { > > - node->process(graph, node, objs, node->idx); > > - } > > - node->idx =3D 0; > > - head =3D likely((int32_t)head > 0) ? head & mask : > > head; > > + __rte_node_process(graph, node); > > + head =3D likely((int32_t)head > 0) ? head & mask : head; > > } > > graph->tail =3D 0; > > } > > diff --git a/lib/graph/rte_graph_worker_common.h > > b/lib/graph/rte_graph_worker_common.h > > index b58f8f6947..41428974db 100644 > > --- a/lib/graph/rte_graph_worker_common.h > > +++ b/lib/graph/rte_graph_worker_common.h > > @@ -130,6 +130,39 @@ void __rte_node_stream_alloc_size(struct > > rte_graph *graph, > > > > /* Fast path helper functions */ > > > > +/** > > + * @internal > > + * > > + * Enqueue a given node to the tail of the graph reel. > > + * > > + * @param graph > > + * Pointer Graph object. > > + * @param node > > + * Pointer to node object to be enqueued. > > + */ > > +static __rte_always_inline void > > +__rte_node_process(struct rte_graph *graph, struct rte_node *node) { > > + uint64_t start; > > + uint16_t rc; > > + void **objs; > > + > > + RTE_ASSERT(node->fence =3D=3D RTE_GRAPH_FENCE); > > + objs =3D node->objs; > > + rte_prefetch0(objs); > > + > > + if (rte_graph_has_stats_feature()) { > > + start =3D rte_rdtsc(); > > + rc =3D node->process(graph, node, objs, node->idx); > > + node->total_cycles +=3D rte_rdtsc() - start; > > + node->total_calls++; > > + node->total_objs +=3D rc; > > + } else { > > + node->process(graph, node, objs, node->idx); > > + } > > + node->idx =3D 0; > > +} > > + > > /** > > * @internal > > * > > -- > > 2.37.2