All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/i40e: fix queue number error in queue region
@ 2017-10-24  8:45 Wei Zhao
  2017-10-24 21:00 ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Zhao @ 2017-10-24  8:45 UTC (permalink / raw)
  To: dev; +Cc: 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")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 4881ea0..909368d 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net/i40e: fix queue number error in queue region
  2017-10-24  8:45 [PATCH] net/i40e: fix queue number error in queue region Wei Zhao
@ 2017-10-24 21:00 ` Ferruh Yigit
  2017-10-24 21:11   ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2017-10-24 21:00 UTC (permalink / raw)
  To: Wei Zhao, dev

On 10/24/2017 1:45 AM, Wei Zhao wrote:
> 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")
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net/i40e: fix queue number error in queue region
  2017-10-24 21:00 ` Ferruh Yigit
@ 2017-10-24 21:11   ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2017-10-24 21:11 UTC (permalink / raw)
  To: Wei Zhao, dev

On 10/24/2017 2:00 PM, Ferruh Yigit wrote:
> On 10/24/2017 1:45 AM, Wei Zhao wrote:
>> 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")
>>
>> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] net/i40e: fix queue number error in queue region
@ 2017-10-24  8:41 Wei Zhao
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Zhao @ 2017-10-24  8:41 UTC (permalink / raw)
  To: dev; +Cc: root, Wei Zhao

From: root <root@dpdk4.bj.intel.com>

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")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 4881ea0..909368d 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-24 21:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-24  8:45 [PATCH] net/i40e: fix queue number error in queue region Wei Zhao
2017-10-24 21:00 ` Ferruh Yigit
2017-10-24 21:11   ` Ferruh Yigit
  -- strict thread matches above, loose matches on Subject: below --
2017-10-24  8:41 Wei Zhao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.