> -----Original Message-----
> From: Wu, Jingjing <jingjing...@intel.com>
> Sent: Friday, March 22, 2024 11:47 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing...@intel.com>; jer...@marvell.com;
> pbhagavat...@marvell.com; Yan, Zhirun <zhirun....@intel.com>
> Subject: [PATCH v2] graph: fix head move when graph walk in mcore dispatch
> 
> Head move happens before the core id check, which will cause the last source
> node be executed even core id is not correct. This patch changes head check to
> less than 1 instead of 0 to fix this issue.
> 
> Fixes: 35dfd9b9fd85 ("graph: introduce graph walk by cross-core dispatch")
> 
> Signed-off-by: Jingjing Wu <jingjing...@intel.com>
> ---
>  lib/graph/rte_graph_model_mcore_dispatch.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/lib/graph/rte_graph_model_mcore_dispatch.h
> b/lib/graph/rte_graph_model_mcore_dispatch.h
> index 75ec388cad..1cc75b7ac4 100644
> --- a/lib/graph/rte_graph_model_mcore_dispatch.h
> +++ b/lib/graph/rte_graph_model_mcore_dispatch.h
> @@ -100,9 +100,8 @@ rte_graph_walk_mcore_dispatch(struct rte_graph
> *graph)
>               node = (struct rte_node *)RTE_PTR_ADD(graph,
> cir_start[(int32_t)head++]);
> 
>               /* skip the src nodes which not bind with current worker */
> -             if ((int32_t)head < 0 && node->dispatch.lcore_id != graph-
> >dispatch.lcore_id)
> +             if ((int32_t)head < 1 && node->dispatch.lcore_id !=
> +graph->dispatch.lcore_id)
>                       continue;
> -
No need for this line.

>               /* Schedule the node until all task/objs are done */
>               if (node->dispatch.lcore_id != RTE_MAX_LCORE &&
>                   graph->dispatch.lcore_id != node->dispatch.lcore_id &&
> --
> 2.34.1

With small change,

Acked-by: Zhirun Yan <zhirun....@intel.com>

Reply via email to