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 ABEE22EB5BD; Tue, 15 Jul 2025 13:37:46 +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=1752586666; cv=none; b=p4QCy64WZ54js/3/N1a+a4xslMzZy6Vqbd6TPuoMm6kxNRP3u4AK45uoEImOBJa5WiJ1wugQ4cvFPVzgZGStXwsw+5BeWR/ZMihBohkRaIAAoAF+QJNCvUcuuXwwNczYc545GRbXLxoEpTRCuxVlQEf84TEF6Q42jS5vjRxp96s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752586666; c=relaxed/simple; bh=kGT8+hBde/qYgtqHcKRvJbuQRxsSGn4JeWi4ZwkZkQg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M3u1Vs6UK3dHe0AZQFFmyxPzKTZPKihpbUzo64ua8R0ijBoTGcCiTl5SXpdEQb9Od40+GSpVFhwiQYA1fh7zxoDtKH0okc0e54AKmwBoNwT0Bf8PwwZkY+LQWmMG8NIkUvs1cJJqABegcBDTcN+RMT7jZWhkOoTpKgfrLGpD7CY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=scLkBsuS; 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="scLkBsuS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 334FEC4CEF1; Tue, 15 Jul 2025 13:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752586666; bh=kGT8+hBde/qYgtqHcKRvJbuQRxsSGn4JeWi4ZwkZkQg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=scLkBsuSdo7jBPQRtEIS3oeJsQpUBDxITmi+j33AXisd460d0h2FxML79psbThjBI VskBCBx0icjPEzYjzxVSIafWEa3Un5MPUb9ThEZTZPMNb/NkJaZlwcefdaJFnYVRIC chigo9cIZ1Ab75qp/9+wWC8Os00+O+YXRYTCQOtc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sreekanth Reddy , Shravya KN , Michael Chan , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.4 139/148] bnxt_en: Fix DCB ETS validation Date: Tue, 15 Jul 2025 15:14:21 +0200 Message-ID: <20250715130805.849441835@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250715130800.293690950@linuxfoundation.org> References: <20250715130800.293690950@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shravya KN [ Upstream commit b74c2a2e9cc471e847abd87e50a2354c07e02040 ] In bnxt_ets_validate(), the code incorrectly loops over all possible traffic classes to check and add the ETS settings. Fix it to loop over the configured traffic classes only. The unconfigured traffic classes will default to TSA_ETS with 0 bandwidth. Looping over these unconfigured traffic classes may cause the validation to fail and trigger this error message: "rejecting ETS config starving a TC\n" The .ieee_setets() will then fail. Fixes: 7df4ae9fe855 ("bnxt_en: Implement DCBNL to support host-based DCBX.") Reviewed-by: Sreekanth Reddy Signed-off-by: Shravya KN Signed-off-by: Michael Chan Link: https://patch.msgid.link/20250710213938.1959625-2-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c index b1511bcffb1bb..5e6305f8220f6 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c @@ -454,7 +454,9 @@ static int bnxt_ets_validate(struct bnxt *bp, struct ieee_ets *ets, u8 *tc) if ((ets->tc_tx_bw[i] || ets->tc_tsa[i]) && i > bp->max_tc) return -EINVAL; + } + for (i = 0; i < max_tc; i++) { switch (ets->tc_tsa[i]) { case IEEE_8021QAZ_TSA_STRICT: break; -- 2.39.5