> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> Sasha Levin
> Sent: Tuesday, May 6, 2025 1:06 AM
> To: [email protected]; [email protected]
> Cc: Michal Swiatkowski <[email protected]>; Keller, Jacob E
> <[email protected]>; Pucha Himasekhar Reddy
> <[email protected]>; Nguyen, Anthony L
> <[email protected]>; Sasha Levin <[email protected]>; Kitszel,
> Przemyslaw <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]
> Subject: [Intel-wired-lan] [PATCH AUTOSEL 6.1 194/212] ice: count combined
> queues using Rx/Tx count
> 
> From: Michal Swiatkowski <[email protected]>
> 
> [ 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 <[email protected]>
> Tested-by: Pucha Himasekhar Reddy <[email protected]>
> Signed-off-by: Michal Swiatkowski <[email protected]>
> Signed-off-by: Tony Nguyen <[email protected]>
> Signed-off-by: Sasha Levin <[email protected]>
Reviewed-by: Aleksandr Loktionov <[email protected]>

> ---
>  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 a163e7717a534..1f62d11831567 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> @@ -3373,8 +3373,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

Reply via email to