diff mbox series

[net-next,v2,1/9] ice: count combined queues using Rx/Tx count

Message ID 20250205185512.895887-2-anthony.l.nguyen@intel.com (mailing list archive)
State Accepted
Commit c3a392bdd31adc474f1009ee85c13fdd01fe800d
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v2,1/9] ice: count combined queues using Rx/Tx count | expand

Checks

Context Check Description
netdev/series_format warning Series does not have a cover letter
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 2 this patch: 2
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 55 this patch: 55
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-02-06--00-00 (tests: 891)

Commit Message

Tony Nguyen Feb. 5, 2025, 6:55 p.m. UTC
From: Michal Swiatkowski <michal.swiatkowski@linux.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@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 7, 2025, 1:50 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Tony Nguyen <anthony.l.nguyen@intel.com>:

On Wed,  5 Feb 2025 10:55:01 -0800 you wrote:
> From: Michal Swiatkowski <michal.swiatkowski@linux.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.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/9] ice: count combined queues using Rx/Tx count
    https://git.kernel.org/netdev/net-next/c/c3a392bdd31a
  - [net-next,v2,2/9] ice: devlink PF MSI-X max and min parameter
    https://git.kernel.org/netdev/net-next/c/b2657259fce9
  - [net-next,v2,3/9] ice: remove splitting MSI-X between features
    https://git.kernel.org/netdev/net-next/c/79d97b8cf9a8
  - [net-next,v2,4/9] ice: get rid of num_lan_msix field
    https://git.kernel.org/netdev/net-next/c/ad61cd9c67ad
  - [net-next,v2,5/9] ice, irdma: move interrupts code to irdma
    https://git.kernel.org/netdev/net-next/c/3e0d3cb3fbe0
  - [net-next,v2,6/9] ice: treat dyn_allowed only as suggestion
    https://git.kernel.org/netdev/net-next/c/a8c2d3932c11
  - [net-next,v2,7/9] ice: enable_rdma devlink param
    https://git.kernel.org/netdev/net-next/c/87181cd6985f
  - [net-next,v2,8/9] ice: simplify VF MSI-X managing
    https://git.kernel.org/netdev/net-next/c/a203163274a4
  - [net-next,v2,9/9] ice: init flow director before RDMA
    https://git.kernel.org/netdev/net-next/c/d67627e7b532

You are awesome, thank you!
diff mbox series

Patch

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;