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 CCDEB42BCF; Mon, 5 Jun 2023 13:27:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6FFA542D1D; Mon, 5 Jun 2023 13:26:58 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id AA06842D6D for ; Mon, 5 Jun 2023 13:26:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685964416; x=1717500416; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JdwRhOVw2uMPtkzwjELwLKZvmUapJoc4z09Mi880ryU=; b=Ylh3QsWLIA6rokmlM+LifhGEuKqG1NFjSYzfMZAmPBtfYY5xvbccZFFy RNVuvHJy2EgAF8DbYfj7XGmsbPn26IjDj2svF1CKdFtnJHzLNt+Qw0QpH dEWY06B1Eobr07EoFtrgySV6ebwmhBaIMDR5yzXijv8kPNbvy05p7k92j KUZfvIPOMsvPvUhmiscy3uB/hfF2KbE5HV05GdWLuxDr6r9tkNbfOYb3M pwbjADOC223bQldA4Txr+gJbbIA+BdCYRsnS3b6oi32ApjxZc1DxePUba KZIkNyWLfQtJ/lLz5kIiOuenixegW2RUwJpUrZPEvKma5pMpljqvEAB5c A==; X-IronPort-AV: E=McAfee;i="6600,9927,10731"; a="422168626" X-IronPort-AV: E=Sophos;i="6.00,217,1681196400"; d="scan'208";a="422168626" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 04:26:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10731"; a="832778962" X-IronPort-AV: E=Sophos;i="6.00,217,1681196400"; d="scan'208";a="832778962" Received: from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.94]) by orsmga004.jf.intel.com with ESMTP; 05 Jun 2023 04:26:53 -0700 From: Zhirun Yan To: dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com, ndabilpuram@marvell.com, stephen@networkplumber.org, pbhagavatula@marvell.com, jerinjacobk@gmail.com Cc: cunming.liang@intel.com, haiyue.wang@intel.com, mattias.ronnblom@ericsson.com, Zhirun Yan Subject: [PATCH v7 13/17] graph: enable graph multicore dispatch scheduler model Date: Mon, 5 Jun 2023 20:19:19 +0900 Message-Id: <20230605111923.3772260-14-zhirun.yan@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230605111923.3772260-1-zhirun.yan@intel.com> References: <20230509060347.1237884-1-zhirun.yan@intel.com> <20230605111923.3772260-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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/graph/rte_graph_worker.h b/lib/graph/rte_graph_worker.h index 5b58f7bda9..541c373cb1 100644 --- a/lib/graph/rte_graph_worker.h +++ b/lib/graph/rte_graph_worker.h @@ -11,6 +11,7 @@ extern "C" { #endif #include "rte_graph_model_rtc.h" +#include "rte_graph_model_mcore_dispatch.h" /** * Perform graph walk on the circular buffer and invoke the process function @@ -25,7 +26,18 @@ __rte_experimental static inline void rte_graph_walk(struct rte_graph *graph) { +#if !defined(RTE_GRAPH_MODEL_SELECT) || RTE_GRAPH_MODEL_SELECT == RTE_GRAPH_MODEL_RTC rte_graph_walk_rtc(graph); +#elif RTE_GRAPH_MODEL_SELECT == RTE_GRAPH_MODEL_MCORE_DISPATCH + rte_graph_walk_mcore_dispatch(graph); +#else + int model = rte_graph_worker_model_get(); + + if (model == RTE_GRAPH_MODEL_RTC) + rte_graph_walk_rtc(graph); + else if (model == RTE_GRAPH_MODEL_MCORE_DISPATCH) + rte_graph_walk_mcore_dispatch(graph); +#endif } #ifdef __cplusplus -- 2.37.2