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 1F220438FB for ; Fri, 19 Jan 2024 06:58:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1146541153; Fri, 19 Jan 2024 06:58:02 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id A5E7A4026F; Fri, 19 Jan 2024 06:57:58 +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 40J4TfYp019324; Thu, 18 Jan 2024 21:57:57 -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=LRxr+GqHiPrFyZUzMckNXSmNdvwgDdivSsy52cvvQLQ=; b=QKp PIcoLPI37CpZwzFzzeS9SWFWKAjanhCbdaWoR5oP2+IribyP6vPuCbFRpSZ2+rCe jEkUTtIgVqVhtR8CUv60h59CmtVI0/dZzTLHWZQ+mZASvdkwSXhi+InAOBO7ADqb GKbHb4p+BVNHqamaawvdgNEkS+9KEwO00KP2EeF7QbMhQmzsbYddZUNhmKAvw4Ak uKrNcCqc1/nMBYrVi1zP5+3vSVApRcZLlWFfM8EZw2VU5BsYUBlFt+CT4w5RAHh2 Gch9vpJ2DbiEh4+wcwmhmL/LzT+kFz0hpCWe+91UHSGtmSrfCFNwm7+defoma6b3 mU8qiO45et9x5KUfnVw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3vpxqfvvab-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 18 Jan 2024 21:57:57 -0800 (PST) Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 18 Jan 2024 21:57:55 -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, 18 Jan 2024 21:57:55 -0800 Received: from localhost.localdomain (unknown [10.28.36.158]) by maili.marvell.com (Postfix) with ESMTP id 6C5583F7088; Thu, 18 Jan 2024 21:57:53 -0800 (PST) From: Rahul Bhansali To: , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Rahul Bhansali CC: Subject: [PATCH 3/5] common/cnxk: fix for inline dev pointer check Date: Fri, 19 Jan 2024 11:27:19 +0530 Message-ID: <20240119055721.1750399-3-rbhansali@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240119055721.1750399-1-rbhansali@marvell.com> References: <20240119055721.1750399-1-rbhansali@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: F4_zL46D8Od3mPuX1ogibv52Vpwxwpr2 X-Proofpoint-GUID: F4_zL46D8Od3mPuX1ogibv52Vpwxwpr2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-19_02,2024-01-17_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 --- 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