aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_ethtool.c
diff options
context:
space:
mode:
authorMichal Swiatkowski <[email protected]>2024-12-03 06:58:09 +0000
committerTony Nguyen <[email protected]>2025-02-04 23:08:57 +0000
commitc3a392bdd31adc474f1009ee85c13fdd01fe800d (patch)
treed4f6e619f25452820a6e13ed42a20c78c71c429a /drivers/net/ethernet/intel/ice/ice_ethtool.c
parentMerge tag 'net-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff)
downloadkernel-c3a392bdd31adc474f1009ee85c13fdd01fe800d.tar.gz
kernel-c3a392bdd31adc474f1009ee85c13fdd01fe800d.zip
ice: count combined queues using Rx/Tx count
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 <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> Signed-off-by: Michal Swiatkowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_ethtool.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_ethtool.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index f241493a6ac8..6bbb304ad9ab 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;