From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FFA4221FC7; Mon, 23 Jun 2025 21:39:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750714777; cv=none; b=Qu4WHZju4Q5nA7P4Y66svUKY5fIsVlRKp3ghY/t9gaxqTmI1LfsCe+Yu2NC8Fz1H56BAeXEvlhIwLWkfbyC5mSQre6zcS94+dqZb+HOxIlls5T9+521AQ1t3eUoO/i8XCTouEylBj89cW0dUl35Wiswog8JsUgPhINdTozdLeOY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750714777; c=relaxed/simple; bh=08V6iBuTaesFZvRS310YHXSqr3yZZFHkT+9OWGr5Tgc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b/7I+r9OwGFbC7hkgP9b9vgss2rPFx0Zl+1eePPCvxz1x9URqZ2qQut+pdoXBS1KxjpxB3lJKmr1J1OA3kAMbhD/3GSyfG2Az9fl2Z/wxiLhRvuktiqZGt9m546QLknMzDNvh+Raz2dXLaVjL/NhhnWoILGBkgvKIqWYlKr4TLQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xiIU9Qin; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="xiIU9Qin" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFCAAC4CEEA; Mon, 23 Jun 2025 21:39:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750714777; bh=08V6iBuTaesFZvRS310YHXSqr3yZZFHkT+9OWGr5Tgc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xiIU9QinvhzhZmVf6OLEenV282NmBMeOh75UKgwg0QAR2kVH9jceI20FSsADmq6lg gVSNOeL3ulWW2322lBZbPmML+3i25lIgVZr5UgqRK4zv/xQILdHUbIkVuMasthrXxP GiEvBG9Uwjp+UM65KHPczLT0t80SMgVwmefVDi3Y= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wentao Liang , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.15 415/592] octeontx2-pf: Add error log forcn10k_map_unmap_rq_policer() Date: Mon, 23 Jun 2025 15:06:13 +0200 Message-ID: <20250623130710.309728222@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130700.210182694@linuxfoundation.org> References: <20250623130700.210182694@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wentao Liang [ Upstream commit 9c056ec6dd1654b1420dafbbe2a69718850e6ff2 ] The cn10k_free_matchall_ipolicer() calls the cn10k_map_unmap_rq_policer() for each queue in a for loop without checking for any errors. Check the return value of the cn10k_map_unmap_rq_policer() function during each loop, and report a warning if the function fails. Signed-off-by: Wentao Liang Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250408032602.2909-1-vulab@iscas.ac.cn Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c index c3b6e0f60a799..7f6a435ac6806 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c @@ -357,9 +357,12 @@ int cn10k_free_matchall_ipolicer(struct otx2_nic *pfvf) mutex_lock(&pfvf->mbox.lock); /* Remove RQ's policer mapping */ - for (qidx = 0; qidx < hw->rx_queues; qidx++) - cn10k_map_unmap_rq_policer(pfvf, qidx, - hw->matchall_ipolicer, false); + for (qidx = 0; qidx < hw->rx_queues; qidx++) { + rc = cn10k_map_unmap_rq_policer(pfvf, qidx, hw->matchall_ipolicer, false); + if (rc) + dev_warn(pfvf->dev, "Failed to unmap RQ %d's policer (error %d).", + qidx, rc); + } rc = cn10k_free_leaf_profile(pfvf, hw->matchall_ipolicer); -- 2.39.5