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 24FC6489BA for ; Thu, 23 Oct 2025 19:28:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18C7E40A4B; Thu, 23 Oct 2025 19:28:24 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 430C640A76; Thu, 23 Oct 2025 19:28:22 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 59N3ck2f021882; Thu, 23 Oct 2025 10:28:21 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=C nxMGWRp5RUNg0cJXcwtAnVQ8Z8g19VKQD/5zx7mx3s=; b=GVI68H8HORsCWzr/P +95kyrTlimtcfy8R0Qp6Cdff1hZIeJVfo7YivkIVZIB+ylQR2Tnf1hTIrgwX7lKO FV0YnHUxW0vOmcoFusdoHQGAfww+V0m3Ex4BZ2qPRzvwaSSnT2CnXpaX2z5q19QV 6H0JRp8eti6aghZzkX+lSp7b0UyN6lYbCsPLctapqtVrThdg0bdB0U5/YXvZxyg4 yN6jwRHfX6YidHQb44rjZ+xIHWMx3eUnE7X2i0Pk9Ye9bUE1bQtnoIXYpMrYI6yk STpfxJSBqgjrBxyW84d37tkLmsgf8Si+zxFLks4yxR4ifDWUUHInMkK6nJ61LUA/ ZdF7Q== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 49ycmr1w8r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Oct 2025 10:28:21 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.25; Thu, 23 Oct 2025 10:28:19 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.25 via Frontend Transport; Thu, 23 Oct 2025 10:28:19 -0700 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 4BE1B3F7068; Thu, 23 Oct 2025 10:28:17 -0700 (PDT) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra CC: , , Subject: [PATCH v3 16/19] common/cnxk: fix null SQ access Date: Thu, 23 Oct 2025 22:57:24 +0530 Message-ID: <20251023172728.770661-16-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251023172728.770661-1-ndabilpuram@marvell.com> References: <20250901073036.1381560-1-ndabilpuram@marvell.com> <20251023172728.770661-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: l0Haev7VYNti3qrL-GUZZ30myp7qAWZG X-Proofpoint-GUID: l0Haev7VYNti3qrL-GUZZ30myp7qAWZG X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDIzMDAzMCBTYWx0ZWRfX2hMUbrckkRTS UBBdikRA7nl915vtxfSVfHAZYzxhm9KqhaTIVp+etdc/CarHuHTNvo+sXO5PyeUk0aIeR70+rLQ nWNjRdibOxTuPn9ptuY2sJp24VE6Giq8lXjuwtWYwT+SM3GGuK/VR57QWUZzdd3lprviQ9lS3hi nkJ9U/J/DJJma2t35hOIxfA4RE0gPrdDpQk5ve57DnzpnwSKSYD2O6p1bpM3FD8SQ73OuXD1uBc I1s4GZynjVHUQlU4PsyYrSptMkn5sqAkdaU9ElSqAkaaiOebdDwM3P85DMioKYkYUjQBEKlEVqz /QybuKRz4+qScFP7RqeIxLIGcfAi3oJApNRMbpG1aQ8aL5LNdGlEXDbXdgjODPCHuhn0BZSO7w0 q9iDSkDCN2TWJqYokU00THNl+VjENg== X-Authority-Analysis: v=2.4 cv=CtSys34D c=1 sm=1 tr=0 ts=68fa65b5 cx=c_pps a=gIfcoYsirJbf48DBMSPrZA==:117 a=gIfcoYsirJbf48DBMSPrZA==:17 a=x6icFKpwvdMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=M5GUcnROAAAA:8 a=8rWy6zfcAAAA:8 a=aJDCPxk_WUJAfcRIQEIA:9 a=OBjm3rFKGHvpk9ecZwUJ:22 a=YjdVzJdQTyZRADMV7wFX:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-23_01,2025-10-22_01,2025-03-28_01 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 From: Satha Rao Condition to check SQ is non NULL before access. Also pktio locks are simplified while doing threshold_profile config. Fixes: 90a903ffa6eb ("common/cnxk: split NIX TM hierarchy enable API") Cc: stable@dpdk.org Signed-off-by: Satha Rao --- drivers/common/cnxk/roc_nix_tm_ops.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c index 09d014a276..230e9b72f6 100644 --- a/drivers/common/cnxk/roc_nix_tm_ops.c +++ b/drivers/common/cnxk/roc_nix_tm_ops.c @@ -624,6 +624,13 @@ roc_nix_tm_hierarchy_xmit_enable(struct roc_nix *roc_nix, enum roc_nix_tm_tree t sq_id = node->id; sq = nix->sqs[sq_id]; + if (!sq) { + plt_err("nb_rxq %d nb_txq %d sq_id %d lvl %d", nix->nb_rx_queues, + nix->nb_tx_queues, sq_id, node->lvl); + roc_nix_tm_dump(roc_nix, NULL); + roc_nix_dump(roc_nix, NULL); + return NIX_ERR_TM_INVALID_NODE; + } rc = roc_nix_sq_ena_dis(sq, true); if (rc) { plt_err("TM sw xon failed on SQ %u, rc=%d", node->id, -- 2.34.1