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 74F394281E; Fri, 24 Mar 2023 04:17:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 168F442D47; Fri, 24 Mar 2023 04:16:58 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id CB98342D46 for ; Fri, 24 Mar 2023 04:16:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679627816; x=1711163816; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uEYD7AaT6JY85ASk8lTux/2iq3TH/nB6Z++lQS3gzjs=; b=EzlU0ONcE9GmRZvLcDx+Ura9fA+4jN3Z0R7psRiN0RpwGCHJHWlO8rSt t9CyoRV4olvyUGWTs2KYhE75I5Ur42iakjqYsdpZD0oChSxSsmWrYjIoC Vb45MBCnlRo6X2R/Bdhb5j8A9fO0Qex8DfOBsLqrqq3mrYNidTyfrmT78 gvS/6m/L302UsBAHe7I0g09OrnBuWncaUUaJubEEkLGql41QxVT/gwGOj 8i/H4GoSeLg5mTUVWdGcXzN/D3X1vfIPZipHSLkJ0wkA/rcPFSWgHtNZP khYAdff+k4C7vSs+w+R3cAU35WoiPRUHmmckM86tSEC8JNFmBY/QLkku8 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="402266473" X-IronPort-AV: E=Sophos;i="5.98,286,1673942400"; d="scan'208";a="402266473" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 20:16:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="684998576" X-IronPort-AV: E=Sophos;i="5.98,286,1673942400"; d="scan'208";a="684998576" Received: from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.68]) by fmsmga007.fm.intel.com with ESMTP; 23 Mar 2023 20:16:53 -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 v2 12/15] graph: enable graph multicore dispatch scheduler model Date: Fri, 24 Mar 2023 11:16:19 +0900 Message-Id: <20230324021622.1369006-13-zhirun.yan@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230324021622.1369006-1-zhirun.yan@intel.com> References: <20221117050926.136974-1-zhirun.yan@intel.com> <20230324021622.1369006-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