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 603AE42C40; Tue, 6 Jun 2023 16:56:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 84195411F3; Tue, 6 Jun 2023 16:55:35 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 71F6B40A84 for ; Tue, 6 Jun 2023 16:55:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686063332; x=1717599332; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hLZR5LglfScRN4CMn6xPgoQ+JdEjh2CHjXIb/73lWbk=; b=a0gjmbHBGECHrJzws6XvgvmPEFxF+YQN59RWgdq0/PF8mreGEhI+X5XL 49XOPgaYdBgD+/cm+SMOTCwRSFg8+5qb51CkIlY66oOipTIB5aZgAD1qZ px96kRNswG6yj15+HbUKnt8rsQNWn/nj7LoF01Zm3zrkOuRfXSKQbq1/g HNydL6M58kz1RQ02D6MEj+PsMCOifb1EDgj0DNwo36wnv8t8dgBTXD2vy /IRtR9x/rtxmqVCfG0pQS3GMFyN6alk7bgxhktuVIvCPsk2C1SdSGSgRp 9Eqz/2M9gN5eB9oGkfVK2ot9sBlr6asZr98QZe9nSZHlIwuH4GvNskgpq w==; X-IronPort-AV: E=McAfee;i="6600,9927,10733"; a="356705575" X-IronPort-AV: E=Sophos;i="6.00,221,1681196400"; d="scan'208";a="356705575" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 07:55:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10733"; a="1039222893" X-IronPort-AV: E=Sophos;i="6.00,221,1681196400"; d="scan'208";a="1039222893" Received: from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.94]) by fmsmga005.fm.intel.com with ESMTP; 06 Jun 2023 07:55:19 -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 v8 13/17] graph: enable graph multicore dispatch scheduler model Date: Tue, 6 Jun 2023 22:47:42 +0800 Message-Id: <20230606144746.708388-14-zhirun.yan@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230606144746.708388-1-zhirun.yan@intel.com> References: <20230605111923.3772260-1-zhirun.yan@intel.com> <20230606144746.708388-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. Must define RTE_GRAPH_MODEL_SELECT before including rte_graph_worker.h to enable specific model choosing. 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..69bdd0e074 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 defined(RTE_GRAPH_MODEL_SELECT) && RTE_GRAPH_MODEL_SELECT == RTE_GRAPH_MODEL_MCORE_DISPATCH + rte_graph_walk_mcore_dispatch(graph); +#else + int model = rte_graph_worker_model_get(graph); + + 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