From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 523EA4286D;
	Thu, 30 Mar 2023 08:20:01 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id E3F2942D53;
	Thu, 30 Mar 2023 08:19:29 +0200 (CEST)
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by mails.dpdk.org (Postfix) with ESMTP id 96D6940E5A
 for <dev@dpdk.org>; Thu, 30 Mar 2023 08:19:25 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
 d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
 t=1680157165; x=1711693165;
 h=from:to:cc:subject:date:message-id:in-reply-to:
 references:mime-version:content-transfer-encoding;
 bh=uEYD7AaT6JY85ASk8lTux/2iq3TH/nB6Z++lQS3gzjs=;
 b=OYmvRtOeNq5U6H+jd5RJg+ejgxne/y0NqoQrNSA58n/A0PAcdXMj7J5r
 SPpLDsxwvTVpxeF34tm6rE26trAvn6E631EMUYNdRHfNjvcqdnI+dkJT+
 02bL739OVW+8HQhJqhnRCiXyf+Cg6YvBBxsAkE1BZkBJ2cWVK+Tlq6Oql
 e1WfnsXGp1+5bKUH6T8MhulkqHH50kSoR32FLqwNoSqWMOXSFkT9YCJ2t
 rvE1pohrIsFXQta+9Mn+sQnERmuGFy2zw5FndDjdtAXB3MZ+56kQnJ92B
 zHnX/VjPXu/uUTlD70COL+o/57ucl4Mm8X7dppGIzFU3TEsjvsUz+bsGg A==;
X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="343530633"
X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="343530633"
Received: from fmsmga001.fm.intel.com ([10.253.24.23])
 by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 29 Mar 2023 23:19:04 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="828176237"
X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="828176237"
Received: from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.68])
 by fmsmga001.fm.intel.com with ESMTP; 29 Mar 2023 23:19:03 -0700
From: Zhirun Yan <zhirun.yan@intel.com>
To: dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com,
 ndabilpuram@marvell.com
Cc: cunming.liang@intel.com, haiyue.wang@intel.com,
 Zhirun Yan <zhirun.yan@intel.com>
Subject: [PATCH v4 12/15] graph: enable graph multicore dispatch scheduler
 model
Date: Thu, 30 Mar 2023 15:18:31 +0900
Message-Id: <20230330061834.3118201-13-zhirun.yan@intel.com>
X-Mailer: git-send-email 2.37.2
In-Reply-To: <20230330061834.3118201-1-zhirun.yan@intel.com>
References: <20230329064340.2550530-1-zhirun.yan@intel.com>
 <20230330061834.3118201-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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

This patch enables to chose new scheduler model.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
---
 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