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 69B2C4285E; Wed, 29 Mar 2023 08:45:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4FA1D42B71; Wed, 29 Mar 2023 08:44:18 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 894F742D4E for ; Wed, 29 Mar 2023 08:44:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680072254; x=1711608254; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uEYD7AaT6JY85ASk8lTux/2iq3TH/nB6Z++lQS3gzjs=; b=PTJ491YpSjmFGwuip1aoM5DzAt6EsnRG9p5C6KyKwGXzqZIRTq31A+yg BMgKjlZyxei/Iia2yVfvClJqjsEj6LSiRl5hMGg4Tc3isUn22CQXjVhpR YaBQWT0GCPuSricw6sEU95ZHSHAC0dL9CEG2GcqA+1ifm0y731M0PlSDT 9AuCEJXcgAxLLypfXG45QhAfC9uKebqWRAIlNWJRa1la0nTsZTEmhzdJE 7eSIQDajVPdLt9QIoALPB7bsugkb8s9uB+iXHz2R4fVB74e9h8AKeW24i Z2hVEmf+FAamcaE30/6iMAuFNJTetxtNgU0kxHykzh5ejN9pslPDT4xVY Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="329260498" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="329260498" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2023 23:44:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="795105049" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="795105049" Received: from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.68]) by fmsmga002.fm.intel.com with ESMTP; 28 Mar 2023 23:44:12 -0700 From: Zhirun Yan To: dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com, ndabilpuram@marvell.com Cc: cunming.liang@intel.com, haiyue.wang@intel.com, Zhirun Yan Subject: [PATCH v3 12/15] graph: enable graph multicore dispatch scheduler model Date: Wed, 29 Mar 2023 15:43:37 +0900 Message-Id: <20230329064340.2550530-13-zhirun.yan@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230329064340.2550530-1-zhirun.yan@intel.com> References: <20230324021622.1369006-1-zhirun.yan@intel.com> <20230329064340.2550530-1-zhirun.yan@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This patch enables to chose new scheduler model. Signed-off-by: Haiyue Wang Signed-off-by: Cunming Liang Signed-off-by: Zhirun Yan --- lib/graph/rte_graph_worker.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/graph/rte_graph_worker.h b/lib/graph/rte_graph_worker.h index 7ea18ba80a..d608c7513e 100644 --- a/lib/graph/rte_graph_worker.h +++ b/lib/graph/rte_graph_worker.h @@ -10,6 +10,7 @@ extern "C" { #endif #include "rte_graph_model_rtc.h" +#include "rte_graph_model_dispatch.h" /** * Perform graph walk on the circular buffer and invoke the process function @@ -24,7 +25,13 @@ __rte_experimental static inline void rte_graph_walk(struct rte_graph *graph) { - rte_graph_walk_rtc(graph); + int model = rte_graph_worker_model_get(); + + if (model == RTE_GRAPH_MODEL_DEFAULT || + model == RTE_GRAPH_MODEL_RTC) + rte_graph_walk_rtc(graph); + else if (model == RTE_GRAPH_MODEL_MCORE_DISPATCH) + rte_graph_walk_mcore_dispatch(graph); } #ifdef __cplusplus -- 2.37.2