[v2,12/15] graph: enable graph multicore dispatch scheduler model
Checks
Commit Message
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(-)
@@ -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