From: Hemant Agrawal Subject: [PATCH 4/6] net/dpaa2: add support for 16 Rx Queues per traffic class Date: Fri, 22 Feb 2019 11:16:02 +0000 Message-ID: <20190222111440.30530-4-hemant.agrawal@nxp.com> References: <20190222111440.30530-1-hemant.agrawal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: "ferruh.yigit@intel.com" , Shreyansh Jain , Ashish Jain To: "dev@dpdk.org" Return-path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50064.outbound.protection.outlook.com [40.107.5.64]) by dpdk.org (Postfix) with ESMTP id D69892C30 for ; Fri, 22 Feb 2019 12:16:03 +0100 (CET) In-Reply-To: <20190222111440.30530-1-hemant.agrawal@nxp.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Ashish Jain Adding support for 16 queues per TC per DPNI port which is required for LX2 platform. Signed-off-by: Ashish Jain --- 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_eth= dev.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 =3D 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) =20 PMD_INIT_FUNC_TRACE(); =20 + num_rxqueue_per_tc =3D (priv->nb_rx_queues / priv->num_rx_tc); tot_queues =3D priv->nb_rx_queues + priv->nb_tx_queues; mc_q =3D 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 =3D 0; for (dist_idx =3D 0; dist_idx < priv->nb_rx_queues; dist_idx++) { mcq =3D (struct dpaa2_queue *)priv->rx_vq[vq_id]; - mcq->tc_index =3D DPAA2_DEF_TC; - mcq->flow_id =3D dist_idx; + mcq->tc_index =3D dist_idx / num_rxqueue_per_tc; + mcq->flow_id =3D dist_idx % num_rxqueue_per_tc; vq_id++; } =20 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_eth= dev.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*/ =20 #define MAX_TCS DPNI_MAX_TC -#define MAX_RX_QUEUES 16 +#define MAX_RX_QUEUES 128 #define MAX_TX_QUEUES 16 =20 /*default tc to be used for ,congestion, distribution etc configuration. *= / --=20 2.17.1