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 996C527BF8D; Tue, 27 May 2025 17:49:10 +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=1748368150; cv=none; b=fUlxovdOSnCw4QmmNp0BdmDv9EhB7lN9BUTlyUTo4OpHP79+1v78dmDJuUzpZOw+92kLkIefU/EOgyQX9pkzMlAbsNasfS41zK4f28PhmRuTgn4O2945/tWKWppPoC2h9BYlMXnRQVjNRPswykMFIpnuFGeKTq5RvS1KHXVZXFo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748368150; c=relaxed/simple; bh=4E/PF3bIqFsdkI6q5yNZ2RtESvoxW/kc0fJXeQmdrUo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DpN6WWWf+hOJAOc3HrCWLZCxG5okoyt3PfgPwgufC7H6haryeXvif2O060rjEEnvKRJwqhQhTcXLNU8YoI56rQ5bdEsw5rHGRzPwWMhrwMAykZ7l6KYOnS7aEbHBL2W4sMq1EkbUJDySGEB7noS1v7lcoSWM62dNpMu7/52rU60= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=q5bxmOBl; 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="q5bxmOBl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0921CC4CEE9; Tue, 27 May 2025 17:49:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748368150; bh=4E/PF3bIqFsdkI6q5yNZ2RtESvoxW/kc0fJXeQmdrUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q5bxmOBl0m5wc5tkGbT162tUKs2OUjIdHEe8juAyv841Koit4dfHszYLwJ5/4r0Nz 9B65IcrRgfnkYYzT46vUEfGzoiOA1RkShuS9YQ8m3M1j8EYe5fb9M/GCvXXac3VuBk j6XwmbesMYpbpzzIUPWpH9WaDg4rHticlCQrBD7g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jacob Keller , Pucha Himasekhar Reddy , Michal Swiatkowski , Tony Nguyen , Sasha Levin Subject: [PATCH 6.14 574/783] ice: count combined queues using Rx/Tx count Date: Tue, 27 May 2025 18:26:11 +0200 Message-ID: <20250527162536.522089276@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250527162513.035720581@linuxfoundation.org> References: <20250527162513.035720581@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 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michal Swiatkowski [ Upstream commit c3a392bdd31adc474f1009ee85c13fdd01fe800d ] Previous implementation assumes that there is 1:1 matching between vectors and queues. It isn't always true. Get minimum value from Rx/Tx queues to determine combined queues number. Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy Signed-off-by: Michal Swiatkowski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c index f241493a6ac88..6bbb304ad9ab7 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c @@ -3817,8 +3817,7 @@ static u32 ice_get_combined_cnt(struct ice_vsi *vsi) ice_for_each_q_vector(vsi, q_idx) { struct ice_q_vector *q_vector = vsi->q_vectors[q_idx]; - if (q_vector->rx.rx_ring && q_vector->tx.tx_ring) - combined++; + combined += min(q_vector->num_ring_tx, q_vector->num_ring_rx); } return combined; -- 2.39.5