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 56FA045500; Wed, 26 Jun 2024 13:58:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1862C43390; Wed, 26 Jun 2024 13:55:32 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id B9D0F42E95 for ; Wed, 26 Jun 2024 13:43:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719402232; x=1750938232; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+DZjPj/1zSB6ABMIxYTLAk7COK1TWdp0JEQEOXoGZWI=; b=kp3pIl9B91pnyZBrm7p+dotj508G4kZOW+WbJ/if4CIhuwmss/5NlVUQ VC9TQ7Zrg6mpX0nS30YN5FwC6C2wgAJX3sFPr3GwNHwk31N8hnGaO2EoO K9fBPNTXupz9Kqy/yuiWJRR9iN0K4kLWj97C6b2wglOQuM72ocrvSy37s g6zL0pZ4wQFz5GQTL+YbDFUhDMgC/Nix+Tea3/k9VulK3HlXT2XWF+zsw uvPMq+TJKbzjQSKvYW6wNAKqVMkIVX/jsnon9gOCUEyfjT3C/LP70Az94 7mXhepdDcreLYBnYthcMGFuXgk4ztCMzztQwy46terBYOQYIP0Opgu4j0 A==; X-CSE-ConnectionGUID: coq5KxXXQJ6IecgyTPZdgg== X-CSE-MsgGUID: +GHe7hY1QOOc8LbwNTb+sg== X-IronPort-AV: E=McAfee;i="6700,10204,11114"; a="38979376" X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="38979376" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2024 04:43:51 -0700 X-CSE-ConnectionGUID: hqTE8av6TRiBckxv0XQn+w== X-CSE-MsgGUID: oarYdrgETT2+/z6PgiKyQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="43873655" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa010.jf.intel.com with ESMTP; 26 Jun 2024 04:43:51 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Jacob Keller , ian.stokes@intel.com, bruce.richardson@intel.com Subject: [PATCH v4 030/103] net/ice/base: enable RDMA Act-Act unload paths Date: Wed, 26 Jun 2024 12:41:18 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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 From: Jacob Keller In certain unload conditions the non-standard paths to breaking down the bond supporting resources need special considerations in that there could be nodes moved out of the tree and this can cause a NULL pointer to be passed into the find node by teid function. Add in a NULL pointer check to handle these situations Signed-off-by: Jacob Keller Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_sched.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index 74d57329da..af8f8cc7a9 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -56,6 +56,9 @@ ice_sched_find_node_by_teid(struct ice_sched_node *start_node, u32 teid) { u16 i; + if (!start_node) + return NULL; + /* The TEID is same as that of the start_node */ if (ICE_TXSCHED_GET_NODE_TEID(start_node) == teid) return start_node; -- 2.43.0