[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250205185512.895887-2-anthony.l.nguyen@intel.com>
Date: Wed, 5 Feb 2025 10:55:01 -0800
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: davem@...emloft.net,
kuba@...nel.org,
pabeni@...hat.com,
edumazet@...gle.com,
andrew+netdev@...n.ch,
netdev@...r.kernel.org
Cc: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
anthony.l.nguyen@...el.com,
sridhar.samudrala@...el.com,
jacob.e.keller@...el.com,
pio.raczynski@...il.com,
konrad.knitter@...el.com,
marcin.szycik@...el.com,
nex.sw.ncis.nat.hpm.dev@...el.com,
przemyslaw.kitszel@...el.com,
jiri@...nulli.us,
horms@...nel.org,
David.Laight@...LAB.COM,
pmenzel@...gen.mpg.de,
mschmidt@...hat.com,
tatyana.e.nikolova@...el.com,
Jason Gunthorpe <jgg@...pe.ca>,
Leon Romanovsky <leon@...nel.org>,
linux-rdma@...r.kernel.org
Subject: [PATCH net-next v2 1/9] ice: count combined queues using Rx/Tx count
From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
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 <jacob.e.keller@...el.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
---
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 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;
--
2.47.1
Powered by blists - more mailing lists