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 A57CE43CF4; Tue, 19 Mar 2024 07:22:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 716944028A; Tue, 19 Mar 2024 07:22:52 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id 9CB7E4021E; Tue, 19 Mar 2024 07:22:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710829371; x=1742365371; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yKS1v7b7s8HS/jSbK+hsOOVOhlPT6jKwLOaAQg3uDtM=; b=cwx0MX3EEE68Xt0gQvK8wqByJeCv2KzY617oDc+9kVs6lNyer2hGkvr3 mge8865VIUVSDLpc/QFoCgEBqpVp6aJmdvBwOKD1ujNm7lQSUGdIUIzMs X2Ef3gj66stCs1y+5pOOYcQf9ByE0/2ZeJN2adF2mCYJyQz0iz8NkWehm 9jNbOKMTjjUigDyVCMRe7E4TqwE5OnfqwhUoJQ88fwNLCpm/xJfjNjFm+ DJNsliRFjBSkZtMenBrR9GHOm5TnymCQf8jGuMqWt9X7ms5I/4SApH5fX ARqqk+1994Cl3H1W2pM/kGnFlXKQeBaycCf9bXUdV9vHBwP7S5t8NROYz Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11017"; a="5512628" X-IronPort-AV: E=Sophos;i="6.07,136,1708416000"; d="scan'208";a="5512628" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 23:22:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,136,1708416000"; d="scan'208";a="13749147" Received: from dpdk-wujingji-spr.sh.intel.com ([10.67.111.103]) by fmviesa008.fm.intel.com with ESMTP; 18 Mar 2024 23:22:47 -0700 From: Jingjing Wu To: dev@dpdk.org Cc: jingjing.wu@intel.com, jerinj@marvell.com, pbhagavatula@marvell.com, zhirun.yan@intel.com, stable@dpdk.org Subject: [PATCH] graph: fix head move when graph walk in mcore dispatch Date: Tue, 19 Mar 2024 14:14:54 +0000 Message-Id: <20240319141454.3275543-1-jingjing.wu@intel.com> X-Mailer: git-send-email 2.34.1 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 Head move should happen after the core id check, otherwise source node will be missed. Fixes: 35dfd9b9fd85 ("graph: introduce graph walk by cross-core dispatch") Cc: stable@dpdk.org Signed-off-by: Jingjing Wu --- lib/graph/rte_graph_model_mcore_dispatch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/graph/rte_graph_model_mcore_dispatch.h b/lib/graph/rte_graph_model_mcore_dispatch.h index 75ec388cad..b96469296e 100644 --- a/lib/graph/rte_graph_model_mcore_dispatch.h +++ b/lib/graph/rte_graph_model_mcore_dispatch.h @@ -97,12 +97,12 @@ rte_graph_walk_mcore_dispatch(struct rte_graph *graph) __rte_graph_mcore_dispatch_sched_wq_process(graph); while (likely(head != graph->tail)) { - node = (struct rte_node *)RTE_PTR_ADD(graph, cir_start[(int32_t)head++]); + 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) continue; - + head++; /* 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