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 7E729A00C2; Thu, 17 Nov 2022 06:10:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DAE4542D55; Thu, 17 Nov 2022 06:10:09 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id CAD2C42D48 for ; Thu, 17 Nov 2022 06:10:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668661809; x=1700197809; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6JryLhmtyevmq6Ib5ozYMrtcP3+SeKG/LdzK2cf6ozw=; b=F9rdCOm8wZsA5SNM5NYV8y2THuznMnxe/5cRa6F6c9/cL//nrUlZImv0 clSxIEDXimYyNXHpnuwA8TVZ6VyRxuEN5JcKqC91rj/PJuidAMtUP4Dx0 nHJ7AwV8Eu1X9X+Eg7EMbSrGy4nIBmBtY4+bC/d75SUm4S9/33m4oVTYr 8S4RpTTwFjj6LwOAlMY6jjkpiOAL07VrLbMjAVm2uQjvkNGAK3qSiZdsk bVPvPAru/r9QXXJ/M/rW4+nwVSEpvIL39RplLezfTIbb3ZOhweRCWLkWl UwSUOYlhcoH3caS5tJmmrXRmgcq3TO+MSO57QSNvwBLoatsq6Y+Dmt78+ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="377026715" X-IronPort-AV: E=Sophos;i="5.96,169,1665471600"; d="scan'208";a="377026715" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2022 21:10:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="617466178" X-IronPort-AV: E=Sophos;i="5.96,169,1665471600"; d="scan'208";a="617466178" Received: from dpdk-zhirun-lmm.sh.intel.com ([10.67.118.230]) by orsmga006.jf.intel.com with ESMTP; 16 Nov 2022 21:10:06 -0800 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 v1 11/13] graph: enable graph generic scheduler model Date: Thu, 17 Nov 2022 13:09:24 +0800 Message-Id: <20221117050926.136974-12-zhirun.yan@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221117050926.136974-1-zhirun.yan@intel.com> References: <20221117050926.136974-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 a0ea0df153..dea207ca46 100644 --- a/lib/graph/rte_graph_worker.h +++ b/lib/graph/rte_graph_worker.h @@ -1,4 +1,5 @@ #include "rte_graph_model_rtc.h" +#include "rte_graph_model_generic.h" static enum rte_graph_worker_model worker_model = RTE_GRAPH_MODEL_DEFAULT; @@ -64,5 +65,11 @@ __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_GENERIC) + rte_graph_walk_generic(graph); } -- 2.25.1