DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, Vanshika Shukla <vanshika.shukla@nxp.com>
Subject: [PATCH v2 07/18] net/dpaa: add support to separate Tx conf queues
Date: Fri, 23 Aug 2024 13:02:29 +0530	[thread overview]
Message-ID: <20240823073240.3708320-8-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <20240823073240.3708320-1-hemant.agrawal@nxp.com>

From: Vanshika Shukla <vanshika.shukla@nxp.com>

This patch separates Tx confirmation queues for kernel
and DPDK so as to support the VSP case.

Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/include/fsl_qman.h |  4 ++-
 drivers/net/dpaa/dpaa_ethdev.c      | 45 +++++++++++++++++++++--------
 drivers/net/dpaa/dpaa_rxtx.c        |  3 +-
 3 files changed, 37 insertions(+), 15 deletions(-)

diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index c0677976e8..db14dfb839 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
  *
  * Copyright 2008-2012 Freescale Semiconductor, Inc.
- * Copyright 2019 NXP
+ * Copyright 2019-2022 NXP
  *
  */
 
@@ -1237,6 +1237,8 @@ struct qman_fq {
 
 	/* DPDK Interface */
 	void *dpaa_intf;
+	/*to store tx_conf_queue corresponding to tx_queue*/
+	struct qman_fq *tx_conf_queue;
 
 	struct rte_event ev;
 	/* affined portal in case of static queue */
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index bba305cfb1..3ee3029729 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -1870,9 +1870,30 @@ static int dpaa_tx_queue_init(struct qman_fq *fq,
 	return ret;
 }
 
-/* Initialise a DEBUG FQ ([rt]x_error, rx_default) and DPAA TX CONFIRM queue
- * to support PTP
- */
+static int
+dpaa_tx_conf_queue_init(struct qman_fq *fq)
+{
+	struct qm_mcc_initfq opts = {0};
+	int ret;
+
+	PMD_INIT_FUNC_TRACE();
+
+	ret = qman_create_fq(0, QMAN_FQ_FLAG_DYNAMIC_FQID, fq);
+	if (ret) {
+		DPAA_PMD_ERR("create Tx_conf failed with ret: %d", ret);
+		return ret;
+	}
+
+	opts.we_mask = QM_INITFQ_WE_DESTWQ | QM_INITFQ_WE_FQCTRL;
+	opts.fqd.dest.wq = DPAA_IF_DEBUG_PRIORITY;
+	ret = qman_init_fq(fq, 0, &opts);
+	if (ret)
+		DPAA_PMD_ERR("init Tx_conf fqid %d failed with ret: %d",
+			fq->fqid, ret);
+	return ret;
+}
+
+/* Initialise a DEBUG FQ ([rt]x_error, rx_default) */
 static int dpaa_def_queue_init(struct qman_fq *fq, uint32_t fqid)
 {
 	struct qm_mcc_initfq opts = {0};
@@ -2170,6 +2191,15 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 		if (ret)
 			goto free_tx;
 		dpaa_intf->tx_queues[loop].dpaa_intf = dpaa_intf;
+
+		if (dpaa_ieee_1588) {
+			ret = dpaa_tx_conf_queue_init(&dpaa_intf->tx_conf_queues[loop]);
+			if (ret)
+				goto free_tx;
+
+			dpaa_intf->tx_conf_queues[loop].dpaa_intf = dpaa_intf;
+			dpaa_intf->tx_queues[loop].tx_conf_queue = &dpaa_intf->tx_conf_queues[loop];
+		}
 	}
 	dpaa_intf->nb_tx_queues = MAX_DPAA_CORES;
 
@@ -2190,16 +2220,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 			DPAA_PMD_ERR("DPAA TX ERROR queue init failed!");
 			goto free_tx;
 		}
-		dpaa_intf->debug_queues[DPAA_DEBUG_FQ_TX_ERROR].dpaa_intf = dpaa_intf;
-		ret = dpaa_def_queue_init(dpaa_intf->tx_conf_queues,
-				fman_intf->fqid_tx_confirm);
-		if (ret) {
-			DPAA_PMD_ERR("DPAA TX CONFIRM queue init failed!");
-			goto free_tx;
-		}
-		dpaa_intf->tx_conf_queues->dpaa_intf = dpaa_intf;
 	}
-
 	DPAA_PMD_DEBUG("All frame queues created");
 
 	/* Get the initial configuration for flow control */
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 8593e20200..3bd35c7a0e 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -1083,8 +1083,7 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 	struct dpaa_sw_buf_free buf_to_free[DPAA_MAX_SGS * DPAA_MAX_DEQUEUE_NUM_FRAMES];
 	uint32_t free_count = 0;
 	struct qman_fq *fq = q;
-	struct dpaa_if *dpaa_intf = fq->dpaa_intf;
-	struct qman_fq *fq_txconf = dpaa_intf->tx_conf_queues;
+	struct qman_fq *fq_txconf = fq->tx_conf_queue;
 
 	if (unlikely(!DPAA_PER_LCORE_PORTAL)) {
 		ret = rte_dpaa_portal_init((void *)0);
-- 
2.25.1


  parent reply	other threads:[~2024-08-23  7:34 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01 10:52 [PATCH 00/17] NXP DPAA ETH driver enhancement and fixes Hemant Agrawal
2024-08-01 10:52 ` [PATCH 01/17] bus/dpaa: fix PFDRs leaks due to FQRNIs Hemant Agrawal
2024-08-01 10:52 ` [PATCH 02/17] net/dpaa: fix typecasting ch ID to u32 Hemant Agrawal
2024-08-07 15:37   ` Ferruh Yigit
2024-08-01 10:52 ` [PATCH 03/17] bus/dpaa: fix VSP for 1G fm1-mac9 and 10 Hemant Agrawal
2024-08-07 15:38   ` Ferruh Yigit
2024-08-23  7:33     ` Hemant Agrawal
2024-08-01 10:53 ` [PATCH 04/17] bus/dpaa: add port buffer manager stats Hemant Agrawal
2024-08-07 15:38   ` Ferruh Yigit
2024-08-23  7:33     ` Hemant Agrawal
2024-08-01 10:53 ` [PATCH 05/17] net/dpaa: support Tx confirmation to enable PTP Hemant Agrawal
2024-08-07 15:38   ` Ferruh Yigit
2024-08-23  7:34     ` Hemant Agrawal
2024-08-01 10:53 ` [PATCH 06/17] net/dpaa: add support to separate Tx conf queues Hemant Agrawal
2024-08-01 10:53 ` [PATCH 07/17] net/dpaa: share MAC FMC scheme and CC parse Hemant Agrawal
2024-08-07 15:39   ` Ferruh Yigit
2024-08-23  7:34     ` Hemant Agrawal
2024-08-01 10:53 ` [PATCH 08/17] net/dpaa: support Rx/Tx timestamp read Hemant Agrawal
2024-08-01 10:53 ` [PATCH 09/17] net/dpaa: support IEEE 1588 PTP Hemant Agrawal
2024-08-07 15:39   ` Ferruh Yigit
2024-08-23  7:36     ` Hemant Agrawal
2024-08-01 10:53 ` [PATCH 10/17] net/dpaa: implement detailed packet parsing Hemant Agrawal
2024-08-07 15:39   ` Ferruh Yigit
2024-08-23  7:34     ` Hemant Agrawal
2024-08-01 10:53 ` [PATCH 11/17] net/dpaa: enhance DPAA frame display Hemant Agrawal
2024-08-07 15:39   ` Ferruh Yigit
2024-08-23  7:36     ` Hemant Agrawal
2024-08-01 10:53 ` [PATCH 12/17] net/dpaa: support mempool debug Hemant Agrawal
2024-08-01 10:53 ` [PATCH 13/17] net/dpaa: add Tx rate limiting DPAA PMD API Hemant Agrawal
2024-08-07 15:40   ` Ferruh Yigit
2024-08-23  7:35     ` Hemant Agrawal
2024-08-01 10:53 ` [PATCH 14/17] bus/dpaa: add OH port mode for dpaa eth Hemant Agrawal
2024-08-07 15:40   ` Ferruh Yigit
2024-08-23  7:35     ` Hemant Agrawal
2024-08-01 10:53 ` [PATCH 15/17] bus/dpaa: add ONIC port mode for the DPAA eth Hemant Agrawal
2024-08-01 10:53 ` [PATCH 16/17] net/dpaa: improve the dpaa port cleanup Hemant Agrawal
2024-08-01 10:53 ` [PATCH 17/17] net/dpaa: improve dpaa errata A010022 handling Hemant Agrawal
2024-08-07 15:41   ` Ferruh Yigit
2024-08-23  7:35     ` Hemant Agrawal
2024-08-07 15:42 ` [PATCH 00/17] NXP DPAA ETH driver enhancement and fixes Ferruh Yigit
2024-08-08  8:51   ` Hemant Agrawal
2024-08-23  7:32 ` [PATCH v2 00/18] " Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 01/18] bus/dpaa: fix PFDRs leaks due to FQRNIs Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 02/18] net/dpaa: fix typecasting ch ID to u32 Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 03/18] bus/dpaa: fix VSP for 1G fm1-mac9 and 10 Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 04/18] bus/dpaa: fix the fman details status Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 05/18] bus/dpaa: add port buffer manager stats Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 06/18] net/dpaa: support Tx confirmation to enable PTP Hemant Agrawal
2024-08-23  7:32   ` Hemant Agrawal [this message]
2024-08-23  7:32   ` [PATCH v2 08/18] net/dpaa: share MAC FMC scheme and CC parse Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 09/18] net/dpaa: support Rx/Tx timestamp read Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 10/18] net/dpaa: support IEEE 1588 PTP Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 11/18] net/dpaa: implement detailed packet parsing Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 12/18] net/dpaa: enhance DPAA frame display Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 13/18] net/dpaa: support mempool debug Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 14/18] net/dpaa: add Tx rate limiting DPAA PMD API Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 15/18] bus/dpaa: add OH port mode for dpaa eth Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 16/18] bus/dpaa: add ONIC port mode for the DPAA eth Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 17/18] net/dpaa: improve the dpaa port cleanup Hemant Agrawal
2024-08-23  7:32   ` [PATCH v2 18/18] net/dpaa: improve dpaa errata A010022 handling Hemant Agrawal

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=20240823073240.3708320-8-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=vanshika.shukla@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).