DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	Shreyansh Jain <shreyansh.jain@nxp.com>,
	Ashish Jain <ashish.jain@nxp.com>
Subject: [dpdk-dev] [PATCH 4/6] net/dpaa2: add support for 16 Rx Queues per traffic class
Date: Fri, 22 Feb 2019 11:16:02 +0000	[thread overview]
Message-ID: <20190222111440.30530-4-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <20190222111440.30530-1-hemant.agrawal@nxp.com>

From: Ashish Jain <ashish.jain@nxp.com>

Adding support for 16 queues per TC per DPNI port
which is required for LX2 platform.

Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 6 ++++--
 drivers/net/dpaa2/dpaa2_ethdev.h | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 0ab43cadf..f8c2983b9 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -266,6 +266,7 @@ dpaa2_alloc_rx_tx_queues(struct rte_eth_dev *dev)
 	struct dpaa2_dev_priv *priv = dev->data->dev_private;
 	uint16_t dist_idx;
 	uint32_t vq_id;
+	uint8_t num_rxqueue_per_tc;
 	struct dpaa2_queue *mc_q, *mcq;
 	uint32_t tot_queues;
 	int i;
@@ -273,6 +274,7 @@ dpaa2_alloc_rx_tx_queues(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
+	num_rxqueue_per_tc = (priv->nb_rx_queues / priv->num_rx_tc);
 	tot_queues = priv->nb_rx_queues + priv->nb_tx_queues;
 	mc_q = rte_malloc(NULL, sizeof(struct dpaa2_queue) * tot_queues,
 			  RTE_CACHE_LINE_SIZE);
@@ -311,8 +313,8 @@ dpaa2_alloc_rx_tx_queues(struct rte_eth_dev *dev)
 	vq_id = 0;
 	for (dist_idx = 0; dist_idx < priv->nb_rx_queues; dist_idx++) {
 		mcq = (struct dpaa2_queue *)priv->rx_vq[vq_id];
-		mcq->tc_index = DPAA2_DEF_TC;
-		mcq->flow_id = dist_idx;
+		mcq->tc_index = dist_idx / num_rxqueue_per_tc;
+		mcq->flow_id = dist_idx % num_rxqueue_per_tc;
 		vq_id++;
 	}
 
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index 313cbe4bf..13259be7d 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -20,7 +20,7 @@
 #define DPAA2_MAX_RX_PKT_LEN  10240 /*WRIOP support*/
 
 #define MAX_TCS			DPNI_MAX_TC
-#define MAX_RX_QUEUES		16
+#define MAX_RX_QUEUES		128
 #define MAX_TX_QUEUES		16
 
 /*default tc to be used for ,congestion, distribution etc configuration. */
-- 
2.17.1

  parent reply	other threads:[~2019-02-22 11:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 11:15 [dpdk-dev] [PATCH 1/6] net/dpaa2: add support for VLAN tpid config Hemant Agrawal
2019-02-22 11:15 ` [dpdk-dev] [PATCH 2/6] mempool/dpaa2: fix to reduce continuous print on empty pool Hemant Agrawal
2019-02-22 11:16 ` [dpdk-dev] [PATCH 3/6] bus/fslmc: add enqueue response read routines in qbman Hemant Agrawal
2019-02-22 11:16 ` Hemant Agrawal [this message]
2019-02-22 11:16 ` [dpdk-dev] [PATCH 5/6] net/dpaa2: support low level loopback tester Hemant Agrawal
2019-02-22 11:16 ` [dpdk-dev] [PATCH 6/6] net/dpaa2: add basic support for generic flow Hemant Agrawal
2019-02-27  9:30 ` [dpdk-dev] [PATCH 1/6] net/dpaa2: add support for VLAN tpid config Ferruh Yigit

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=20190222111440.30530-4-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=ashish.jain@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=shreyansh.jain@nxp.com \
    /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).