DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2 1/9] net/dpaa: support Rxq and Txq info routines
@ 2020-07-10 17:19 Hemant Agrawal
  2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 2/9] net/dpaa: add support for fmlib in dpdk Hemant Agrawal
                   ` (8 more replies)
  0 siblings, 9 replies; 81+ messages in thread
From: Hemant Agrawal @ 2020-07-10 17:19 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Hemant Agrawal

This patch add support for rxq_info_get and txq_info_get

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/include/fsl_qman.h |  3 ++
 drivers/net/dpaa/dpaa_ethdev.c      | 51 +++++++++++++++++++++++++++--
 2 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index 0d9cfc339..8ba37411a 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -1251,6 +1251,9 @@ struct qman_fq {
 	void **qman_fq_lookup_table;
 	u32 key;
 #endif
+	u16 nb_desc;
+	u16 resv;
+	u64 offloads;
 };
 
 /*
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index ea178f4d4..c15e2b546 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -748,6 +748,8 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		DPAA_PMD_ERR("%p:Rx deferred start not supported", (void *)dev);
 		return -EINVAL;
 	}
+	rxq->nb_desc = UINT16_MAX;
+	rxq->offloads = rx_conf->offloads;
 
 	DPAA_PMD_INFO("Rx queue setup for queue index: %d fq_id (0x%x)",
 			queue_idx, rxq->fqid);
@@ -895,6 +897,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	if (dpaa_intf->cgr_rx) {
 		struct qm_mcc_initcgr cgr_opts = {0};
 
+		rxq->nb_desc = nb_desc;
 		/* Enable tail drop with cgr on this queue */
 		qm_cgr_cs_thres_set64(&cgr_opts.cgr.cs_thres, nb_desc, 0);
 		ret = qman_modify_cgr(dpaa_intf->cgr_rx, 0, &cgr_opts);
@@ -1015,6 +1018,7 @@ int dpaa_eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		const struct rte_eth_txconf *tx_conf)
 {
 	struct dpaa_if *dpaa_intf = dev->data->dev_private;
+	struct qman_fq *txq = &dpaa_intf->tx_queues[queue_idx];
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1023,6 +1027,9 @@ int dpaa_eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		DPAA_PMD_ERR("%p:Tx deferred start not supported", (void *)dev);
 		return -EINVAL;
 	}
+	txq->nb_desc = UINT16_MAX;
+	txq->offloads = tx_conf->offloads;
+
 	if (queue_idx >= dev->data->nb_tx_queues) {
 		rte_errno = EOVERFLOW;
 		DPAA_PMD_ERR("%p: queue index out of range (%u >= %u)",
@@ -1031,8 +1038,8 @@ int dpaa_eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	}
 
 	DPAA_PMD_INFO("Tx queue setup for queue index: %d fq_id (0x%x)",
-			queue_idx, dpaa_intf->tx_queues[queue_idx].fqid);
-	dev->data->tx_queues[queue_idx] = &dpaa_intf->tx_queues[queue_idx];
+			queue_idx, txq->fqid);
+	dev->data->tx_queues[queue_idx] = txq;
 
 	return 0;
 }
@@ -1247,6 +1254,43 @@ static int dpaa_dev_queue_intr_disable(struct rte_eth_dev *dev,
 	return 0;
 }
 
+static void
+dpaa_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+	struct rte_eth_rxq_info *qinfo)
+{
+	struct dpaa_if *dpaa_intf = dev->data->dev_private;
+	struct qman_fq *rxq;
+
+	rxq = dev->data->rx_queues[queue_id];
+
+	qinfo->mp = dpaa_intf->bp_info->mp;
+	qinfo->scattered_rx = dev->data->scattered_rx;
+	qinfo->nb_desc = rxq->nb_desc;
+	qinfo->conf.rx_free_thresh = 1;
+	qinfo->conf.rx_drop_en = 1;
+	qinfo->conf.rx_deferred_start = 0;
+	qinfo->conf.offloads = rxq->offloads;
+}
+
+static void
+dpaa_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+	struct rte_eth_txq_info *qinfo)
+{
+	struct qman_fq *txq;
+
+	txq = dev->data->tx_queues[queue_id];
+
+	qinfo->nb_desc = txq->nb_desc;
+	qinfo->conf.tx_thresh.pthresh = 0;
+	qinfo->conf.tx_thresh.hthresh = 0;
+	qinfo->conf.tx_thresh.wthresh = 0;
+
+	qinfo->conf.tx_free_thresh = 0;
+	qinfo->conf.tx_rs_thresh = 0;
+	qinfo->conf.offloads = txq->offloads;
+	qinfo->conf.tx_deferred_start = 0;
+}
+
 static struct eth_dev_ops dpaa_devops = {
 	.dev_configure		  = dpaa_eth_dev_configure,
 	.dev_start		  = dpaa_eth_dev_start,
@@ -1262,6 +1306,9 @@ static struct eth_dev_ops dpaa_devops = {
 	.rx_queue_count		  = dpaa_dev_rx_queue_count,
 	.rx_burst_mode_get	  = dpaa_dev_rx_burst_mode_get,
 	.tx_burst_mode_get	  = dpaa_dev_tx_burst_mode_get,
+	.rxq_info_get		  = dpaa_rxq_info_get,
+	.txq_info_get		  = dpaa_txq_info_get,
+
 	.flow_ctrl_get		  = dpaa_flow_ctrl_get,
 	.flow_ctrl_set		  = dpaa_flow_ctrl_set,
 
-- 
2.17.1


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

end of thread, other threads:[~2020-09-09 11:16 UTC | newest]

Thread overview: 81+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 17:19 [dpdk-dev] [PATCH v2 1/9] net/dpaa: support Rxq and Txq info routines Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 2/9] net/dpaa: add support for fmlib in dpdk Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 3/9] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 4/9] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 5/9] bus/dpaa: add shared MAC support Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 6/9] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 7/9] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 8/9] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 9/9] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-07-11  8:17 ` [dpdk-dev] [PATCH v3 1/8] net/dpaa: add support for fmlib in dpdk Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 2/8] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 3/8] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 4/8] bus/dpaa: add shared MAC support Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 5/8] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 6/8] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 7/8] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 8/8] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-07-17 11:36   ` [dpdk-dev] [PATCH v3 1/8] net/dpaa: add support for fmlib in dpdk Ferruh Yigit
2020-07-19 20:10     ` Thomas Monjalon
2020-07-20  4:50       ` Hemant Agrawal
2020-07-20 17:06         ` Thomas Monjalon
2020-07-21  3:26           ` Hemant Agrawal
2020-07-20 18:42         ` Stephen Hemminger
2020-07-28 13:41         ` David Marchand
2020-07-29  6:39           ` Hemant Agrawal
2020-07-29 12:07             ` Thomas Monjalon
2020-07-29 14:33             ` Kevin Traynor
2020-07-20  9:51       ` Ferruh Yigit
2020-08-11 12:29   ` [dpdk-dev] [PATCH v4 " Hemant Agrawal
2020-08-11 12:29     ` [dpdk-dev] [PATCH v4 2/8] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-08-11 12:29     ` [dpdk-dev] [PATCH v4 3/8] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-08-11 12:29     ` [dpdk-dev] [PATCH v4 4/8] bus/dpaa: add shared MAC support Hemant Agrawal
2020-08-11 12:29     ` [dpdk-dev] [PATCH v4 5/8] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-08-11 12:29     ` [dpdk-dev] [PATCH v4 6/8] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-08-11 12:30     ` [dpdk-dev] [PATCH v4 7/8] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-08-11 12:30     ` [dpdk-dev] [PATCH v4 8/8] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-08-13 18:01     ` [dpdk-dev] [PATCH v5 1/8] net/dpaa: add support for fmlib in dpdk Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 2/8] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 3/8] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 4/8] bus/dpaa: add shared MAC support Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 5/8] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 6/8] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 7/8] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 8/8] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-08-26 13:54       ` [dpdk-dev] [PATCH v5 1/8] net/dpaa: add support for fmlib in dpdk Ferruh Yigit
2020-08-26 14:52         ` Ferruh Yigit
2020-08-26 17:06           ` Hemant Agrawal
2020-08-26 21:20             ` Ferruh Yigit
2020-09-01 12:36       ` [dpdk-dev] [PATCH v6 " Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 2/8] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 3/8] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 4/8] bus/dpaa: add shared MAC support Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 5/8] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 6/8] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 7/8] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 8/8] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-09-01 15:48         ` [dpdk-dev] [PATCH v6 1/8] net/dpaa: add support for fmlib in dpdk Ferruh Yigit
2020-09-02  5:15           ` Hemant Agrawal
2020-09-02 13:32             ` Ferruh Yigit
2020-09-03  3:24               ` Hemant Agrawal
2020-09-03 19:54                 ` Ferruh Yigit
2020-09-04  8:29         ` [dpdk-dev] [PATCH v7 1/7] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-09-04  8:29           ` [dpdk-dev] [PATCH v7 2/7] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-09-04  8:29           ` [dpdk-dev] [PATCH v7 3/7] bus/dpaa: add shared MAC support Hemant Agrawal
2020-09-04  8:29           ` [dpdk-dev] [PATCH v7 4/7] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-09-04  8:29           ` [dpdk-dev] [PATCH v7 5/7] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-09-04  8:29           ` [dpdk-dev] [PATCH v7 6/7] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-09-04  8:29           ` [dpdk-dev] [PATCH v7 7/7] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-09-04  8:39           ` [dpdk-dev] [PATCH v8 1/8] net/dpaa: add support for fmlib in dpdk Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 2/8] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 3/8] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 4/8] bus/dpaa: add shared MAC support Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 5/8] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 6/8] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 7/8] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 8/8] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-09-04 12:51             ` [dpdk-dev] [PATCH v8 1/8] net/dpaa: add support for fmlib in dpdk Ferruh Yigit
2020-09-08  9:55               ` Ferruh Yigit
2020-09-08 10:19                 ` Thomas Monjalon
2020-09-08 12:10                   ` Ferruh Yigit
2020-09-09 11:16                     ` [dpdk-dev] [dpdk-ci] " Ferruh Yigit

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