DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wei Zhao <wei.zhao1@intel.com>
To: dev@dpdk.org
Cc: Wei Zhao <wei.zhao1@intel.com>
Subject: [dpdk-dev] [PATCH] net/i40e: fix queue number error in queue region
Date: Tue, 24 Oct 2017 16:45:10 +0800	[thread overview]
Message-ID: <1508834710-23801-1-git-send-email-wei.zhao1@intel.com> (raw)

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

             reply	other threads:[~2017-10-24  8:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24  8:45 Wei Zhao [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1508834710-23801-1-git-send-email-wei.zhao1@intel.com \
    --to=wei.zhao1@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).