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 04FC842AA0; Tue, 9 May 2023 08:05:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 736A742D73; Tue, 9 May 2023 08:04:29 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id C5F1142D6D for ; Tue, 9 May 2023 08:04:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683612269; x=1715148269; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4EV6ZXoa0T7+3L8u2UjnyisLXdFyK3zWv74Q4XjX/e0=; b=Ftx9+xtjXVdIHbD4SBtRAiRCaS6eFCNV5izU7DGFci6Pdril0g7vjKZK xFcJUMNekurXIiBnOmpJog9gHqVHdpdayMVGceldUf7Vu9kIw2iUNFpS/ q2G7ntXz3ZkpTCCOODS+jLwcOyV3qL3ZSS4kPPKzItLTAaDzWgXxpv7iK 5tAwnJH6CDZGbHeJLykRlB6rR0UycKgV8/COslo5gPCtwUV8AmvcZrXUS TcqReQPB8E0AzhiyzrbcBmgD9VoIGuJM0Urz7yGDxKyHv6Zj9BqfBMSaj UEF9e6VKaK/kzKM4ldTGqavwb16Jmq7e9n+Mw7BSxYX8Xx/pGUdMQ2JBz Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10704"; a="351983152" X-IronPort-AV: E=Sophos;i="5.99,261,1677571200"; d="scan'208";a="351983152" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2023 23:04:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10704"; a="701700409" X-IronPort-AV: E=Sophos;i="5.99,261,1677571200"; d="scan'208";a="701700409" Received: from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.94]) by fmsmga007.fm.intel.com with ESMTP; 08 May 2023 23:04:26 -0700 From: Zhirun Yan To: dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com, ndabilpuram@marvell.com, stephen@networkplumber.org, pbhagavatula@marvell.com Cc: cunming.liang@intel.com, haiyue.wang@intel.com, Zhirun Yan Subject: [PATCH v6 12/15] graph: enable graph multicore dispatch scheduler model Date: Tue, 9 May 2023 15:03:44 +0900 Message-Id: <20230509060347.1237884-13-zhirun.yan@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230509060347.1237884-1-zhirun.yan@intel.com> References: <20230331040306.3143693-1-zhirun.yan@intel.com> <20230509060347.1237884-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 5b58f7bda9..2dd27b3949 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_dispatch.h" /** * Perform graph walk on the circular buffer and invoke the process function @@ -25,7 +26,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