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 5A60D4287E; Fri, 31 Mar 2023 06:04:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5F1D42D5D; Fri, 31 Mar 2023 06:03:43 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 2C6B842D69 for ; Fri, 31 Mar 2023 06:03:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680235421; x=1711771421; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uEYD7AaT6JY85ASk8lTux/2iq3TH/nB6Z++lQS3gzjs=; b=GZxUoELCbQfGhMHyE0XvAFgBSu0QNzVCevuTXjLExdwmC8U+VrpFdkXv e5Op34T/TfBxtlSfPWvuEl8EkzPwhx7rDIQElGlAbn3bLkdA3JbWT+4U9 VWRfZgencO4vj6pGUMmYoP4Bz9v/Fs4EafUeN9cQP7SWgEJaQ1FKp4gvI b3UVFNJWFhSTeYIrFg1proS6p8w1zRpCqyAdwF0WOi45HJHsvM1RUi/1w ArF8oNVouvy5wLnopqGwJVecm7vsrVLaDCkQNhXvBgnJX0FLXfQ0f654L hhZlZdjjk7A7c3LdtAx5JkQVkjb7gPQy34l+dyHc5YYurlpWONbkaOklo A==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="338849128" X-IronPort-AV: E=Sophos;i="5.98,306,1673942400"; d="scan'208";a="338849128" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 21:03:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="687502318" X-IronPort-AV: E=Sophos;i="5.98,306,1673942400"; d="scan'208";a="687502318" Received: from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.68]) by fmsmga007.fm.intel.com with ESMTP; 30 Mar 2023 21:03:38 -0700 From: Zhirun Yan To: dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com, ndabilpuram@marvell.com, stephen@networkplumber.org Cc: cunming.liang@intel.com, haiyue.wang@intel.com, Zhirun Yan Subject: [PATCH v5 12/15] graph: enable graph multicore dispatch scheduler model Date: Fri, 31 Mar 2023 13:03:03 +0900 Message-Id: <20230331040306.3143693-13-zhirun.yan@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230331040306.3143693-1-zhirun.yan@intel.com> References: <20230330061834.3118201-1-zhirun.yan@intel.com> <20230331040306.3143693-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