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 9CE31A00BE; Tue, 17 May 2022 07:32:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B703A42830; Tue, 17 May 2022 07:32:49 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 653F140041 for ; Tue, 17 May 2022 07:32:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652765567; x=1684301567; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=d4FrWIw5UrogVECYztkzJ6FGatpc9ik++/9Io5sVqj8=; b=TAywk27Bgg8Orlis1UqQugfR6U8BxU/w+raGThuqcC67TGaRjp3IMpa6 tGv95BU2w3dwiRQLwnuo2T9keC3QX+XkHDaWtNRinE1pToSGhren0t80b m6+9fiX6K4j1G/UN5vLSRyKdfYkC3z4/CI6swFQW9Q5ns+D69A9r8BDt9 XA3YSsZ8I5XKrp9ZsvxLzp821Z8feCbcg3qu+J5PaIQFuIq96SwuQeX/b +DumZTyb1qZelwHv3bSNAvpJGPoLMAhk0IuLajAo1cNK7SGYE1eBoWXpZ eCoqCcPiTgSbiluuJzV8M2HHbnDJfeCsb1cDQicT18tA9r5DvqQKwelgA g==; X-IronPort-AV: E=McAfee;i="6400,9594,10349"; a="268645160" X-IronPort-AV: E=Sophos;i="5.91,231,1647327600"; d="scan'208";a="268645160" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2022 22:32:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,231,1647327600"; d="scan'208";a="596934747" Received: from npg-wuwenjun-dpdk-01.sh.intel.com ([10.67.110.181]) by orsmga008.jf.intel.com with ESMTP; 16 May 2022 22:32:44 -0700 From: Wenjun Wu To: dev@dpdk.org, qiming.yang@intel.com, qi.z.zhang@intel.com Subject: [PATCH v11 1/7] net/ice/base: fix dead lock issue when getting node from ID type Date: Tue, 17 May 2022 13:09:26 +0800 Message-Id: <20220517050932.4078968-2-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220517050932.4078968-1-wenjun1.wu@intel.com> References: <20220329014813.1092054-1-wenjun1.wu@intel.com> <20220517050932.4078968-1-wenjun1.wu@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 The function ice_sched_get_node_by_id_type needs to be called with the scheduler lock held. However, the function ice_sched_get_node also requests the scheduler lock. It will cause the dead lock issue. This patch replaces function ice_sched_get_node with function ice_sched_find_node_by_teid to solve this problem. Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler") Cc: stable@dpdk.org Signed-off-by: Wenjun Wu --- drivers/net/ice/base/ice_sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index 2620892c9e..e697c579be 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -4774,12 +4774,12 @@ ice_sched_get_node_by_id_type(struct ice_port_info *pi, u32 id, case ICE_AGG_TYPE_Q: /* The current implementation allows single queue to modify */ - node = ice_sched_get_node(pi, id); + node = ice_sched_find_node_by_teid(pi->root, id); break; case ICE_AGG_TYPE_QG: /* The current implementation allows single qg to modify */ - child_node = ice_sched_get_node(pi, id); + child_node = ice_sched_find_node_by_teid(pi->root, id); if (!child_node) break; node = child_node->parent; -- 2.25.1