Skip to contentSkip to conversation

net/i40e: fix queue number error in queue region

PATCH Applied Wei Zhao 2 participants 3 messages Oct 24, 2017 Network drivers

lore
Share & tools
lore

Wei Zhao

author
#0 lore raw

PATCH 1/1 net/i40e: fix queue number error in queue region

when VSI is enabled with smaller number of queues, for example, 1 or 6, it will cause error.64 is the max number of queues that can be used for RSS, but VSI might be created with only few queues.

Fixes 7cbecc2f742 ("net/i40e: support queue region set and flush")
---
 drivers/net/i40e/rte_pmd_i40e.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/i40e/rte_pmd_i40e.c +2 -1
index 4881ea0..909368d 100644
@@ -2825,6 +2825,7 @@ i40e_flush_queue_region_all_conf(struct rte_eth_dev *dev,
 {
 	int32_t ret = -EINVAL;
 	struct i40e_queue_regions *info = &pf->queue_region;
+	struct i40e_vsi *main_vsi = pf->main_vsi;
 
 	if (on) {
 		i40e_queue_region_pf_flowtype_conf(hw, pf);
@@ -2845,7 +2846,7 @@ i40e_flush_queue_region_all_conf(struct rte_eth_dev *dev,
 	}
 
 	info->queue_region_number = 1;
-	info->region[0].queue_num = 64;
+	info->region[0].queue_num = main_vsi->nb_used_qps;
 	info->region[0].queue_start_index = 0;
 
 	ret = i40e_vsi_update_queue_region_mapping(hw, pf);
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Wei Zhao

when VSI is enabled with smaller number of queues, for example, 1 or 6, it will cause error.64 is the max number of queues that can be used for RSS, but VSI might be created with only few queues.

Fixes 7cbecc2f742 ("net/i40e: support queue region set and flush")

This implements the discussion on:
http://dpdk.org/ml/archives/dev/2017-October/079599.html

Applied
#2 lore raw
Quoted 11 lines · Ferruh Yigit
Quoted 8 lines · Wei Zhao

when VSI is enabled with smaller number of queues, for example, 1 or 6, it will cause error.64 is the max number of queues that can be used for RSS, but VSI might be created with only few queues.

Fixes 7cbecc2f742 ("net/i40e: support queue region set and flush")

Applied to dpdk-next-net/master, thanks.

Quoted 3 lines

This implements the discussion on:
http://dpdk.org/ml/archives/dev/2017-October/079599.html