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 85C6743B73 for ; Thu, 22 Feb 2024 11:08:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BE7240ED6; Thu, 22 Feb 2024 11:08:10 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 60BD2402CE; Thu, 22 Feb 2024 11:08:08 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41M9BLWX021847; Thu, 22 Feb 2024 02:08:07 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= pfpt0220; bh=/23JblaNCkIhTzoqHGX6koBFZAcDT93ZQ4bEw1aeapI=; b=HMo JPmqxnHaWICD8ES2QwFu4uT1D5imy2mXkEWDV5NwYZ+nhbwYE+WHkR/gSXitlshc SB1biN77bKavaHo/Z+q3cDisStsZAsOKar4ALuUul5F2zpP/AkI4zs9E78qu2xCr bJ/9eraFZLX2bEyU972nBG+PKfBE2Z+AVSlqe0wWAXCHP6BRT3zOfrqCj0uThrDo VRErCuDcSNkBYT7Tp+Osqh0UHc0BV/Ft0nfXSpt0bP75ERB6FGL89aVLIXNn5p2C Gtcr6nOxpM76jdptIJSEI3UheIA7b2qJ7AfSM4Fl0OsHrzi6rtX13X6gpzk35qGe kFEGBg0F72TN4sahz8Q== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3we3dw84kh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 02:08:07 -0800 (PST) Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 22 Feb 2024 02:08:06 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 22 Feb 2024 02:08:05 -0800 Received: from localhost.localdomain (unknown [10.28.36.158]) by maili.marvell.com (Postfix) with ESMTP id B49623F7151; Thu, 22 Feb 2024 02:08:03 -0800 (PST) From: Rahul Bhansali To: , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Rahul Bhansali CC: Subject: [PATCH v2 3/5] common/cnxk: fix for inline dev pointer check Date: Thu, 22 Feb 2024 15:37:27 +0530 Message-ID: <20240222100729.991411-3-rbhansali@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240222100729.991411-1-rbhansali@marvell.com> References: <20240119055721.1750399-1-rbhansali@marvell.com> <20240222100729.991411-1-rbhansali@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: Pim4ilsprj1cIuZvhSJfiLoQAzXbTYI1 X-Proofpoint-ORIG-GUID: Pim4ilsprj1cIuZvhSJfiLoQAzXbTYI1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-22_08,2024-02-22_01,2023-05-22_02 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Add missing check of Inline device pointer before accessing is_multi_channel variable. Fixes: 7ea187184a51 ("common/cnxk: support 1-N pool-aura per NIX LF") Cc: stable@dpdk.org Signed-off-by: Rahul Bhansali --- Changes in v2: No change drivers/common/cnxk/roc_nix_inl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c index de8fd2a605..a205c658e9 100644 --- a/drivers/common/cnxk/roc_nix_inl.c +++ b/drivers/common/cnxk/roc_nix_inl.c @@ -933,7 +933,8 @@ roc_nix_inl_inb_init(struct roc_nix *roc_nix) inl_dev = idev->nix_inl_dev; roc_nix->custom_meta_aura_ena = (roc_nix->local_meta_aura_ena && - (inl_dev->is_multi_channel || roc_nix->custom_sa_action)); + ((inl_dev && inl_dev->is_multi_channel) || + roc_nix->custom_sa_action)); if (!roc_model_is_cn9k() && !roc_errata_nix_no_meta_aura()) { nix->need_meta_aura = true; if (!roc_nix->local_meta_aura_ena || roc_nix->custom_meta_aura_ena) -- 2.25.1