DPDK patches and discussions
 help / color / mirror / Atom feed
From: Helin Zhang <helin.zhang@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3 1/2] i40e: adjust the number of queues for RSS
Date: Tue,  3 Nov 2015 23:40:27 +0800	[thread overview]
Message-ID: <1446565228-24276-2-git-send-email-helin.zhang@intel.com> (raw)
In-Reply-To: <1446565228-24276-1-git-send-email-helin.zhang@intel.com>

It adjusts the number of queues for RSS from power of 2 to any as
long as it does not exceeds the hardware allowed.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c    | 8 ++++----
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index d852bf1..66dfdba 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -5729,12 +5729,12 @@ i40e_pf_config_rss(struct i40e_pf *pf)
 	 * If both VMDQ and RSS enabled, not all of PF queues are configured.
 	 * It's necessary to calulate the actual PF queues that are configured.
 	 */
-	if (pf->dev_data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG) {
+	if (pf->dev_data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG)
 		num = i40e_pf_calc_configured_queues_num(pf);
-		num = i40e_align_floor(num);
-	} else
-		num = i40e_align_floor(pf->dev_data->nb_rx_queues);
+	else
+		num = pf->dev_data->nb_rx_queues;
 
+	num = RTE_MIN(num, I40E_MAX_Q_PER_TC);
 	PMD_INIT_LOG(INFO, "Max of contiguous %u PF queues are configured",
 			num);
 
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 57ea8b6..7986fc0 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2169,7 +2169,7 @@ i40evf_config_rss(struct i40e_vf *vf)
 		return 0;
 	}
 
-	num = i40e_align_floor(vf->dev_data->nb_rx_queues);
+	num = RTE_MIN(vf->dev_data->nb_rx_queues, I40E_MAX_QP_NUM_PER_VF);
 	/* Fill out the look up table */
 	for (i = 0, j = 0; i < nb_q; i++, j++) {
 		if (j >= num)
-- 
1.9.3

  reply	other threads:[~2015-11-03 15:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-20 14:51 [dpdk-dev] [PATCH 0/2] i40e: enlarge the number of supported queues Helin Zhang
2015-09-20 14:51 ` [dpdk-dev] [PATCH 1/2] i40e: adjust the number of queues for RSS Helin Zhang
2015-09-20 14:51 ` [dpdk-dev] [PATCH 2/2] i40e: Enlarge the number of supported queues Helin Zhang
2015-09-21  7:41   ` David Marchand
2015-09-21  8:15     ` Zhang, Helin
2015-09-22  6:36     ` Zhang, Helin
2015-10-19  8:29   ` Wu, Jingjing
2015-10-19  8:37     ` Zhang, Helin
2015-10-22  7:28 ` [dpdk-dev] [PATCH v2 0/2] " Helin Zhang
2015-10-22  7:28   ` [dpdk-dev] [PATCH v2 1/2] i40e: adjust the number of queues for RSS Helin Zhang
2015-10-22  7:28   ` [dpdk-dev] [PATCH v2 2/2] i40e: Enlarge the number of supported queues Helin Zhang
2015-11-03  1:16     ` Thomas Monjalon
2015-11-03  2:49       ` Zhang, Helin
2015-10-22 15:36   ` [dpdk-dev] [PATCH v2 0/2] " Wu, Jingjing
2015-11-03 15:40   ` [dpdk-dev] [PATCH v3 " Helin Zhang
2015-11-03 15:40     ` Helin Zhang [this message]
2015-11-03 15:40     ` [dpdk-dev] [PATCH v3 2/2] " Helin Zhang
2015-11-03 21:59     ` [dpdk-dev] [PATCH v3 0/2] " Thomas Monjalon
2015-11-04 14:54     ` Traynor, Kevin
2015-11-05  0:39       ` Zhang, Helin

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=1446565228-24276-2-git-send-email-helin.zhang@intel.com \
    --to=helin.zhang@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).