DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements
@ 2018-08-29 10:47 Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
                   ` (13 more replies)
  0 siblings, 14 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up


Hemant Agrawal (9):
  net/dpaa: configure frame queue on MAC ID basis
  net/dpaa: fix jumbo buffer config
  net/dpaa: implement scatter offload support
  net/dpaa: minor debug log enhancements
  bus/dpaa: add interrupt based portal fd support
  net/dpaa: separate Rx function for LS1046
  net/dpaa: tune prefetch in Rx path
  bus/dpaa: add check for re-definition in compat
  mempool/dpaa: change the debug log level to DP

Nipun Gupta (2):
  bus/dpaa: avoid tag Set for eqcr in Tx path
  bus/dpaa: avoid using be conversions for contextb

Sachin Saxena (1):
  net/dpaa: set correct speed based on MAC type

Sunil Kumar Kori (1):
  net/dpaa: rearranging of atomic queue support code

 drivers/bus/dpaa/base/qbman/bman_driver.c |  17 ++--
 drivers/bus/dpaa/base/qbman/qman.c        |  72 +++++++++++++----
 drivers/bus/dpaa/base/qbman/qman_driver.c |   7 +-
 drivers/bus/dpaa/include/compat.h         |  20 +++--
 drivers/bus/dpaa/include/fsl_qman.h       |  20 +++++
 drivers/bus/dpaa/include/fsl_usd.h        |   6 ++
 drivers/bus/dpaa/rte_bus_dpaa_version.map |  17 +++-
 drivers/mempool/dpaa/dpaa_mempool.c       |   2 +-
 drivers/net/dpaa/dpaa_ethdev.c            | 126 ++++++++++++++++++++++++------
 drivers/net/dpaa/dpaa_ethdev.h            |   5 +-
 drivers/net/dpaa/dpaa_rxtx.c              | 100 ++++++++++++++++--------
 drivers/net/dpaa/dpaa_rxtx.h              |   5 +-
 12 files changed, 306 insertions(+), 91 deletions(-)

-- 
2.7.4

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

* [dpdk-dev] [PATCH 01/13] net/dpaa: configure frame queue on MAC ID basis
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 02/13] net/dpaa: fix jumbo buffer config Hemant Agrawal
                   ` (12 subsequent siblings)
  13 siblings, 1 reply; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 25 ++++++++++++++-----------
 drivers/net/dpaa/dpaa_ethdev.h |  2 +-
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 7a950ac..009ef84 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -1012,7 +1012,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 {
 	struct qm_mcc_initfq opts = {0};
 	int ret;
-	u32 flags = 0;
+	u32 flags = QMAN_FQ_FLAG_NO_ENQUEUE;
 	struct qm_mcc_initcgr cgr_opts = {
 		.we_mask = QM_CGR_WE_CS_THRES |
 				QM_CGR_WE_CSTD_EN |
@@ -1025,15 +1025,18 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 
 	PMD_INIT_FUNC_TRACE();
 
-	ret = qman_reserve_fqid(fqid);
-	if (ret) {
-		DPAA_PMD_ERR("reserve rx fqid 0x%x failed with ret: %d",
-			     fqid, ret);
-		return -EINVAL;
+	if (fqid) {
+		ret = qman_reserve_fqid(fqid);
+		if (ret) {
+			DPAA_PMD_ERR("reserve rx fqid 0x%x failed with ret: %d",
+				     fqid, ret);
+			return -EINVAL;
+		}
+	} else {
+		flags |= QMAN_FQ_FLAG_DYNAMIC_FQID;
 	}
-
 	DPAA_PMD_DEBUG("creating rx fq %p, fqid 0x%x", fq, fqid);
-	ret = qman_create_fq(fqid, QMAN_FQ_FLAG_NO_ENQUEUE, fq);
+	ret = qman_create_fq(fqid, flags, fq);
 	if (ret) {
 		DPAA_PMD_ERR("create rx fqid 0x%x failed with ret: %d",
 			fqid, ret);
@@ -1052,7 +1055,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 		if (ret) {
 			DPAA_PMD_WARN(
 				"rx taildrop init fail on rx fqid 0x%x(ret=%d)",
-				fqid, ret);
+				fq->fqid, ret);
 			goto without_cgr;
 		}
 		opts.we_mask |= QM_INITFQ_WE_CGID;
@@ -1060,7 +1063,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 		opts.fqd.fq_ctrl |= QM_FQCTRL_CGE;
 	}
 without_cgr:
-	ret = qman_init_fq(fq, flags, &opts);
+	ret = qman_init_fq(fq, 0, &opts);
 	if (ret)
 		DPAA_PMD_ERR("init rx fqid 0x%x failed with ret:%d", fqid, ret);
 	return ret;
@@ -1213,7 +1216,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 		if (default_q)
 			fqid = cfg->rx_def;
 		else
-			fqid = DPAA_PCD_FQID_START + dpaa_intf->ifid *
+			fqid = DPAA_PCD_FQID_START + dpaa_intf->fif->mac_idx *
 				DPAA_PCD_FQID_MULTIPLIER + loop;
 
 		if (dpaa_intf->cgr_rx)
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index c79b9f8..2c38c34 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -63,7 +63,7 @@
 #define DPAA_PCD_FQID_START		0x400
 #define DPAA_PCD_FQID_MULTIPLIER	0x100
 #define DPAA_DEFAULT_NUM_PCD_QUEUES	1
-#define DPAA_MAX_NUM_PCD_QUEUES		32
+#define DPAA_MAX_NUM_PCD_QUEUES		4
 
 #define DPAA_IF_TX_PRIORITY		3
 #define DPAA_IF_RX_PRIORITY		0
-- 
2.7.4

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

* [dpdk-dev] [PATCH 02/13] net/dpaa: fix jumbo buffer config
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 03/13] net/dpaa: implement scatter offload support Hemant Agrawal
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

Avoid return after the jumbo buffer config in dev config API

Fixes: 9658ac3a4ef6 ("net/dpaa: set the correct frame size in device MTU")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 009ef84..dd1bc90 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -196,11 +196,17 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 	if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
 		if (dev->data->dev_conf.rxmode.max_rx_pkt_len <=
 		    DPAA_MAX_RX_PKT_LEN) {
+			DPAA_PMD_DEBUG("enabling jumbo");
 			fman_if_set_maxfrm(dpaa_intf->fif,
 				dev->data->dev_conf.rxmode.max_rx_pkt_len);
-			return 0;
+			dev->data->mtu =
+				dev->data->dev_conf.rxmode.max_rx_pkt_len -
+				ETHER_HDR_LEN - ETHER_CRC_LEN - VLAN_TAG_SIZE;
 		} else {
-			return -1;
+			DPAA_PMD_ERR("enabling jumbo err conf max len=%d "
+				"supported is %d",
+				dev->data->dev_conf.rxmode.max_rx_pkt_len,
+				DPAA_MAX_RX_PKT_LEN);
 		}
 	}
 	return 0;
-- 
2.7.4

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

* [dpdk-dev] [PATCH 03/13] net/dpaa: implement scatter offload support
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 02/13] net/dpaa: fix jumbo buffer config Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 04/13] net/dpaa: set correct speed based on MAC type Hemant Agrawal
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 62 +++++++++++++++++++++++++++++++++++++++---
 drivers/net/dpaa/dpaa_ethdev.h |  3 +-
 drivers/net/dpaa/dpaa_rxtx.c   |  8 +++---
 drivers/net/dpaa/dpaa_rxtx.h   |  2 --
 4 files changed, 64 insertions(+), 11 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index dd1bc90..a0e3f24 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -47,7 +47,8 @@
 
 /* Supported Rx offloads */
 static uint64_t dev_rx_offloads_sup =
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_SCATTER;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
@@ -55,8 +56,7 @@ static uint64_t dev_rx_offloads_nodis =
 		DEV_RX_OFFLOAD_UDP_CKSUM |
 		DEV_RX_OFFLOAD_TCP_CKSUM |
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
-		DEV_RX_OFFLOAD_CRC_STRIP |
-		DEV_RX_OFFLOAD_SCATTER;
+		DEV_RX_OFFLOAD_CRC_STRIP;
 
 /* Supported Tx offloads */
 static uint64_t dev_tx_offloads_sup;
@@ -148,11 +148,30 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	struct dpaa_if *dpaa_intf = dev->data->dev_private;
 	uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN
 				+ VLAN_TAG_SIZE;
+	uint32_t buffsz = dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM;
 
 	PMD_INIT_FUNC_TRACE();
 
 	if (mtu < ETHER_MIN_MTU || frame_size > DPAA_MAX_RX_PKT_LEN)
 		return -EINVAL;
+	/*
+	 * Refuse mtu that requires the support of scattered packets
+	 * when this feature has not been enabled before.
+	 */
+	if (dev->data->min_rx_buf_size &&
+		!dev->data->scattered_rx && frame_size > buffsz) {
+		DPAA_PMD_ERR("SG not enabled, will not fit in one buffer");
+		return -EINVAL;
+	}
+
+	/* check <seg size> * <max_seg>  >= max_frame */
+	if (dev->data->min_rx_buf_size && dev->data->scattered_rx &&
+		(frame_size > buffsz * DPAA_SGT_MAX_ENTRIES)) {
+		DPAA_PMD_ERR("Too big to fit for Max SG list %d",
+				buffsz * DPAA_SGT_MAX_ENTRIES);
+		return -EINVAL;
+	}
+
 	if (frame_size > ETHER_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads &=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
@@ -209,6 +228,13 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 				DPAA_MAX_RX_PKT_LEN);
 		}
 	}
+
+	if (rx_offloads & DEV_RX_OFFLOAD_SCATTER) {
+		DPAA_PMD_DEBUG("enabling scatter mode");
+		fman_if_set_sg(dpaa_intf->fif, 1);
+		dev->data->scattered_rx = 1;
+	}
+
 	return 0;
 }
 
@@ -306,7 +332,6 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev,
 
 	dev_info->max_rx_queues = dpaa_intf->nb_rx_queues;
 	dev_info->max_tx_queues = dpaa_intf->nb_tx_queues;
-	dev_info->min_rx_bufsize = DPAA_MIN_RX_BUF_SIZE;
 	dev_info->max_rx_pktlen = DPAA_MAX_RX_PKT_LEN;
 	dev_info->max_mac_addrs = DPAA_MAX_MAC_FILTER;
 	dev_info->max_hash_mac_addrs = 0;
@@ -520,6 +545,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	struct qm_mcc_initfq opts = {0};
 	u32 flags = 0;
 	int ret;
+	u32 buffsz = rte_pktmbuf_data_room_size(mp) - RTE_PKTMBUF_HEADROOM;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -533,6 +559,28 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	DPAA_PMD_INFO("Rx queue setup for queue index: %d fq_id (0x%x)",
 			queue_idx, rxq->fqid);
 
+	/* Max packet can fit in single buffer */
+	if (dev->data->dev_conf.rxmode.max_rx_pkt_len <= buffsz) {
+		;
+	} else if (dev->data->dev_conf.rxmode.offloads &
+			DEV_RX_OFFLOAD_SCATTER) {
+		if (dev->data->dev_conf.rxmode.max_rx_pkt_len >
+			buffsz * DPAA_SGT_MAX_ENTRIES) {
+			DPAA_PMD_ERR("max RxPkt size %d too big to fit "
+				"MaxSGlist %d",
+				dev->data->dev_conf.rxmode.max_rx_pkt_len,
+				buffsz * DPAA_SGT_MAX_ENTRIES);
+			rte_errno = EOVERFLOW;
+			return -rte_errno;
+		}
+	} else {
+		DPAA_PMD_WARN("The requested maximum Rx packet size (%u) is"
+		     " larger than a single mbuf (%u) and scattered"
+		     " mode has not been requested",
+		     dev->data->dev_conf.rxmode.max_rx_pkt_len,
+		     buffsz - RTE_PKTMBUF_HEADROOM);
+	}
+
 	if (!dpaa_intf->bp_info || dpaa_intf->bp_info->mp != mp) {
 		struct fman_if_ic_params icp;
 		uint32_t fd_offset;
@@ -563,6 +611,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 			    dpaa_intf->name, fd_offset,
 			fman_if_get_fdoff(dpaa_intf->fif));
 	}
+	DPAA_PMD_DEBUG("if:%s sg_on = %d, max_frm =%d", dpaa_intf->name,
+		fman_if_get_sg_enable(dpaa_intf->fif),
+		dev->data->dev_conf.rxmode.max_rx_pkt_len);
 	/* checking if push mode only, no error check for now */
 	if (dpaa_push_mode_max_queue > dpaa_push_queue_idx) {
 		dpaa_push_queue_idx++;
@@ -1313,6 +1364,9 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 	fman_if_reset_mcast_filter_table(fman_intf);
 	/* Reset interface statistics */
 	fman_if_stats_reset(fman_intf);
+	/* Disable SG by default */
+	fman_if_set_sg(fman_intf, 0);
+	fman_if_set_maxfrm(fman_intf, ETHER_MAX_LEN + VLAN_TAG_SIZE);
 
 	return 0;
 
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index 2c38c34..2fc7231 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -39,9 +39,10 @@
 /* Alignment to use for cpu-local structs to avoid coherency problems. */
 #define MAX_CACHELINE			64
 
-#define DPAA_MIN_RX_BUF_SIZE 512
 #define DPAA_MAX_RX_PKT_LEN  10240
 
+#define DPAA_SGT_MAX_ENTRIES 16 /* maximum number of entries in SG Table */
+
 /* RX queue tail drop threshold (CGR Based) in frame count */
 #define CGR_RX_PERFQ_THRESH 256
 
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 168b77e..3a3a048 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -306,8 +306,6 @@ dpaa_eth_sg_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	int i = 0;
 	uint8_t fd_offset = fd->offset;
 
-	DPAA_DP_LOG(DEBUG, "Received an SG frame");
-
 	vaddr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd));
 	if (!vaddr) {
 		DPAA_PMD_ERR("unable to convert physical address");
@@ -349,6 +347,8 @@ dpaa_eth_sg_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 		}
 		prev_seg = cur_seg;
 	}
+	DPAA_DP_LOG(DEBUG, "Received an SG frame len =%d, num_sg =%d",
+			first_seg->pkt_len, first_seg->nb_segs);
 
 	dpaa_eth_packet_info(first_seg, vaddr);
 	rte_pktmbuf_free_seg(temp);
@@ -367,8 +367,6 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	uint16_t offset;
 	uint32_t length;
 
-	DPAA_DP_LOG(DEBUG, " FD--->MBUF");
-
 	if (unlikely(format == qm_fd_sg))
 		return dpaa_eth_sg_to_mbuf(fd, ifid);
 
@@ -379,6 +377,8 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	offset = (fd->opaque & DPAA_FD_OFFSET_MASK) >> DPAA_FD_OFFSET_SHIFT;
 	length = fd->opaque & DPAA_FD_LENGTH_MASK;
 
+	DPAA_DP_LOG(DEBUG, " FD--->MBUF off %d len = %d", offset, length);
+
 	/* Ignoring case when format != qm_fd_contig */
 	dpaa_display_frame(fd);
 
diff --git a/drivers/net/dpaa/dpaa_rxtx.h b/drivers/net/dpaa/dpaa_rxtx.h
index d3e6351..6de70a7 100644
--- a/drivers/net/dpaa/dpaa_rxtx.h
+++ b/drivers/net/dpaa/dpaa_rxtx.h
@@ -32,8 +32,6 @@
 /* L4 Type field: TCP */
 #define DPAA_L4_PARSE_RESULT_TCP	0x20
 
-#define DPAA_SGT_MAX_ENTRIES 16 /* maximum number of entries in SG Table */
-
 #define DPAA_MAX_DEQUEUE_NUM_FRAMES    63
 	/** <Maximum number of frames to be dequeued in a single rx call*/
 
-- 
2.7.4

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

* [dpdk-dev] [PATCH 04/13] net/dpaa: set correct speed based on MAC type
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
                   ` (2 preceding siblings ...)
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 03/13] net/dpaa: implement scatter offload support Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 05/13] net/dpaa: minor debug log enhancements Hemant Agrawal
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

From: Sachin Saxena <sachin.saxena@nxp.com>

Fixes: 799db4568c76 ("net/dpaa: support device info and speed capability")
Cc: shreyansh.jain@nxp.com
Cc: stable@dpdk.org

Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index a0e3f24..4e5cc0f 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -338,8 +338,15 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev,
 	dev_info->max_vfs = 0;
 	dev_info->max_vmdq_pools = ETH_16_POOLS;
 	dev_info->flow_type_rss_offloads = DPAA_RSS_OFFLOAD_ALL;
-	dev_info->speed_capa = (ETH_LINK_SPEED_1G |
-				ETH_LINK_SPEED_10G);
+
+	if (dpaa_intf->fif->mac_type == fman_mac_1g)
+		dev_info->speed_capa = ETH_LINK_SPEED_1G;
+	else if (dpaa_intf->fif->mac_type == fman_mac_10g)
+		dev_info->speed_capa = (ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G);
+	else
+		DPAA_PMD_ERR("invalid link_speed: %s, %d",
+			     dpaa_intf->name, dpaa_intf->fif->mac_type);
+
 	dev_info->rx_offload_capa = dev_rx_offloads_sup |
 					dev_rx_offloads_nodis;
 	dev_info->tx_offload_capa = dev_tx_offloads_sup |
-- 
2.7.4

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

* [dpdk-dev] [PATCH 05/13] net/dpaa: minor debug log enhancements
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
                   ` (3 preceding siblings ...)
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 04/13] net/dpaa: set correct speed based on MAC type Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 06/13] bus/dpaa: add interrupt based portal fd support Hemant Agrawal
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 4e5cc0f..df72510 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -614,9 +614,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		fman_if_set_bp(dpaa_intf->fif, mp->size,
 			       dpaa_intf->bp_info->bpid, bp_size);
 		dpaa_intf->valid = 1;
-		DPAA_PMD_INFO("if =%s - fd_offset = %d offset = %d",
-			    dpaa_intf->name, fd_offset,
-			fman_if_get_fdoff(dpaa_intf->fif));
+		DPAA_PMD_DEBUG("if:%s fd_offset = %d offset = %d",
+				dpaa_intf->name, fd_offset,
+				fman_if_get_fdoff(dpaa_intf->fif));
 	}
 	DPAA_PMD_DEBUG("if:%s sg_on = %d, max_frm =%d", dpaa_intf->name,
 		fman_if_get_sg_enable(dpaa_intf->fif),
@@ -694,7 +694,8 @@ dpaa_eth_eventq_attach(const struct rte_eth_dev *dev,
 	struct qm_mcc_initfq opts = {0};
 
 	if (dpaa_push_mode_max_queue)
-		DPAA_PMD_WARN("PUSH mode already enabled for first %d queues.\n"
+		DPAA_PMD_WARN("PUSH mode q and EVENTDEV are not compatible\n"
+			      "PUSH mode already enabled for first %d queues.\n"
 			      "To disable set DPAA_PUSH_QUEUES_NUMBER to 0\n",
 			      dpaa_push_mode_max_queue);
 
-- 
2.7.4

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

* [dpdk-dev] [PATCH 06/13] bus/dpaa: add interrupt based portal fd support
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
                   ` (4 preceding siblings ...)
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 05/13] net/dpaa: minor debug log enhancements Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path Hemant Agrawal
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/base/qbman/bman_driver.c | 17 ++++++----
 drivers/bus/dpaa/base/qbman/qman.c        | 52 +++++++++++++++++++++++++++++++
 drivers/bus/dpaa/base/qbman/qman_driver.c |  7 ++++-
 drivers/bus/dpaa/include/fsl_qman.h       | 20 ++++++++++++
 drivers/bus/dpaa/include/fsl_usd.h        |  6 ++++
 drivers/bus/dpaa/rte_bus_dpaa_version.map | 17 +++++++++-
 6 files changed, 111 insertions(+), 8 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/bman_driver.c b/drivers/bus/dpaa/base/qbman/bman_driver.c
index b14b590..750b756 100644
--- a/drivers/bus/dpaa/base/qbman/bman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/bman_driver.c
@@ -23,7 +23,7 @@ static void *bman_ccsr_map;
 /* Portal driver */
 /*****************/
 
-static __thread int fd = -1;
+static __thread int bmfd = -1;
 static __thread struct bm_portal_config pcfg;
 static __thread struct dpaa_ioctl_portal_map map = {
 	.type = dpaa_portal_bman
@@ -70,14 +70,14 @@ static int fsl_bman_portal_init(uint32_t idx, int is_shared)
 	pcfg.index = map.index;
 	bman_depletion_fill(&pcfg.mask);
 
-	fd = open(BMAN_PORTAL_IRQ_PATH, O_RDONLY);
-	if (fd == -1) {
+	bmfd = open(BMAN_PORTAL_IRQ_PATH, O_RDONLY);
+	if (bmfd == -1) {
 		pr_err("BMan irq init failed");
 		process_portal_unmap(&map.addr);
 		return -EBUSY;
 	}
 	/* Use the IRQ FD as a unique IRQ number */
-	pcfg.irq = fd;
+	pcfg.irq = bmfd;
 
 	portal = bman_create_affine_portal(&pcfg);
 	if (!portal) {
@@ -90,7 +90,7 @@ static int fsl_bman_portal_init(uint32_t idx, int is_shared)
 	/* Set the IRQ number */
 	irq_map.type = dpaa_portal_bman;
 	irq_map.portal_cinh = map.addr.cinh;
-	process_portal_irq_map(fd, &irq_map);
+	process_portal_irq_map(bmfd, &irq_map);
 	return 0;
 }
 
@@ -99,7 +99,7 @@ static int fsl_bman_portal_finish(void)
 	__maybe_unused const struct bm_portal_config *cfg;
 	int ret;
 
-	process_portal_irq_unmap(fd);
+	process_portal_irq_unmap(bmfd);
 
 	cfg = bman_destroy_affine_portal();
 	DPAA_BUG_ON(cfg != &pcfg);
@@ -109,6 +109,11 @@ static int fsl_bman_portal_finish(void)
 	return ret;
 }
 
+int bman_thread_fd(void)
+{
+	return bmfd;
+}
+
 int bman_thread_init(void)
 {
 	/* Convert from contiguous/virtual cpu numbering to real cpu when
diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 7c17027..8730550 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -1040,6 +1040,50 @@ static inline unsigned int __poll_portal_fast(struct qman_portal *p,
 	return limit;
 }
 
+int qman_irqsource_add(u32 bits)
+{
+	struct qman_portal *p = get_affine_portal();
+
+	bits = bits & QM_PIRQ_VISIBLE;
+
+	/* Clear any previously remaining interrupt conditions in
+	 * QCSP_ISR. This prevents raising a false interrupt when
+	 * interrupt conditions are enabled in QCSP_IER.
+	 */
+	qm_isr_status_clear(&p->p, bits);
+	dpaa_set_bits(bits, &p->irq_sources);
+	qm_isr_enable_write(&p->p, p->irq_sources);
+
+
+	return 0;
+}
+
+int qman_irqsource_remove(u32 bits)
+{
+	struct qman_portal *p = get_affine_portal();
+	u32 ier;
+
+	/* Our interrupt handler only processes+clears status register bits that
+	 * are in p->irq_sources. As we're trimming that mask, if one of them
+	 * were to assert in the status register just before we remove it from
+	 * the enable register, there would be an interrupt-storm when we
+	 * release the IRQ lock. So we wait for the enable register update to
+	 * take effect in h/w (by reading it back) and then clear all other bits
+	 * in the status register. Ie. we clear them from ISR once it's certain
+	 * IER won't allow them to reassert.
+	 */
+
+	bits &= QM_PIRQ_VISIBLE;
+	dpaa_clear_bits(bits, &p->irq_sources);
+	qm_isr_enable_write(&p->p, p->irq_sources);
+	ier = qm_isr_enable_read(&p->p);
+	/* Using "~ier" (rather than "bits" or "~p->irq_sources") creates a
+	 * data-dependency, ie. to protect against re-ordering.
+	 */
+	qm_isr_status_clear(&p->p, ~ier);
+	return 0;
+}
+
 u16 qman_affine_channel(int cpu)
 {
 	if (cpu < 0) {
@@ -1114,6 +1158,14 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
 	return rx_number;
 }
 
+void qman_clear_irq(void)
+{
+	struct qman_portal *p = get_affine_portal();
+	u32 clear = QM_DQAVAIL_MASK | (p->irq_sources &
+		~(QM_PIRQ_CSCI | QM_PIRQ_CCSCI));
+	qm_isr_status_clear(&p->p, clear);
+}
+
 u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 			void **bufs)
 {
diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c
index f6ecd6b..ba15339 100644
--- a/drivers/bus/dpaa/base/qbman/qman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/qman_driver.c
@@ -113,6 +113,11 @@ static int fsl_qman_portal_finish(void)
 	return ret;
 }
 
+int qman_thread_fd(void)
+{
+	return qmfd;
+}
+
 int qman_thread_init(void)
 {
 	/* Convert from contiguous/virtual cpu numbering to real cpu when
@@ -135,7 +140,7 @@ void qman_thread_irq(void)
 	 * rather than breaking that encapsulation I am simply hard-coding the
 	 * offset to the inhibit register here.
 	 */
-	out_be32(qpcfg.addr_virt[DPAA_PORTAL_CI] + 0xe0c, 0);
+	out_be32(qpcfg.addr_virt[DPAA_PORTAL_CI] + 0x36C0, 0);
 }
 
 struct qman_portal *fsl_qman_portal_create(void)
diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index b18cf03..e438414 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -1316,6 +1316,26 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 			void **bufs);
 
 /**
+ * qman_irqsource_add - add processing sources to be interrupt-driven
+ * @bits: bitmask of QM_PIRQ_**I processing sources
+ *
+ * Adds processing sources that should be interrupt-driven (rather than
+ * processed via qman_poll_***() functions). Returns zero for success, or
+ * -EINVAL if the current CPU is sharing a portal hosted on another CPU.
+ */
+int qman_irqsource_add(u32 bits);
+
+/**
+ * qman_irqsource_remove - remove processing sources from being interrupt-driven
+ * @bits: bitmask of QM_PIRQ_**I processing sources
+ *
+ * Removes processing sources from being interrupt-driven, so that they will
+ * instead be processed via qman_poll_***() functions. Returns zero for success,
+ * or -EINVAL if the current CPU is sharing a portal hosted on another CPU.
+ */
+int qman_irqsource_remove(u32 bits);
+
+/**
  * qman_affine_channel - return the channel ID of an portal
  * @cpu: the cpu whose affine portal is the subject of the query
  *
diff --git a/drivers/bus/dpaa/include/fsl_usd.h b/drivers/bus/dpaa/include/fsl_usd.h
index e183617..ec1ab7c 100644
--- a/drivers/bus/dpaa/include/fsl_usd.h
+++ b/drivers/bus/dpaa/include/fsl_usd.h
@@ -55,6 +55,10 @@ int qman_free_raw_portal(struct dpaa_raw_portal *portal);
 int bman_allocate_raw_portal(struct dpaa_raw_portal *portal);
 int bman_free_raw_portal(struct dpaa_raw_portal *portal);
 
+/* Obtain thread-local UIO file-descriptors */
+int qman_thread_fd(void);
+int bman_thread_fd(void);
+
 /* Post-process interrupts. NB, the kernel IRQ handler disables the interrupt
  * line before notifying us, and this post-processing re-enables it once
  * processing is complete. As such, it is essential to call this before going
@@ -63,6 +67,8 @@ int bman_free_raw_portal(struct dpaa_raw_portal *portal);
 void qman_thread_irq(void);
 void bman_thread_irq(void);
 
+void qman_clear_irq(void);
+
 /* Global setup */
 int qman_global_init(void);
 int bman_global_init(void);
diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map
index 7d6d624..0f792a2 100644
--- a/drivers/bus/dpaa/rte_bus_dpaa_version.map
+++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map
@@ -95,10 +95,25 @@ DPDK_18.02 {
 
 DPDK_18.08 {
 	global:
-
 	fman_if_get_sg_enable;
 	fman_if_set_sg;
 	of_get_mac_address;
 
 	local: *;
 } DPDK_18.02;
+
+DPDK_18.11 {
+	global:
+	bman_thread_irq;
+	fman_if_get_sg_enable;
+	fman_if_set_sg;
+	qman_clear_irq;
+
+	qman_irqsource_add;
+	qman_irqsource_remove;
+	qman_portal_ucode_poll_rx;
+	qman_thread_fd;
+	qman_thread_irq;
+
+	local: *;
+} DPDK_18.08;
-- 
2.7.4

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

* [dpdk-dev] [PATCH 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
                   ` (5 preceding siblings ...)
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 06/13] bus/dpaa: add interrupt based portal fd support Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 08/13] bus/dpaa: avoid using be conversions for contextb Hemant Agrawal
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

From: Nipun Gupta <nipun.gupta@nxp.com>

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/dpaa/base/qbman/qman.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 8730550..71da275 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -2238,11 +2238,6 @@ int qman_enqueue_multi(struct qman_fq *fq,
 	/* try to send as many frames as possible */
 	while (eqcr->available && frames_to_send--) {
 		eq->fqid = fq->fqid_le;
-#ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-		eq->tag = cpu_to_be32(fq->key);
-#else
-		eq->tag = cpu_to_be32((u32)(uintptr_t)fq);
-#endif
 		eq->fd.opaque_addr = fd->opaque_addr;
 		eq->fd.addr = cpu_to_be40(fd->addr);
 		eq->fd.status = cpu_to_be32(fd->status);
-- 
2.7.4

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

* [dpdk-dev] [PATCH 08/13] bus/dpaa: avoid using be conversions for contextb
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
                   ` (6 preceding siblings ...)
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 09/13] net/dpaa: rearranging of atomic queue support code Hemant Agrawal
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

From: Nipun Gupta <nipun.gupta@nxp.com>

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/dpaa/base/qbman/qman.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 71da275..dc64d08 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -852,11 +852,9 @@ static u32 __poll_portal_slow(struct qman_portal *p, u32 is)
 			case QM_MR_VERB_FQPN:
 				/* Parked */
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-				fq = get_fq_table_entry(
-					be32_to_cpu(msg->fq.contextB));
+				fq = get_fq_table_entry(msg->fq.contextB);
 #else
-				fq = (void *)(uintptr_t)
-					be32_to_cpu(msg->fq.contextB);
+				fq = (void *)(uintptr_t)msg->fq.contextB;
 #endif
 				fq_state_change(p, fq, msg, verb);
 				if (fq->cb.fqs)
@@ -967,7 +965,6 @@ static inline unsigned int __poll_portal_fast(struct qman_portal *p,
 		*shadow = *dq;
 		dq = shadow;
 		shadow->fqid = be32_to_cpu(shadow->fqid);
-		shadow->contextB = be32_to_cpu(shadow->contextB);
 		shadow->seqnum = be16_to_cpu(shadow->seqnum);
 		hw_fd_to_cpu(&shadow->fd);
 #endif
@@ -1136,9 +1133,9 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
 
 		/* SDQCR: context_b points to the FQ */
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-		fq = qman_fq_lookup_table[be32_to_cpu(dq[rx_number]->contextB)];
+		fq = qman_fq_lookup_table[dq[rx_number]->contextB];
 #else
-		fq = (void *)be32_to_cpu(dq[rx_number]->contextB);
+		fq = (void *)dq[rx_number]->contextB;
 #endif
 		if (fq->cb.dqrr_prepare)
 			fq->cb.dqrr_prepare(shadow[rx_number],
@@ -1195,7 +1192,6 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 		*shadow = *dq;
 		dq = shadow;
 		shadow->fqid = be32_to_cpu(shadow->fqid);
-		shadow->contextB = be32_to_cpu(shadow->contextB);
 		shadow->seqnum = be16_to_cpu(shadow->seqnum);
 		hw_fd_to_cpu(&shadow->fd);
 #endif
@@ -1260,7 +1256,6 @@ struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq)
 	*shadow = *dq;
 	dq = shadow;
 	shadow->fqid = be32_to_cpu(shadow->fqid);
-	shadow->contextB = be32_to_cpu(shadow->contextB);
 	shadow->seqnum = be16_to_cpu(shadow->seqnum);
 	hw_fd_to_cpu(&shadow->fd);
 #endif
@@ -1556,7 +1551,7 @@ int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts)
 
 		mcc->initfq.we_mask |= QM_INITFQ_WE_CONTEXTB;
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-		mcc->initfq.fqd.context_b = fq->key;
+		mcc->initfq.fqd.context_b = cpu_to_be32(fq->key);
 #else
 		mcc->initfq.fqd.context_b = (u32)(uintptr_t)fq;
 #endif
-- 
2.7.4

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

* [dpdk-dev] [PATCH 09/13] net/dpaa: rearranging of atomic queue support code
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
                   ` (7 preceding siblings ...)
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 08/13] bus/dpaa: avoid using be conversions for contextb Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 10/13] net/dpaa: separate Rx function for LS1046 Hemant Agrawal
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

From: Sunil Kumar Kori <sunil.kori@nxp.com>

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
---
 drivers/net/dpaa/dpaa_rxtx.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 3a3a048..6698c97 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -870,6 +870,19 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 				DPAA_TX_BURST_SIZE : nb_bufs;
 		for (loop = 0; loop < frames_to_send; loop++) {
 			mbuf = *(bufs++);
+			seqn = mbuf->seqn;
+			if (seqn != DPAA_INVALID_MBUF_SEQN) {
+				index = seqn - 1;
+				if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) {
+					flags[loop] =
+					   ((index & QM_EQCR_DCA_IDXMASK) << 8);
+					flags[loop] |= QMAN_ENQUEUE_FLAG_DCA;
+					DPAA_PER_LCORE_DQRR_SIZE--;
+					DPAA_PER_LCORE_DQRR_HELD &=
+								~(1 << index);
+				}
+			}
+
 			if (likely(RTE_MBUF_DIRECT(mbuf))) {
 				mp = mbuf->pool;
 				bp_info = DPAA_MEMPOOL_TO_POOL_INFO(mp);
@@ -916,18 +929,6 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 					goto send_pkts;
 				}
 			}
-			seqn = mbuf->seqn;
-			if (seqn != DPAA_INVALID_MBUF_SEQN) {
-				index = seqn - 1;
-				if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) {
-					flags[loop] =
-					   ((index & QM_EQCR_DCA_IDXMASK) << 8);
-					flags[loop] |= QMAN_ENQUEUE_FLAG_DCA;
-					DPAA_PER_LCORE_DQRR_SIZE--;
-					DPAA_PER_LCORE_DQRR_HELD &=
-								~(1 << index);
-				}
-			}
 		}
 
 send_pkts:
-- 
2.7.4

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

* [dpdk-dev] [PATCH 10/13] net/dpaa: separate Rx function for LS1046
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
                   ` (8 preceding siblings ...)
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 09/13] net/dpaa: rearranging of atomic queue support code Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 11/13] net/dpaa: tune prefetch in Rx path Hemant Agrawal
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

This is to avoid the checks in datapath

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c |  9 +++++--
 drivers/net/dpaa/dpaa_rxtx.c   | 60 +++++++++++++++++++++++++++++++++---------
 drivers/net/dpaa/dpaa_rxtx.h   |  3 +++
 3 files changed, 58 insertions(+), 14 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index df72510..76cd0f7 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -658,8 +658,13 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 				"ret:%d(%s)", rxq->fqid, ret, strerror(ret));
 			return ret;
 		}
-		rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb;
-		rxq->cb.dqrr_prepare = dpaa_rx_cb_prepare;
+		if (dpaa_svr_family == SVR_LS1043A_FAMILY) {
+			rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb_no_prefetch;
+		} else {
+			rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb;
+			rxq->cb.dqrr_prepare = dpaa_rx_cb_prepare;
+		}
+
 		rxq->is_static = true;
 	}
 	dev->data->rx_queues[queue_idx] = rxq;
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 6698c97..2c57741 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -398,8 +398,9 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	return mbuf;
 }
 
+/* Specific for LS1043 */
 void
-dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
+dpaa_rx_cb_no_prefetch(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
 	   void **bufs, int num_bufs)
 {
 	struct rte_mbuf *mbuf;
@@ -411,17 +412,13 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
 	uint32_t length;
 	uint8_t format;
 
-	if (dpaa_svr_family != SVR_LS1046A_FAMILY) {
-		bp_info = DPAA_BPID_TO_POOL_INFO(dqrr[0]->fd.bpid);
-		ptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[0]->fd));
-		rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
-		bufs[0] = (struct rte_mbuf *)((char *)ptr -
-				bp_info->meta_data_size);
-	}
+	bp_info = DPAA_BPID_TO_POOL_INFO(dqrr[0]->fd.bpid);
+	ptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[0]->fd));
+	rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
+	bufs[0] = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size);
 
 	for (i = 0; i < num_bufs; i++) {
-		if (dpaa_svr_family != SVR_LS1046A_FAMILY &&
-		    i < num_bufs - 1) {
+		if (i < num_bufs - 1) {
 			bp_info = DPAA_BPID_TO_POOL_INFO(dqrr[i + 1]->fd.bpid);
 			ptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[i + 1]->fd));
 			rte_prefetch0((void *)((uint8_t *)ptr +
@@ -458,6 +455,46 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
 	}
 }
 
+void
+dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
+	   void **bufs, int num_bufs)
+{
+	struct rte_mbuf *mbuf;
+	const struct qm_fd *fd;
+	struct dpaa_if *dpaa_intf;
+	uint16_t offset, i;
+	uint32_t length;
+	uint8_t format;
+
+	for (i = 0; i < num_bufs; i++) {
+		fd = &dqrr[i]->fd;
+		dpaa_intf = fq[0]->dpaa_intf;
+
+		format = (fd->opaque & DPAA_FD_FORMAT_MASK) >>
+				DPAA_FD_FORMAT_SHIFT;
+		if (unlikely(format == qm_fd_sg)) {
+			bufs[i] = dpaa_eth_sg_to_mbuf(fd, dpaa_intf->ifid);
+			continue;
+		}
+
+		offset = (fd->opaque & DPAA_FD_OFFSET_MASK) >>
+				DPAA_FD_OFFSET_SHIFT;
+		length = fd->opaque & DPAA_FD_LENGTH_MASK;
+
+		mbuf = bufs[i];
+		mbuf->data_off = offset;
+		mbuf->data_len = length;
+		mbuf->pkt_len = length;
+		mbuf->port = dpaa_intf->ifid;
+
+		mbuf->nb_segs = 1;
+		mbuf->ol_flags = 0;
+		mbuf->next = NULL;
+		rte_mbuf_refcnt_set(mbuf, 1);
+		dpaa_eth_packet_info(mbuf, mbuf->buf_addr);
+	}
+}
+
 void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs)
 {
 	struct dpaa_bp_info *bp_info = DPAA_BPID_TO_POOL_INFO(dq->fd.bpid);
@@ -468,8 +505,7 @@ void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs)
 	 * So we prefetch the annoation beforehand, so that it is available
 	 * in cache when accessed.
 	 */
-	if (dpaa_svr_family == SVR_LS1046A_FAMILY)
-		rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
+	rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
 
 	*bufs = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size);
 }
diff --git a/drivers/net/dpaa/dpaa_rxtx.h b/drivers/net/dpaa/dpaa_rxtx.h
index 6de70a7..75b093c 100644
--- a/drivers/net/dpaa/dpaa_rxtx.h
+++ b/drivers/net/dpaa/dpaa_rxtx.h
@@ -270,4 +270,7 @@ void dpaa_rx_cb(struct qman_fq **fq,
 		struct qm_dqrr_entry **dqrr, void **bufs, int num_bufs);
 
 void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs);
+
+void dpaa_rx_cb_no_prefetch(struct qman_fq **fq,
+		    struct qm_dqrr_entry **dqrr, void **bufs, int num_bufs);
 #endif
-- 
2.7.4

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

* [dpdk-dev] [PATCH 11/13] net/dpaa: tune prefetch in Rx path
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
                   ` (9 preceding siblings ...)
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 10/13] net/dpaa: separate Rx function for LS1046 Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 12/13] bus/dpaa: add check for re-definition in compat Hemant Agrawal
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_rxtx.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 2c57741..c4471c2 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -370,10 +370,6 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	if (unlikely(format == qm_fd_sg))
 		return dpaa_eth_sg_to_mbuf(fd, ifid);
 
-	ptr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd));
-
-	rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
-
 	offset = (fd->opaque & DPAA_FD_OFFSET_MASK) >> DPAA_FD_OFFSET_SHIFT;
 	length = fd->opaque & DPAA_FD_LENGTH_MASK;
 
@@ -381,8 +377,11 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 
 	/* Ignoring case when format != qm_fd_contig */
 	dpaa_display_frame(fd);
+	ptr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd));
 
 	mbuf = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size);
+	/* Prefetch the Parse results and packet data to L1 */
+	rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
 
 	mbuf->data_off = offset;
 	mbuf->data_len = length;
-- 
2.7.4

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

* [dpdk-dev] [PATCH 12/13] bus/dpaa: add check for re-definition in compat
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
                   ` (10 preceding siblings ...)
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 11/13] net/dpaa: tune prefetch in Rx path Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 13/13] mempool/dpaa: change the debug log level to DP Hemant Agrawal
  2018-09-14 10:56 ` [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Ferruh Yigit
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/include/compat.h | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/bus/dpaa/include/compat.h b/drivers/bus/dpaa/include/compat.h
index 92241d2..4122657 100644
--- a/drivers/bus/dpaa/include/compat.h
+++ b/drivers/bus/dpaa/include/compat.h
@@ -57,8 +57,9 @@
 #ifndef __packed
 #define __packed	__rte_packed
 #endif
+#ifndef noinline
 #define noinline	__attribute__((noinline))
-
+#endif
 #define L1_CACHE_BYTES 64
 #define ____cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES)))
 #define __stringify_1(x) #x
@@ -75,20 +76,25 @@
 		printf(fmt, ##args); \
 		fflush(stdout); \
 	} while (0)
-
+#ifndef pr_crit
 #define pr_crit(fmt, args...)	 prflush("CRIT:" fmt, ##args)
+#endif
+#ifndef pr_err
 #define pr_err(fmt, args...)	 prflush("ERR:" fmt, ##args)
+#endif
+#ifndef pr_warn
 #define pr_warn(fmt, args...)	 prflush("WARN:" fmt, ##args)
+#endif
+#ifndef pr_info
 #define pr_info(fmt, args...)	 prflush(fmt, ##args)
-
-#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS
-#ifdef pr_debug
-#undef pr_debug
 #endif
+#ifndef pr_debug
+#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS
 #define pr_debug(fmt, args...)	printf(fmt, ##args)
 #else
 #define pr_debug(fmt, args...) {}
 #endif
+#endif
 
 #define DPAA_BUG_ON(x) RTE_ASSERT(x)
 
@@ -256,7 +262,9 @@ __bswap_24(uint32_t x)
 #define be16_to_cpu(x) rte_be_to_cpu_16(x)
 
 #define cpu_to_be64(x) rte_cpu_to_be_64(x)
+#if !defined(cpu_to_be32)
 #define cpu_to_be32(x) rte_cpu_to_be_32(x)
+#endif
 #define cpu_to_be16(x) rte_cpu_to_be_16(x)
 
 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
-- 
2.7.4

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

* [dpdk-dev] [PATCH 13/13] mempool/dpaa: change the debug log level to DP
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
                   ` (11 preceding siblings ...)
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 12/13] bus/dpaa: add check for re-definition in compat Hemant Agrawal
@ 2018-08-29 10:47 ` Hemant Agrawal
  2018-09-14 10:56 ` [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Ferruh Yigit
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-08-29 10:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: dpdk-up

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/mempool/dpaa/dpaa_mempool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c
index 10c536b..1c12122 100644
--- a/drivers/mempool/dpaa/dpaa_mempool.c
+++ b/drivers/mempool/dpaa/dpaa_mempool.c
@@ -122,7 +122,7 @@ dpaa_buf_free(struct dpaa_bp_info *bp_info, uint64_t addr)
 	struct bm_buffer buf;
 	int ret;
 
-	DPAA_MEMPOOL_DEBUG("Free 0x%" PRIx64 " to bpid: %d",
+	DPAA_MEMPOOL_DPDEBUG("Free 0x%" PRIx64 " to bpid: %d",
 			   addr, bp_info->bpid);
 
 	bm_buffer_set64(&buf, addr);
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements
  2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
                   ` (12 preceding siblings ...)
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 13/13] mempool/dpaa: change the debug log level to DP Hemant Agrawal
@ 2018-09-14 10:56 ` Ferruh Yigit
  2018-09-16 19:44   ` Thomas Monjalon
  13 siblings, 1 reply; 48+ messages in thread
From: Ferruh Yigit @ 2018-09-14 10:56 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: dpdk-up

On 8/29/2018 11:47 AM, Hemant Agrawal wrote:
> 
> Hemant Agrawal (9):
>   net/dpaa: configure frame queue on MAC ID basis
>   net/dpaa: fix jumbo buffer config
>   net/dpaa: implement scatter offload support
>   net/dpaa: minor debug log enhancements
>   bus/dpaa: add interrupt based portal fd support
>   net/dpaa: separate Rx function for LS1046
>   net/dpaa: tune prefetch in Rx path
>   bus/dpaa: add check for re-definition in compat
>   mempool/dpaa: change the debug log level to DP
> 
> Nipun Gupta (2):
>   bus/dpaa: avoid tag Set for eqcr in Tx path
>   bus/dpaa: avoid using be conversions for contextb
> 
> Sachin Saxena (1):
>   net/dpaa: set correct speed based on MAC type
> 
> Sunil Kumar Kori (1):
>   net/dpaa: rearranging of atomic queue support code

Series applied to dpdk-next-net/master, thanks.

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

* Re: [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements
  2018-09-14 10:56 ` [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Ferruh Yigit
@ 2018-09-16 19:44   ` Thomas Monjalon
  2018-09-17  3:21     ` Hemant Agrawal
  0 siblings, 1 reply; 48+ messages in thread
From: Thomas Monjalon @ 2018-09-16 19:44 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dev, Ferruh Yigit, dpdk-up

14/09/2018 12:56, Ferruh Yigit:
> On 8/29/2018 11:47 AM, Hemant Agrawal wrote:
> > 
> > Hemant Agrawal (9):
> >   net/dpaa: configure frame queue on MAC ID basis
> >   net/dpaa: fix jumbo buffer config
> >   net/dpaa: implement scatter offload support
> >   net/dpaa: minor debug log enhancements
> >   bus/dpaa: add interrupt based portal fd support
> >   net/dpaa: separate Rx function for LS1046
> >   net/dpaa: tune prefetch in Rx path
> >   bus/dpaa: add check for re-definition in compat
> >   mempool/dpaa: change the debug log level to DP
> > 
> > Nipun Gupta (2):
> >   bus/dpaa: avoid tag Set for eqcr in Tx path
> >   bus/dpaa: avoid using be conversions for contextb
> > 
> > Sachin Saxena (1):
> >   net/dpaa: set correct speed based on MAC type
> > 
> > Sunil Kumar Kori (1):
> >   net/dpaa: rearranging of atomic queue support code
> 
> Series applied to dpdk-next-net/master, thanks.

I cannot take this series in the master branch for 2 reasons:

1/ The symbol qman_portal_ucode_poll_rx is added in the .map but not defined.

2/ The commits have no explanation.
Reminder: http://mails.dpdk.org/archives/dev/2018-July/107793.html

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

* Re: [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements
  2018-09-16 19:44   ` Thomas Monjalon
@ 2018-09-17  3:21     ` Hemant Agrawal
  0 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-17  3:21 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Ferruh Yigit, dpdk-up

OK. We will rework and re-post the series.


-----Original Message-----
From: Thomas Monjalon <thomas@monjalon.net> 
Sent: Monday, September 17, 2018 1:14 AM
To: Hemant Agrawal <hemant.agrawal@nxp.com>
Cc: dev@dpdk.org; Ferruh Yigit <ferruh.yigit@intel.com>; dpdk-up <dpdk-up@NXP1.onmicrosoft.com>
Subject: Re: [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements
Importance: High

14/09/2018 12:56, Ferruh Yigit:
> On 8/29/2018 11:47 AM, Hemant Agrawal wrote:
> >
> > Hemant Agrawal (9):
> >   net/dpaa: configure frame queue on MAC ID basis
> >   net/dpaa: fix jumbo buffer config
> >   net/dpaa: implement scatter offload support
> >   net/dpaa: minor debug log enhancements
> >   bus/dpaa: add interrupt based portal fd support
> >   net/dpaa: separate Rx function for LS1046
> >   net/dpaa: tune prefetch in Rx path
> >   bus/dpaa: add check for re-definition in compat
> >   mempool/dpaa: change the debug log level to DP
> >
> > Nipun Gupta (2):
> >   bus/dpaa: avoid tag Set for eqcr in Tx path
> >   bus/dpaa: avoid using be conversions for contextb
> >
> > Sachin Saxena (1):
> >   net/dpaa: set correct speed based on MAC type
> >
> > Sunil Kumar Kori (1):
> >   net/dpaa: rearranging of atomic queue support code
>
> Series applied to dpdk-next-net/master, thanks.

I cannot take this series in the master branch for 2 reasons:

1/ The symbol qman_portal_ucode_poll_rx is added in the .map but not defined.

2/ The commits have no explanation.
Reminder: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmails.dpdk.org%2Farchives%2Fdev%2F2018-July%2F107793.html&amp;data=02%7C01%7Chemant.agrawal%40nxp.com%7Caaef55f6bfd34565760908d61c0ccca6%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636727238631655647&amp;sdata=Y6c%2FWo4Q6aQl7HPgjILi4Rbi%2Bl6LkKYVBdXU2vN4ES4%3D&amp;reserved=0




----------

You're receiving this message because you're a member of the dpdk-up group.

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

* [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements
  2018-08-29 10:47 ` [dpdk-dev] [PATCH 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
@ 2018-09-18 13:31   ` Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
                       ` (12 more replies)
  0 siblings, 13 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

Misc fixes for dpaa driver

V2: remove the unused function from map file
    Add description/details in git commit logs.


Hemant Agrawal (9):
  net/dpaa: configure frame queue on MAC ID basis
  net/dpaa: fix jumbo buffer config
  net/dpaa: implement scatter offload support
  net/dpaa: minor debug log enhancements
  bus/dpaa: add interrupt based portal fd support
  net/dpaa: separate Rx function for LS1046
  net/dpaa: tune prefetch in Rx path
  bus/dpaa: add check for re-definition in compat
  mempool/dpaa: change the debug log level to DP

Nipun Gupta (2):
  bus/dpaa: avoid tag Set for eqcr in Tx path
  bus/dpaa: avoid using be conversions for contextb

Sachin Saxena (1):
  net/dpaa: fix link speed based on MAC type

Sunil Kumar Kori (1):
  net/dpaa: rearranging of atomic queue support code

 drivers/bus/dpaa/base/qbman/bman_driver.c |  17 ++--
 drivers/bus/dpaa/base/qbman/qman.c        |  72 +++++++++++++----
 drivers/bus/dpaa/base/qbman/qman_driver.c |   7 +-
 drivers/bus/dpaa/include/compat.h         |  20 +++--
 drivers/bus/dpaa/include/fsl_qman.h       |  20 +++++
 drivers/bus/dpaa/include/fsl_usd.h        |   6 ++
 drivers/bus/dpaa/rte_bus_dpaa_version.map |  16 +++-
 drivers/mempool/dpaa/dpaa_mempool.c       |   2 +-
 drivers/net/dpaa/dpaa_ethdev.c            | 126 ++++++++++++++++++++++++------
 drivers/net/dpaa/dpaa_ethdev.h            |   5 +-
 drivers/net/dpaa/dpaa_rxtx.c              | 100 ++++++++++++++++--------
 drivers/net/dpaa/dpaa_rxtx.h              |   5 +-
 12 files changed, 305 insertions(+), 91 deletions(-)

-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 01/13] net/dpaa: configure frame queue on MAC ID basis
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 02/13] net/dpaa: fix jumbo buffer config Hemant Agrawal
                       ` (11 subsequent siblings)
  12 siblings, 1 reply; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

The current code has the hardcoded seq for fq allocation.
It require multiple changes, when some of the interfaces
are assigned to kernel stack. Changing it on the mac
id basis provide the flexibility to assign any interface
to kernel.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 25 ++++++++++++++-----------
 drivers/net/dpaa/dpaa_ethdev.h |  2 +-
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 30eff65..b9bd557 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -1011,7 +1011,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 {
 	struct qm_mcc_initfq opts = {0};
 	int ret;
-	u32 flags = 0;
+	u32 flags = QMAN_FQ_FLAG_NO_ENQUEUE;
 	struct qm_mcc_initcgr cgr_opts = {
 		.we_mask = QM_CGR_WE_CS_THRES |
 				QM_CGR_WE_CSTD_EN |
@@ -1024,15 +1024,18 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 
 	PMD_INIT_FUNC_TRACE();
 
-	ret = qman_reserve_fqid(fqid);
-	if (ret) {
-		DPAA_PMD_ERR("reserve rx fqid 0x%x failed with ret: %d",
-			     fqid, ret);
-		return -EINVAL;
+	if (fqid) {
+		ret = qman_reserve_fqid(fqid);
+		if (ret) {
+			DPAA_PMD_ERR("reserve rx fqid 0x%x failed with ret: %d",
+				     fqid, ret);
+			return -EINVAL;
+		}
+	} else {
+		flags |= QMAN_FQ_FLAG_DYNAMIC_FQID;
 	}
-
 	DPAA_PMD_DEBUG("creating rx fq %p, fqid 0x%x", fq, fqid);
-	ret = qman_create_fq(fqid, QMAN_FQ_FLAG_NO_ENQUEUE, fq);
+	ret = qman_create_fq(fqid, flags, fq);
 	if (ret) {
 		DPAA_PMD_ERR("create rx fqid 0x%x failed with ret: %d",
 			fqid, ret);
@@ -1051,7 +1054,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 		if (ret) {
 			DPAA_PMD_WARN(
 				"rx taildrop init fail on rx fqid 0x%x(ret=%d)",
-				fqid, ret);
+				fq->fqid, ret);
 			goto without_cgr;
 		}
 		opts.we_mask |= QM_INITFQ_WE_CGID;
@@ -1059,7 +1062,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 		opts.fqd.fq_ctrl |= QM_FQCTRL_CGE;
 	}
 without_cgr:
-	ret = qman_init_fq(fq, flags, &opts);
+	ret = qman_init_fq(fq, 0, &opts);
 	if (ret)
 		DPAA_PMD_ERR("init rx fqid 0x%x failed with ret:%d", fqid, ret);
 	return ret;
@@ -1212,7 +1215,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 		if (default_q)
 			fqid = cfg->rx_def;
 		else
-			fqid = DPAA_PCD_FQID_START + dpaa_intf->ifid *
+			fqid = DPAA_PCD_FQID_START + dpaa_intf->fif->mac_idx *
 				DPAA_PCD_FQID_MULTIPLIER + loop;
 
 		if (dpaa_intf->cgr_rx)
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index c79b9f8..2c38c34 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -63,7 +63,7 @@
 #define DPAA_PCD_FQID_START		0x400
 #define DPAA_PCD_FQID_MULTIPLIER	0x100
 #define DPAA_DEFAULT_NUM_PCD_QUEUES	1
-#define DPAA_MAX_NUM_PCD_QUEUES		32
+#define DPAA_MAX_NUM_PCD_QUEUES		4
 
 #define DPAA_IF_TX_PRIORITY		3
 #define DPAA_IF_RX_PRIORITY		0
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 02/13] net/dpaa: fix jumbo buffer config
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  2018-09-18 14:03       ` Thomas Monjalon
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 03/13] net/dpaa: implement scatter offload support Hemant Agrawal
                       ` (10 subsequent siblings)
  12 siblings, 1 reply; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit; +Cc: stable

Avoid return after the jumbo buffer config in dev config API

Fixes: 9658ac3a4ef6 ("net/dpaa: set the correct frame size in device MTU")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index b9bd557..db166f5 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -195,11 +195,17 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 	if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
 		if (dev->data->dev_conf.rxmode.max_rx_pkt_len <=
 		    DPAA_MAX_RX_PKT_LEN) {
+			DPAA_PMD_DEBUG("enabling jumbo");
 			fman_if_set_maxfrm(dpaa_intf->fif,
 				dev->data->dev_conf.rxmode.max_rx_pkt_len);
-			return 0;
+			dev->data->mtu =
+				dev->data->dev_conf.rxmode.max_rx_pkt_len -
+				ETHER_HDR_LEN - ETHER_CRC_LEN - VLAN_TAG_SIZE;
 		} else {
-			return -1;
+			DPAA_PMD_ERR("enabling jumbo err conf max len=%d "
+				"supported is %d",
+				dev->data->dev_conf.rxmode.max_rx_pkt_len,
+				DPAA_MAX_RX_PKT_LEN);
 		}
 	}
 	return 0;
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 03/13] net/dpaa: implement scatter offload support
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 02/13] net/dpaa: fix jumbo buffer config Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 04/13] net/dpaa: fix link speed based on MAC type Hemant Agrawal
                       ` (9 subsequent siblings)
  12 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

This patch implement the sg support, which can be
enabled/disabled w.r.t configuration.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 62 +++++++++++++++++++++++++++++++++++++++---
 drivers/net/dpaa/dpaa_ethdev.h |  3 +-
 drivers/net/dpaa/dpaa_rxtx.c   |  8 +++---
 drivers/net/dpaa/dpaa_rxtx.h   |  2 --
 4 files changed, 64 insertions(+), 11 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index db166f5..9ea8510 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -47,15 +47,15 @@
 
 /* Supported Rx offloads */
 static uint64_t dev_rx_offloads_sup =
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_SCATTER;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
 		DEV_RX_OFFLOAD_TCP_CKSUM |
-		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
-		DEV_RX_OFFLOAD_SCATTER;
+		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM;
 
 /* Supported Tx offloads */
 static uint64_t dev_tx_offloads_sup;
@@ -147,11 +147,30 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	struct dpaa_if *dpaa_intf = dev->data->dev_private;
 	uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN
 				+ VLAN_TAG_SIZE;
+	uint32_t buffsz = dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM;
 
 	PMD_INIT_FUNC_TRACE();
 
 	if (mtu < ETHER_MIN_MTU || frame_size > DPAA_MAX_RX_PKT_LEN)
 		return -EINVAL;
+	/*
+	 * Refuse mtu that requires the support of scattered packets
+	 * when this feature has not been enabled before.
+	 */
+	if (dev->data->min_rx_buf_size &&
+		!dev->data->scattered_rx && frame_size > buffsz) {
+		DPAA_PMD_ERR("SG not enabled, will not fit in one buffer");
+		return -EINVAL;
+	}
+
+	/* check <seg size> * <max_seg>  >= max_frame */
+	if (dev->data->min_rx_buf_size && dev->data->scattered_rx &&
+		(frame_size > buffsz * DPAA_SGT_MAX_ENTRIES)) {
+		DPAA_PMD_ERR("Too big to fit for Max SG list %d",
+				buffsz * DPAA_SGT_MAX_ENTRIES);
+		return -EINVAL;
+	}
+
 	if (frame_size > ETHER_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads &=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
@@ -208,6 +227,13 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 				DPAA_MAX_RX_PKT_LEN);
 		}
 	}
+
+	if (rx_offloads & DEV_RX_OFFLOAD_SCATTER) {
+		DPAA_PMD_DEBUG("enabling scatter mode");
+		fman_if_set_sg(dpaa_intf->fif, 1);
+		dev->data->scattered_rx = 1;
+	}
+
 	return 0;
 }
 
@@ -305,7 +331,6 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev,
 
 	dev_info->max_rx_queues = dpaa_intf->nb_rx_queues;
 	dev_info->max_tx_queues = dpaa_intf->nb_tx_queues;
-	dev_info->min_rx_bufsize = DPAA_MIN_RX_BUF_SIZE;
 	dev_info->max_rx_pktlen = DPAA_MAX_RX_PKT_LEN;
 	dev_info->max_mac_addrs = DPAA_MAX_MAC_FILTER;
 	dev_info->max_hash_mac_addrs = 0;
@@ -519,6 +544,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	struct qm_mcc_initfq opts = {0};
 	u32 flags = 0;
 	int ret;
+	u32 buffsz = rte_pktmbuf_data_room_size(mp) - RTE_PKTMBUF_HEADROOM;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -532,6 +558,28 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	DPAA_PMD_INFO("Rx queue setup for queue index: %d fq_id (0x%x)",
 			queue_idx, rxq->fqid);
 
+	/* Max packet can fit in single buffer */
+	if (dev->data->dev_conf.rxmode.max_rx_pkt_len <= buffsz) {
+		;
+	} else if (dev->data->dev_conf.rxmode.offloads &
+			DEV_RX_OFFLOAD_SCATTER) {
+		if (dev->data->dev_conf.rxmode.max_rx_pkt_len >
+			buffsz * DPAA_SGT_MAX_ENTRIES) {
+			DPAA_PMD_ERR("max RxPkt size %d too big to fit "
+				"MaxSGlist %d",
+				dev->data->dev_conf.rxmode.max_rx_pkt_len,
+				buffsz * DPAA_SGT_MAX_ENTRIES);
+			rte_errno = EOVERFLOW;
+			return -rte_errno;
+		}
+	} else {
+		DPAA_PMD_WARN("The requested maximum Rx packet size (%u) is"
+		     " larger than a single mbuf (%u) and scattered"
+		     " mode has not been requested",
+		     dev->data->dev_conf.rxmode.max_rx_pkt_len,
+		     buffsz - RTE_PKTMBUF_HEADROOM);
+	}
+
 	if (!dpaa_intf->bp_info || dpaa_intf->bp_info->mp != mp) {
 		struct fman_if_ic_params icp;
 		uint32_t fd_offset;
@@ -562,6 +610,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 			    dpaa_intf->name, fd_offset,
 			fman_if_get_fdoff(dpaa_intf->fif));
 	}
+	DPAA_PMD_DEBUG("if:%s sg_on = %d, max_frm =%d", dpaa_intf->name,
+		fman_if_get_sg_enable(dpaa_intf->fif),
+		dev->data->dev_conf.rxmode.max_rx_pkt_len);
 	/* checking if push mode only, no error check for now */
 	if (dpaa_push_mode_max_queue > dpaa_push_queue_idx) {
 		dpaa_push_queue_idx++;
@@ -1312,6 +1363,9 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 	fman_if_reset_mcast_filter_table(fman_intf);
 	/* Reset interface statistics */
 	fman_if_stats_reset(fman_intf);
+	/* Disable SG by default */
+	fman_if_set_sg(fman_intf, 0);
+	fman_if_set_maxfrm(fman_intf, ETHER_MAX_LEN + VLAN_TAG_SIZE);
 
 	return 0;
 
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index 2c38c34..2fc7231 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -39,9 +39,10 @@
 /* Alignment to use for cpu-local structs to avoid coherency problems. */
 #define MAX_CACHELINE			64
 
-#define DPAA_MIN_RX_BUF_SIZE 512
 #define DPAA_MAX_RX_PKT_LEN  10240
 
+#define DPAA_SGT_MAX_ENTRIES 16 /* maximum number of entries in SG Table */
+
 /* RX queue tail drop threshold (CGR Based) in frame count */
 #define CGR_RX_PERFQ_THRESH 256
 
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 168b77e..3a3a048 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -306,8 +306,6 @@ dpaa_eth_sg_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	int i = 0;
 	uint8_t fd_offset = fd->offset;
 
-	DPAA_DP_LOG(DEBUG, "Received an SG frame");
-
 	vaddr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd));
 	if (!vaddr) {
 		DPAA_PMD_ERR("unable to convert physical address");
@@ -349,6 +347,8 @@ dpaa_eth_sg_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 		}
 		prev_seg = cur_seg;
 	}
+	DPAA_DP_LOG(DEBUG, "Received an SG frame len =%d, num_sg =%d",
+			first_seg->pkt_len, first_seg->nb_segs);
 
 	dpaa_eth_packet_info(first_seg, vaddr);
 	rte_pktmbuf_free_seg(temp);
@@ -367,8 +367,6 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	uint16_t offset;
 	uint32_t length;
 
-	DPAA_DP_LOG(DEBUG, " FD--->MBUF");
-
 	if (unlikely(format == qm_fd_sg))
 		return dpaa_eth_sg_to_mbuf(fd, ifid);
 
@@ -379,6 +377,8 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	offset = (fd->opaque & DPAA_FD_OFFSET_MASK) >> DPAA_FD_OFFSET_SHIFT;
 	length = fd->opaque & DPAA_FD_LENGTH_MASK;
 
+	DPAA_DP_LOG(DEBUG, " FD--->MBUF off %d len = %d", offset, length);
+
 	/* Ignoring case when format != qm_fd_contig */
 	dpaa_display_frame(fd);
 
diff --git a/drivers/net/dpaa/dpaa_rxtx.h b/drivers/net/dpaa/dpaa_rxtx.h
index d3e6351..6de70a7 100644
--- a/drivers/net/dpaa/dpaa_rxtx.h
+++ b/drivers/net/dpaa/dpaa_rxtx.h
@@ -32,8 +32,6 @@
 /* L4 Type field: TCP */
 #define DPAA_L4_PARSE_RESULT_TCP	0x20
 
-#define DPAA_SGT_MAX_ENTRIES 16 /* maximum number of entries in SG Table */
-
 #define DPAA_MAX_DEQUEUE_NUM_FRAMES    63
 	/** <Maximum number of frames to be dequeued in a single rx call*/
 
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 04/13] net/dpaa: fix link speed based on MAC type
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
                       ` (2 preceding siblings ...)
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 03/13] net/dpaa: implement scatter offload support Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 05/13] net/dpaa: minor debug log enhancements Hemant Agrawal
                       ` (8 subsequent siblings)
  12 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit; +Cc: Sachin Saxena, shreyansh.jain, stable

From: Sachin Saxena <sachin.saxena@nxp.com>

The link speed shall be on the basis of mac type.

Fixes: 799db4568c76 ("net/dpaa: support device info and speed capability")
Cc: shreyansh.jain@nxp.com
Cc: stable@dpdk.org

Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 9ea8510..fa63afc 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -337,8 +337,15 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev,
 	dev_info->max_vfs = 0;
 	dev_info->max_vmdq_pools = ETH_16_POOLS;
 	dev_info->flow_type_rss_offloads = DPAA_RSS_OFFLOAD_ALL;
-	dev_info->speed_capa = (ETH_LINK_SPEED_1G |
-				ETH_LINK_SPEED_10G);
+
+	if (dpaa_intf->fif->mac_type == fman_mac_1g)
+		dev_info->speed_capa = ETH_LINK_SPEED_1G;
+	else if (dpaa_intf->fif->mac_type == fman_mac_10g)
+		dev_info->speed_capa = (ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G);
+	else
+		DPAA_PMD_ERR("invalid link_speed: %s, %d",
+			     dpaa_intf->name, dpaa_intf->fif->mac_type);
+
 	dev_info->rx_offload_capa = dev_rx_offloads_sup |
 					dev_rx_offloads_nodis;
 	dev_info->tx_offload_capa = dev_tx_offloads_sup |
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 05/13] net/dpaa: minor debug log enhancements
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
                       ` (3 preceding siblings ...)
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 04/13] net/dpaa: fix link speed based on MAC type Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 06/13] bus/dpaa: add interrupt based portal fd support Hemant Agrawal
                       ` (7 subsequent siblings)
  12 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

Improving the debug message for event mode and
reducing the log level for less important log

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index fa63afc..c2d6f44 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -613,9 +613,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		fman_if_set_bp(dpaa_intf->fif, mp->size,
 			       dpaa_intf->bp_info->bpid, bp_size);
 		dpaa_intf->valid = 1;
-		DPAA_PMD_INFO("if =%s - fd_offset = %d offset = %d",
-			    dpaa_intf->name, fd_offset,
-			fman_if_get_fdoff(dpaa_intf->fif));
+		DPAA_PMD_DEBUG("if:%s fd_offset = %d offset = %d",
+				dpaa_intf->name, fd_offset,
+				fman_if_get_fdoff(dpaa_intf->fif));
 	}
 	DPAA_PMD_DEBUG("if:%s sg_on = %d, max_frm =%d", dpaa_intf->name,
 		fman_if_get_sg_enable(dpaa_intf->fif),
@@ -693,7 +693,8 @@ dpaa_eth_eventq_attach(const struct rte_eth_dev *dev,
 	struct qm_mcc_initfq opts = {0};
 
 	if (dpaa_push_mode_max_queue)
-		DPAA_PMD_WARN("PUSH mode already enabled for first %d queues.\n"
+		DPAA_PMD_WARN("PUSH mode q and EVENTDEV are not compatible\n"
+			      "PUSH mode already enabled for first %d queues.\n"
 			      "To disable set DPAA_PUSH_QUEUES_NUMBER to 0\n",
 			      dpaa_push_mode_max_queue);
 
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 06/13] bus/dpaa: add interrupt based portal fd support
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
                       ` (4 preceding siblings ...)
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 05/13] net/dpaa: minor debug log enhancements Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path Hemant Agrawal
                       ` (6 subsequent siblings)
  12 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

This patch add supports in bus driver for qbman to support
and configure portal based FDs, which can be used for interrupt
based processing.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/base/qbman/bman_driver.c | 17 ++++++----
 drivers/bus/dpaa/base/qbman/qman.c        | 52 +++++++++++++++++++++++++++++++
 drivers/bus/dpaa/base/qbman/qman_driver.c |  7 ++++-
 drivers/bus/dpaa/include/fsl_qman.h       | 20 ++++++++++++
 drivers/bus/dpaa/include/fsl_usd.h        |  6 ++++
 drivers/bus/dpaa/rte_bus_dpaa_version.map | 16 +++++++++-
 6 files changed, 110 insertions(+), 8 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/bman_driver.c b/drivers/bus/dpaa/base/qbman/bman_driver.c
index b14b590..750b756 100644
--- a/drivers/bus/dpaa/base/qbman/bman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/bman_driver.c
@@ -23,7 +23,7 @@ static void *bman_ccsr_map;
 /* Portal driver */
 /*****************/
 
-static __thread int fd = -1;
+static __thread int bmfd = -1;
 static __thread struct bm_portal_config pcfg;
 static __thread struct dpaa_ioctl_portal_map map = {
 	.type = dpaa_portal_bman
@@ -70,14 +70,14 @@ static int fsl_bman_portal_init(uint32_t idx, int is_shared)
 	pcfg.index = map.index;
 	bman_depletion_fill(&pcfg.mask);
 
-	fd = open(BMAN_PORTAL_IRQ_PATH, O_RDONLY);
-	if (fd == -1) {
+	bmfd = open(BMAN_PORTAL_IRQ_PATH, O_RDONLY);
+	if (bmfd == -1) {
 		pr_err("BMan irq init failed");
 		process_portal_unmap(&map.addr);
 		return -EBUSY;
 	}
 	/* Use the IRQ FD as a unique IRQ number */
-	pcfg.irq = fd;
+	pcfg.irq = bmfd;
 
 	portal = bman_create_affine_portal(&pcfg);
 	if (!portal) {
@@ -90,7 +90,7 @@ static int fsl_bman_portal_init(uint32_t idx, int is_shared)
 	/* Set the IRQ number */
 	irq_map.type = dpaa_portal_bman;
 	irq_map.portal_cinh = map.addr.cinh;
-	process_portal_irq_map(fd, &irq_map);
+	process_portal_irq_map(bmfd, &irq_map);
 	return 0;
 }
 
@@ -99,7 +99,7 @@ static int fsl_bman_portal_finish(void)
 	__maybe_unused const struct bm_portal_config *cfg;
 	int ret;
 
-	process_portal_irq_unmap(fd);
+	process_portal_irq_unmap(bmfd);
 
 	cfg = bman_destroy_affine_portal();
 	DPAA_BUG_ON(cfg != &pcfg);
@@ -109,6 +109,11 @@ static int fsl_bman_portal_finish(void)
 	return ret;
 }
 
+int bman_thread_fd(void)
+{
+	return bmfd;
+}
+
 int bman_thread_init(void)
 {
 	/* Convert from contiguous/virtual cpu numbering to real cpu when
diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 7c17027..8730550 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -1040,6 +1040,50 @@ static inline unsigned int __poll_portal_fast(struct qman_portal *p,
 	return limit;
 }
 
+int qman_irqsource_add(u32 bits)
+{
+	struct qman_portal *p = get_affine_portal();
+
+	bits = bits & QM_PIRQ_VISIBLE;
+
+	/* Clear any previously remaining interrupt conditions in
+	 * QCSP_ISR. This prevents raising a false interrupt when
+	 * interrupt conditions are enabled in QCSP_IER.
+	 */
+	qm_isr_status_clear(&p->p, bits);
+	dpaa_set_bits(bits, &p->irq_sources);
+	qm_isr_enable_write(&p->p, p->irq_sources);
+
+
+	return 0;
+}
+
+int qman_irqsource_remove(u32 bits)
+{
+	struct qman_portal *p = get_affine_portal();
+	u32 ier;
+
+	/* Our interrupt handler only processes+clears status register bits that
+	 * are in p->irq_sources. As we're trimming that mask, if one of them
+	 * were to assert in the status register just before we remove it from
+	 * the enable register, there would be an interrupt-storm when we
+	 * release the IRQ lock. So we wait for the enable register update to
+	 * take effect in h/w (by reading it back) and then clear all other bits
+	 * in the status register. Ie. we clear them from ISR once it's certain
+	 * IER won't allow them to reassert.
+	 */
+
+	bits &= QM_PIRQ_VISIBLE;
+	dpaa_clear_bits(bits, &p->irq_sources);
+	qm_isr_enable_write(&p->p, p->irq_sources);
+	ier = qm_isr_enable_read(&p->p);
+	/* Using "~ier" (rather than "bits" or "~p->irq_sources") creates a
+	 * data-dependency, ie. to protect against re-ordering.
+	 */
+	qm_isr_status_clear(&p->p, ~ier);
+	return 0;
+}
+
 u16 qman_affine_channel(int cpu)
 {
 	if (cpu < 0) {
@@ -1114,6 +1158,14 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
 	return rx_number;
 }
 
+void qman_clear_irq(void)
+{
+	struct qman_portal *p = get_affine_portal();
+	u32 clear = QM_DQAVAIL_MASK | (p->irq_sources &
+		~(QM_PIRQ_CSCI | QM_PIRQ_CCSCI));
+	qm_isr_status_clear(&p->p, clear);
+}
+
 u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 			void **bufs)
 {
diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c
index f6ecd6b..ba15339 100644
--- a/drivers/bus/dpaa/base/qbman/qman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/qman_driver.c
@@ -113,6 +113,11 @@ static int fsl_qman_portal_finish(void)
 	return ret;
 }
 
+int qman_thread_fd(void)
+{
+	return qmfd;
+}
+
 int qman_thread_init(void)
 {
 	/* Convert from contiguous/virtual cpu numbering to real cpu when
@@ -135,7 +140,7 @@ void qman_thread_irq(void)
 	 * rather than breaking that encapsulation I am simply hard-coding the
 	 * offset to the inhibit register here.
 	 */
-	out_be32(qpcfg.addr_virt[DPAA_PORTAL_CI] + 0xe0c, 0);
+	out_be32(qpcfg.addr_virt[DPAA_PORTAL_CI] + 0x36C0, 0);
 }
 
 struct qman_portal *fsl_qman_portal_create(void)
diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index b18cf03..e438414 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -1316,6 +1316,26 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 			void **bufs);
 
 /**
+ * qman_irqsource_add - add processing sources to be interrupt-driven
+ * @bits: bitmask of QM_PIRQ_**I processing sources
+ *
+ * Adds processing sources that should be interrupt-driven (rather than
+ * processed via qman_poll_***() functions). Returns zero for success, or
+ * -EINVAL if the current CPU is sharing a portal hosted on another CPU.
+ */
+int qman_irqsource_add(u32 bits);
+
+/**
+ * qman_irqsource_remove - remove processing sources from being interrupt-driven
+ * @bits: bitmask of QM_PIRQ_**I processing sources
+ *
+ * Removes processing sources from being interrupt-driven, so that they will
+ * instead be processed via qman_poll_***() functions. Returns zero for success,
+ * or -EINVAL if the current CPU is sharing a portal hosted on another CPU.
+ */
+int qman_irqsource_remove(u32 bits);
+
+/**
  * qman_affine_channel - return the channel ID of an portal
  * @cpu: the cpu whose affine portal is the subject of the query
  *
diff --git a/drivers/bus/dpaa/include/fsl_usd.h b/drivers/bus/dpaa/include/fsl_usd.h
index e183617..ec1ab7c 100644
--- a/drivers/bus/dpaa/include/fsl_usd.h
+++ b/drivers/bus/dpaa/include/fsl_usd.h
@@ -55,6 +55,10 @@ int qman_free_raw_portal(struct dpaa_raw_portal *portal);
 int bman_allocate_raw_portal(struct dpaa_raw_portal *portal);
 int bman_free_raw_portal(struct dpaa_raw_portal *portal);
 
+/* Obtain thread-local UIO file-descriptors */
+int qman_thread_fd(void);
+int bman_thread_fd(void);
+
 /* Post-process interrupts. NB, the kernel IRQ handler disables the interrupt
  * line before notifying us, and this post-processing re-enables it once
  * processing is complete. As such, it is essential to call this before going
@@ -63,6 +67,8 @@ int bman_free_raw_portal(struct dpaa_raw_portal *portal);
 void qman_thread_irq(void);
 void bman_thread_irq(void);
 
+void qman_clear_irq(void);
+
 /* Global setup */
 int qman_global_init(void);
 int bman_global_init(void);
diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map
index 7d6d624..70076c7 100644
--- a/drivers/bus/dpaa/rte_bus_dpaa_version.map
+++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map
@@ -95,10 +95,24 @@ DPDK_18.02 {
 
 DPDK_18.08 {
 	global:
-
 	fman_if_get_sg_enable;
 	fman_if_set_sg;
 	of_get_mac_address;
 
 	local: *;
 } DPDK_18.02;
+
+DPDK_18.11 {
+	global:
+	bman_thread_irq;
+	fman_if_get_sg_enable;
+	fman_if_set_sg;
+	qman_clear_irq;
+
+	qman_irqsource_add;
+	qman_irqsource_remove;
+	qman_thread_fd;
+	qman_thread_irq;
+
+	local: *;
+} DPDK_18.08;
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
                       ` (5 preceding siblings ...)
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 06/13] bus/dpaa: add interrupt based portal fd support Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 08/13] bus/dpaa: avoid using be conversions for contextb Hemant Agrawal
                       ` (5 subsequent siblings)
  12 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit; +Cc: Nipun Gupta

From: Nipun Gupta <nipun.gupta@nxp.com>

Minor optimization for TX path.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/dpaa/base/qbman/qman.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 8730550..71da275 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -2238,11 +2238,6 @@ int qman_enqueue_multi(struct qman_fq *fq,
 	/* try to send as many frames as possible */
 	while (eqcr->available && frames_to_send--) {
 		eq->fqid = fq->fqid_le;
-#ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-		eq->tag = cpu_to_be32(fq->key);
-#else
-		eq->tag = cpu_to_be32((u32)(uintptr_t)fq);
-#endif
 		eq->fd.opaque_addr = fd->opaque_addr;
 		eq->fd.addr = cpu_to_be40(fd->addr);
 		eq->fd.status = cpu_to_be32(fd->status);
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 08/13] bus/dpaa: avoid using be conversions for contextb
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
                       ` (6 preceding siblings ...)
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 09/13] net/dpaa: rearranging of atomic queue support code Hemant Agrawal
                       ` (4 subsequent siblings)
  12 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit; +Cc: Nipun Gupta

From: Nipun Gupta <nipun.gupta@nxp.com>

minor optimization in packet handling path

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/dpaa/base/qbman/qman.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 71da275..dc64d08 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -852,11 +852,9 @@ static u32 __poll_portal_slow(struct qman_portal *p, u32 is)
 			case QM_MR_VERB_FQPN:
 				/* Parked */
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-				fq = get_fq_table_entry(
-					be32_to_cpu(msg->fq.contextB));
+				fq = get_fq_table_entry(msg->fq.contextB);
 #else
-				fq = (void *)(uintptr_t)
-					be32_to_cpu(msg->fq.contextB);
+				fq = (void *)(uintptr_t)msg->fq.contextB;
 #endif
 				fq_state_change(p, fq, msg, verb);
 				if (fq->cb.fqs)
@@ -967,7 +965,6 @@ static inline unsigned int __poll_portal_fast(struct qman_portal *p,
 		*shadow = *dq;
 		dq = shadow;
 		shadow->fqid = be32_to_cpu(shadow->fqid);
-		shadow->contextB = be32_to_cpu(shadow->contextB);
 		shadow->seqnum = be16_to_cpu(shadow->seqnum);
 		hw_fd_to_cpu(&shadow->fd);
 #endif
@@ -1136,9 +1133,9 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
 
 		/* SDQCR: context_b points to the FQ */
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-		fq = qman_fq_lookup_table[be32_to_cpu(dq[rx_number]->contextB)];
+		fq = qman_fq_lookup_table[dq[rx_number]->contextB];
 #else
-		fq = (void *)be32_to_cpu(dq[rx_number]->contextB);
+		fq = (void *)dq[rx_number]->contextB;
 #endif
 		if (fq->cb.dqrr_prepare)
 			fq->cb.dqrr_prepare(shadow[rx_number],
@@ -1195,7 +1192,6 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 		*shadow = *dq;
 		dq = shadow;
 		shadow->fqid = be32_to_cpu(shadow->fqid);
-		shadow->contextB = be32_to_cpu(shadow->contextB);
 		shadow->seqnum = be16_to_cpu(shadow->seqnum);
 		hw_fd_to_cpu(&shadow->fd);
 #endif
@@ -1260,7 +1256,6 @@ struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq)
 	*shadow = *dq;
 	dq = shadow;
 	shadow->fqid = be32_to_cpu(shadow->fqid);
-	shadow->contextB = be32_to_cpu(shadow->contextB);
 	shadow->seqnum = be16_to_cpu(shadow->seqnum);
 	hw_fd_to_cpu(&shadow->fd);
 #endif
@@ -1556,7 +1551,7 @@ int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts)
 
 		mcc->initfq.we_mask |= QM_INITFQ_WE_CONTEXTB;
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-		mcc->initfq.fqd.context_b = fq->key;
+		mcc->initfq.fqd.context_b = cpu_to_be32(fq->key);
 #else
 		mcc->initfq.fqd.context_b = (u32)(uintptr_t)fq;
 #endif
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 09/13] net/dpaa: rearranging of atomic queue support code
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
                       ` (7 preceding siblings ...)
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 08/13] bus/dpaa: avoid using be conversions for contextb Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 10/13] net/dpaa: separate Rx function for LS1046 Hemant Agrawal
                       ` (3 subsequent siblings)
  12 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit; +Cc: Sunil Kumar Kori

From: Sunil Kumar Kori <sunil.kori@nxp.com>

This is to align the code with dpaa2 to ease out maintaince
of both driver code bases.

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
---
 drivers/net/dpaa/dpaa_rxtx.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 3a3a048..6698c97 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -870,6 +870,19 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 				DPAA_TX_BURST_SIZE : nb_bufs;
 		for (loop = 0; loop < frames_to_send; loop++) {
 			mbuf = *(bufs++);
+			seqn = mbuf->seqn;
+			if (seqn != DPAA_INVALID_MBUF_SEQN) {
+				index = seqn - 1;
+				if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) {
+					flags[loop] =
+					   ((index & QM_EQCR_DCA_IDXMASK) << 8);
+					flags[loop] |= QMAN_ENQUEUE_FLAG_DCA;
+					DPAA_PER_LCORE_DQRR_SIZE--;
+					DPAA_PER_LCORE_DQRR_HELD &=
+								~(1 << index);
+				}
+			}
+
 			if (likely(RTE_MBUF_DIRECT(mbuf))) {
 				mp = mbuf->pool;
 				bp_info = DPAA_MEMPOOL_TO_POOL_INFO(mp);
@@ -916,18 +929,6 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 					goto send_pkts;
 				}
 			}
-			seqn = mbuf->seqn;
-			if (seqn != DPAA_INVALID_MBUF_SEQN) {
-				index = seqn - 1;
-				if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) {
-					flags[loop] =
-					   ((index & QM_EQCR_DCA_IDXMASK) << 8);
-					flags[loop] |= QMAN_ENQUEUE_FLAG_DCA;
-					DPAA_PER_LCORE_DQRR_SIZE--;
-					DPAA_PER_LCORE_DQRR_HELD &=
-								~(1 << index);
-				}
-			}
 		}
 
 send_pkts:
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 10/13] net/dpaa: separate Rx function for LS1046
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
                       ` (8 preceding siblings ...)
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 09/13] net/dpaa: rearranging of atomic queue support code Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 11/13] net/dpaa: tune prefetch in Rx path Hemant Agrawal
                       ` (2 subsequent siblings)
  12 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

This is to avoid the checks in datapath and help in performance.
LS1046 has different data stash settings.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c |  9 +++++--
 drivers/net/dpaa/dpaa_rxtx.c   | 60 +++++++++++++++++++++++++++++++++---------
 drivers/net/dpaa/dpaa_rxtx.h   |  3 +++
 3 files changed, 58 insertions(+), 14 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index c2d6f44..c430cac 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -657,8 +657,13 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 				"ret:%d(%s)", rxq->fqid, ret, strerror(ret));
 			return ret;
 		}
-		rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb;
-		rxq->cb.dqrr_prepare = dpaa_rx_cb_prepare;
+		if (dpaa_svr_family == SVR_LS1043A_FAMILY) {
+			rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb_no_prefetch;
+		} else {
+			rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb;
+			rxq->cb.dqrr_prepare = dpaa_rx_cb_prepare;
+		}
+
 		rxq->is_static = true;
 	}
 	dev->data->rx_queues[queue_idx] = rxq;
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 6698c97..2c57741 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -398,8 +398,9 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	return mbuf;
 }
 
+/* Specific for LS1043 */
 void
-dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
+dpaa_rx_cb_no_prefetch(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
 	   void **bufs, int num_bufs)
 {
 	struct rte_mbuf *mbuf;
@@ -411,17 +412,13 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
 	uint32_t length;
 	uint8_t format;
 
-	if (dpaa_svr_family != SVR_LS1046A_FAMILY) {
-		bp_info = DPAA_BPID_TO_POOL_INFO(dqrr[0]->fd.bpid);
-		ptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[0]->fd));
-		rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
-		bufs[0] = (struct rte_mbuf *)((char *)ptr -
-				bp_info->meta_data_size);
-	}
+	bp_info = DPAA_BPID_TO_POOL_INFO(dqrr[0]->fd.bpid);
+	ptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[0]->fd));
+	rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
+	bufs[0] = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size);
 
 	for (i = 0; i < num_bufs; i++) {
-		if (dpaa_svr_family != SVR_LS1046A_FAMILY &&
-		    i < num_bufs - 1) {
+		if (i < num_bufs - 1) {
 			bp_info = DPAA_BPID_TO_POOL_INFO(dqrr[i + 1]->fd.bpid);
 			ptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[i + 1]->fd));
 			rte_prefetch0((void *)((uint8_t *)ptr +
@@ -458,6 +455,46 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
 	}
 }
 
+void
+dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
+	   void **bufs, int num_bufs)
+{
+	struct rte_mbuf *mbuf;
+	const struct qm_fd *fd;
+	struct dpaa_if *dpaa_intf;
+	uint16_t offset, i;
+	uint32_t length;
+	uint8_t format;
+
+	for (i = 0; i < num_bufs; i++) {
+		fd = &dqrr[i]->fd;
+		dpaa_intf = fq[0]->dpaa_intf;
+
+		format = (fd->opaque & DPAA_FD_FORMAT_MASK) >>
+				DPAA_FD_FORMAT_SHIFT;
+		if (unlikely(format == qm_fd_sg)) {
+			bufs[i] = dpaa_eth_sg_to_mbuf(fd, dpaa_intf->ifid);
+			continue;
+		}
+
+		offset = (fd->opaque & DPAA_FD_OFFSET_MASK) >>
+				DPAA_FD_OFFSET_SHIFT;
+		length = fd->opaque & DPAA_FD_LENGTH_MASK;
+
+		mbuf = bufs[i];
+		mbuf->data_off = offset;
+		mbuf->data_len = length;
+		mbuf->pkt_len = length;
+		mbuf->port = dpaa_intf->ifid;
+
+		mbuf->nb_segs = 1;
+		mbuf->ol_flags = 0;
+		mbuf->next = NULL;
+		rte_mbuf_refcnt_set(mbuf, 1);
+		dpaa_eth_packet_info(mbuf, mbuf->buf_addr);
+	}
+}
+
 void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs)
 {
 	struct dpaa_bp_info *bp_info = DPAA_BPID_TO_POOL_INFO(dq->fd.bpid);
@@ -468,8 +505,7 @@ void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs)
 	 * So we prefetch the annoation beforehand, so that it is available
 	 * in cache when accessed.
 	 */
-	if (dpaa_svr_family == SVR_LS1046A_FAMILY)
-		rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
+	rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
 
 	*bufs = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size);
 }
diff --git a/drivers/net/dpaa/dpaa_rxtx.h b/drivers/net/dpaa/dpaa_rxtx.h
index 6de70a7..75b093c 100644
--- a/drivers/net/dpaa/dpaa_rxtx.h
+++ b/drivers/net/dpaa/dpaa_rxtx.h
@@ -270,4 +270,7 @@ void dpaa_rx_cb(struct qman_fq **fq,
 		struct qm_dqrr_entry **dqrr, void **bufs, int num_bufs);
 
 void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs);
+
+void dpaa_rx_cb_no_prefetch(struct qman_fq **fq,
+		    struct qm_dqrr_entry **dqrr, void **bufs, int num_bufs);
 #endif
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 11/13] net/dpaa: tune prefetch in Rx path
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
                       ` (9 preceding siblings ...)
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 10/13] net/dpaa: separate Rx function for LS1046 Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 12/13] bus/dpaa: add check for re-definition in compat Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 13/13] mempool/dpaa: change the debug log level to DP Hemant Agrawal
  12 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

As part of performance optimization excercise, tuning
the prefetch placement.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_rxtx.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 2c57741..c4471c2 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -370,10 +370,6 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	if (unlikely(format == qm_fd_sg))
 		return dpaa_eth_sg_to_mbuf(fd, ifid);
 
-	ptr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd));
-
-	rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
-
 	offset = (fd->opaque & DPAA_FD_OFFSET_MASK) >> DPAA_FD_OFFSET_SHIFT;
 	length = fd->opaque & DPAA_FD_LENGTH_MASK;
 
@@ -381,8 +377,11 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 
 	/* Ignoring case when format != qm_fd_contig */
 	dpaa_display_frame(fd);
+	ptr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd));
 
 	mbuf = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size);
+	/* Prefetch the Parse results and packet data to L1 */
+	rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
 
 	mbuf->data_off = offset;
 	mbuf->data_len = length;
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 12/13] bus/dpaa: add check for re-definition in compat
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
                       ` (10 preceding siblings ...)
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 11/13] net/dpaa: tune prefetch in Rx path Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 13/13] mempool/dpaa: change the debug log level to DP Hemant Agrawal
  12 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

Few fields in compat are giving re-defination error
with new drivers such as caam_jr.
Checks have been added.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/include/compat.h | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/bus/dpaa/include/compat.h b/drivers/bus/dpaa/include/compat.h
index 92241d2..4122657 100644
--- a/drivers/bus/dpaa/include/compat.h
+++ b/drivers/bus/dpaa/include/compat.h
@@ -57,8 +57,9 @@
 #ifndef __packed
 #define __packed	__rte_packed
 #endif
+#ifndef noinline
 #define noinline	__attribute__((noinline))
-
+#endif
 #define L1_CACHE_BYTES 64
 #define ____cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES)))
 #define __stringify_1(x) #x
@@ -75,20 +76,25 @@
 		printf(fmt, ##args); \
 		fflush(stdout); \
 	} while (0)
-
+#ifndef pr_crit
 #define pr_crit(fmt, args...)	 prflush("CRIT:" fmt, ##args)
+#endif
+#ifndef pr_err
 #define pr_err(fmt, args...)	 prflush("ERR:" fmt, ##args)
+#endif
+#ifndef pr_warn
 #define pr_warn(fmt, args...)	 prflush("WARN:" fmt, ##args)
+#endif
+#ifndef pr_info
 #define pr_info(fmt, args...)	 prflush(fmt, ##args)
-
-#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS
-#ifdef pr_debug
-#undef pr_debug
 #endif
+#ifndef pr_debug
+#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS
 #define pr_debug(fmt, args...)	printf(fmt, ##args)
 #else
 #define pr_debug(fmt, args...) {}
 #endif
+#endif
 
 #define DPAA_BUG_ON(x) RTE_ASSERT(x)
 
@@ -256,7 +262,9 @@ __bswap_24(uint32_t x)
 #define be16_to_cpu(x) rte_be_to_cpu_16(x)
 
 #define cpu_to_be64(x) rte_cpu_to_be_64(x)
+#if !defined(cpu_to_be32)
 #define cpu_to_be32(x) rte_cpu_to_be_32(x)
+#endif
 #define cpu_to_be16(x) rte_cpu_to_be_16(x)
 
 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
-- 
2.7.4

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

* [dpdk-dev] [PATCH v2 13/13] mempool/dpaa: change the debug log level to DP
  2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
                       ` (11 preceding siblings ...)
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 12/13] bus/dpaa: add check for re-definition in compat Hemant Agrawal
@ 2018-09-18 13:31     ` Hemant Agrawal
  12 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-18 13:31 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

When the system goes out of buffers temporarily, the logs
further slow down the system. There is no need for this
continuos logs.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/mempool/dpaa/dpaa_mempool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c
index 10c536b..1c12122 100644
--- a/drivers/mempool/dpaa/dpaa_mempool.c
+++ b/drivers/mempool/dpaa/dpaa_mempool.c
@@ -122,7 +122,7 @@ dpaa_buf_free(struct dpaa_bp_info *bp_info, uint64_t addr)
 	struct bm_buffer buf;
 	int ret;
 
-	DPAA_MEMPOOL_DEBUG("Free 0x%" PRIx64 " to bpid: %d",
+	DPAA_MEMPOOL_DPDEBUG("Free 0x%" PRIx64 " to bpid: %d",
 			   addr, bp_info->bpid);
 
 	bm_buffer_set64(&buf, addr);
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH v2 02/13] net/dpaa: fix jumbo buffer config
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 02/13] net/dpaa: fix jumbo buffer config Hemant Agrawal
@ 2018-09-18 14:03       ` Thomas Monjalon
  2018-09-18 16:22         ` Hemant
  0 siblings, 1 reply; 48+ messages in thread
From: Thomas Monjalon @ 2018-09-18 14:03 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dev, ferruh.yigit, stable

18/09/2018 15:31, Hemant Agrawal:
> Avoid return after the jumbo buffer config in dev config API
> 
> Fixes: 9658ac3a4ef6 ("net/dpaa: set the correct frame size in device MTU")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Thanks for adding some comments in this series.

About this fix, would it be easier to understand if explaining
what is the bug first?

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

* Re: [dpdk-dev] [PATCH v2 02/13] net/dpaa: fix jumbo buffer config
  2018-09-18 14:03       ` Thomas Monjalon
@ 2018-09-18 16:22         ` Hemant
  0 siblings, 0 replies; 48+ messages in thread
From: Hemant @ 2018-09-18 16:22 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, ferruh.yigit, stable



On 9/18/2018 7:33 PM, Thomas Monjalon wrote:
> 18/09/2018 15:31, Hemant Agrawal:
>> Avoid return after the jumbo buffer config in dev config API
>>
>> Fixes: 9658ac3a4ef6 ("net/dpaa: set the correct frame size in device MTU")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> Thanks for adding some comments in this series.
>
> About this fix, would it be easier to understand if explaining
> what is the bug first?
>
>
yes. I can be more specific here.
1. the dev->data->mtu was not getting updated earlier for the jumbo 
buffer config.
2. we don't expect to return error, if this config fails. A debug err 
log is ok.  DPAA1 - supports jumbo by default, enable/disable may give 
errors.

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

* [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements
  2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
@ 2018-09-21 11:05       ` Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
                           ` (13 more replies)
  0 siblings, 14 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:05 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

Misc driver level enhancements

V3: fix the description and implementation of jumbo buffer fix

V2: remove the unused function from map file
    Add description/details in git commit logs.


Hemant Agrawal (9):
  net/dpaa: configure frame queue on MAC ID basis
  net/dpaa: fix jumbo buffer config
  net/dpaa: implement scatter offload support
  net/dpaa: minor debug log enhancements
  bus/dpaa: add interrupt based portal fd support
  net/dpaa: separate Rx function for LS1046
  net/dpaa: tune prefetch in Rx path
  bus/dpaa: add check for re-definition in compat
  mempool/dpaa: change the debug log level to DP

Nipun Gupta (2):
  bus/dpaa: avoid tag Set for eqcr in Tx path
  bus/dpaa: avoid using be conversions for contextb

Sachin Saxena (1):
  net/dpaa: fix link speed based on MAC type

Sunil Kumar Kori (1):
  net/dpaa: rearranging of atomic queue support code

 drivers/bus/dpaa/base/qbman/bman_driver.c |  17 ++--
 drivers/bus/dpaa/base/qbman/qman.c        |  72 ++++++++++++----
 drivers/bus/dpaa/base/qbman/qman_driver.c |   7 +-
 drivers/bus/dpaa/include/compat.h         |  20 +++--
 drivers/bus/dpaa/include/fsl_qman.h       |  20 +++++
 drivers/bus/dpaa/include/fsl_usd.h        |   6 ++
 drivers/bus/dpaa/rte_bus_dpaa_version.map |  16 +++-
 drivers/mempool/dpaa/dpaa_mempool.c       |   2 +-
 drivers/net/dpaa/dpaa_ethdev.c            | 138 +++++++++++++++++++++++-------
 drivers/net/dpaa/dpaa_ethdev.h            |   5 +-
 drivers/net/dpaa/dpaa_rxtx.c              | 100 +++++++++++++++-------
 drivers/net/dpaa/dpaa_rxtx.h              |   5 +-
 12 files changed, 313 insertions(+), 95 deletions(-)

-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 01/13] net/dpaa: configure frame queue on MAC ID basis
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
@ 2018-09-21 11:05         ` Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 02/13] net/dpaa: fix jumbo buffer config Hemant Agrawal
                           ` (12 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:05 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

The current code has the hardcoded seq for fq allocation.
It require multiple changes, when some of the interfaces
are assigned to kernel stack. Changing it on the mac
id basis provide the flexibility to assign any interface
to kernel.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 25 ++++++++++++++-----------
 drivers/net/dpaa/dpaa_ethdev.h |  2 +-
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 30eff65..b9bd557 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -1011,7 +1011,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 {
 	struct qm_mcc_initfq opts = {0};
 	int ret;
-	u32 flags = 0;
+	u32 flags = QMAN_FQ_FLAG_NO_ENQUEUE;
 	struct qm_mcc_initcgr cgr_opts = {
 		.we_mask = QM_CGR_WE_CS_THRES |
 				QM_CGR_WE_CSTD_EN |
@@ -1024,15 +1024,18 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 
 	PMD_INIT_FUNC_TRACE();
 
-	ret = qman_reserve_fqid(fqid);
-	if (ret) {
-		DPAA_PMD_ERR("reserve rx fqid 0x%x failed with ret: %d",
-			     fqid, ret);
-		return -EINVAL;
+	if (fqid) {
+		ret = qman_reserve_fqid(fqid);
+		if (ret) {
+			DPAA_PMD_ERR("reserve rx fqid 0x%x failed with ret: %d",
+				     fqid, ret);
+			return -EINVAL;
+		}
+	} else {
+		flags |= QMAN_FQ_FLAG_DYNAMIC_FQID;
 	}
-
 	DPAA_PMD_DEBUG("creating rx fq %p, fqid 0x%x", fq, fqid);
-	ret = qman_create_fq(fqid, QMAN_FQ_FLAG_NO_ENQUEUE, fq);
+	ret = qman_create_fq(fqid, flags, fq);
 	if (ret) {
 		DPAA_PMD_ERR("create rx fqid 0x%x failed with ret: %d",
 			fqid, ret);
@@ -1051,7 +1054,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 		if (ret) {
 			DPAA_PMD_WARN(
 				"rx taildrop init fail on rx fqid 0x%x(ret=%d)",
-				fqid, ret);
+				fq->fqid, ret);
 			goto without_cgr;
 		}
 		opts.we_mask |= QM_INITFQ_WE_CGID;
@@ -1059,7 +1062,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 		opts.fqd.fq_ctrl |= QM_FQCTRL_CGE;
 	}
 without_cgr:
-	ret = qman_init_fq(fq, flags, &opts);
+	ret = qman_init_fq(fq, 0, &opts);
 	if (ret)
 		DPAA_PMD_ERR("init rx fqid 0x%x failed with ret:%d", fqid, ret);
 	return ret;
@@ -1212,7 +1215,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 		if (default_q)
 			fqid = cfg->rx_def;
 		else
-			fqid = DPAA_PCD_FQID_START + dpaa_intf->ifid *
+			fqid = DPAA_PCD_FQID_START + dpaa_intf->fif->mac_idx *
 				DPAA_PCD_FQID_MULTIPLIER + loop;
 
 		if (dpaa_intf->cgr_rx)
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index c79b9f8..2c38c34 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -63,7 +63,7 @@
 #define DPAA_PCD_FQID_START		0x400
 #define DPAA_PCD_FQID_MULTIPLIER	0x100
 #define DPAA_DEFAULT_NUM_PCD_QUEUES	1
-#define DPAA_MAX_NUM_PCD_QUEUES		32
+#define DPAA_MAX_NUM_PCD_QUEUES		4
 
 #define DPAA_IF_TX_PRIORITY		3
 #define DPAA_IF_RX_PRIORITY		0
-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 02/13] net/dpaa: fix jumbo buffer config
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
@ 2018-09-21 11:05         ` Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 03/13] net/dpaa: implement scatter offload support Hemant Agrawal
                           ` (11 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:05 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit; +Cc: stable

Set the missing dev data mtu for the correct size.
Set the max supported size in hw, if user is asking for more.

Fixes: 9658ac3a4ef6 ("net/dpaa: set the correct frame size in device MTU")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index b9bd557..b9b4999 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -193,14 +193,24 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 	}
 
 	if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
+		uint32_t max_len;
+
+		DPAA_PMD_DEBUG("enabling jumbo");
+
 		if (dev->data->dev_conf.rxmode.max_rx_pkt_len <=
-		    DPAA_MAX_RX_PKT_LEN) {
-			fman_if_set_maxfrm(dpaa_intf->fif,
-				dev->data->dev_conf.rxmode.max_rx_pkt_len);
-			return 0;
-		} else {
-			return -1;
+		    DPAA_MAX_RX_PKT_LEN)
+			max_len = dev->data->dev_conf.rxmode.max_rx_pkt_len;
+		else {
+			DPAA_PMD_INFO("enabling jumbo override conf max len=%d "
+				"supported is %d",
+				dev->data->dev_conf.rxmode.max_rx_pkt_len,
+				DPAA_MAX_RX_PKT_LEN);
+			max_len = DPAA_MAX_RX_PKT_LEN;
 		}
+
+		fman_if_set_maxfrm(dpaa_intf->fif, max_len);
+		dev->data->mtu = max_len
+				- ETHER_HDR_LEN - ETHER_CRC_LEN - VLAN_TAG_SIZE;
 	}
 	return 0;
 }
-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 03/13] net/dpaa: implement scatter offload support
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 02/13] net/dpaa: fix jumbo buffer config Hemant Agrawal
@ 2018-09-21 11:05         ` Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 04/13] net/dpaa: fix link speed based on MAC type Hemant Agrawal
                           ` (10 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:05 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

This patch implement the sg support, which can be
enabled/disabled w.r.t configuration.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 62 +++++++++++++++++++++++++++++++++++++++---
 drivers/net/dpaa/dpaa_ethdev.h |  3 +-
 drivers/net/dpaa/dpaa_rxtx.c   |  8 +++---
 drivers/net/dpaa/dpaa_rxtx.h   |  2 --
 4 files changed, 64 insertions(+), 11 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index b9b4999..fd45b24 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -47,15 +47,15 @@
 
 /* Supported Rx offloads */
 static uint64_t dev_rx_offloads_sup =
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_SCATTER;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
 		DEV_RX_OFFLOAD_TCP_CKSUM |
-		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
-		DEV_RX_OFFLOAD_SCATTER;
+		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM;
 
 /* Supported Tx offloads */
 static uint64_t dev_tx_offloads_sup;
@@ -147,11 +147,30 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	struct dpaa_if *dpaa_intf = dev->data->dev_private;
 	uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN
 				+ VLAN_TAG_SIZE;
+	uint32_t buffsz = dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM;
 
 	PMD_INIT_FUNC_TRACE();
 
 	if (mtu < ETHER_MIN_MTU || frame_size > DPAA_MAX_RX_PKT_LEN)
 		return -EINVAL;
+	/*
+	 * Refuse mtu that requires the support of scattered packets
+	 * when this feature has not been enabled before.
+	 */
+	if (dev->data->min_rx_buf_size &&
+		!dev->data->scattered_rx && frame_size > buffsz) {
+		DPAA_PMD_ERR("SG not enabled, will not fit in one buffer");
+		return -EINVAL;
+	}
+
+	/* check <seg size> * <max_seg>  >= max_frame */
+	if (dev->data->min_rx_buf_size && dev->data->scattered_rx &&
+		(frame_size > buffsz * DPAA_SGT_MAX_ENTRIES)) {
+		DPAA_PMD_ERR("Too big to fit for Max SG list %d",
+				buffsz * DPAA_SGT_MAX_ENTRIES);
+		return -EINVAL;
+	}
+
 	if (frame_size > ETHER_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads &=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
@@ -212,6 +231,13 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 		dev->data->mtu = max_len
 				- ETHER_HDR_LEN - ETHER_CRC_LEN - VLAN_TAG_SIZE;
 	}
+
+	if (rx_offloads & DEV_RX_OFFLOAD_SCATTER) {
+		DPAA_PMD_DEBUG("enabling scatter mode");
+		fman_if_set_sg(dpaa_intf->fif, 1);
+		dev->data->scattered_rx = 1;
+	}
+
 	return 0;
 }
 
@@ -309,7 +335,6 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev,
 
 	dev_info->max_rx_queues = dpaa_intf->nb_rx_queues;
 	dev_info->max_tx_queues = dpaa_intf->nb_tx_queues;
-	dev_info->min_rx_bufsize = DPAA_MIN_RX_BUF_SIZE;
 	dev_info->max_rx_pktlen = DPAA_MAX_RX_PKT_LEN;
 	dev_info->max_mac_addrs = DPAA_MAX_MAC_FILTER;
 	dev_info->max_hash_mac_addrs = 0;
@@ -523,6 +548,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	struct qm_mcc_initfq opts = {0};
 	u32 flags = 0;
 	int ret;
+	u32 buffsz = rte_pktmbuf_data_room_size(mp) - RTE_PKTMBUF_HEADROOM;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -536,6 +562,28 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	DPAA_PMD_INFO("Rx queue setup for queue index: %d fq_id (0x%x)",
 			queue_idx, rxq->fqid);
 
+	/* Max packet can fit in single buffer */
+	if (dev->data->dev_conf.rxmode.max_rx_pkt_len <= buffsz) {
+		;
+	} else if (dev->data->dev_conf.rxmode.offloads &
+			DEV_RX_OFFLOAD_SCATTER) {
+		if (dev->data->dev_conf.rxmode.max_rx_pkt_len >
+			buffsz * DPAA_SGT_MAX_ENTRIES) {
+			DPAA_PMD_ERR("max RxPkt size %d too big to fit "
+				"MaxSGlist %d",
+				dev->data->dev_conf.rxmode.max_rx_pkt_len,
+				buffsz * DPAA_SGT_MAX_ENTRIES);
+			rte_errno = EOVERFLOW;
+			return -rte_errno;
+		}
+	} else {
+		DPAA_PMD_WARN("The requested maximum Rx packet size (%u) is"
+		     " larger than a single mbuf (%u) and scattered"
+		     " mode has not been requested",
+		     dev->data->dev_conf.rxmode.max_rx_pkt_len,
+		     buffsz - RTE_PKTMBUF_HEADROOM);
+	}
+
 	if (!dpaa_intf->bp_info || dpaa_intf->bp_info->mp != mp) {
 		struct fman_if_ic_params icp;
 		uint32_t fd_offset;
@@ -566,6 +614,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 			    dpaa_intf->name, fd_offset,
 			fman_if_get_fdoff(dpaa_intf->fif));
 	}
+	DPAA_PMD_DEBUG("if:%s sg_on = %d, max_frm =%d", dpaa_intf->name,
+		fman_if_get_sg_enable(dpaa_intf->fif),
+		dev->data->dev_conf.rxmode.max_rx_pkt_len);
 	/* checking if push mode only, no error check for now */
 	if (dpaa_push_mode_max_queue > dpaa_push_queue_idx) {
 		dpaa_push_queue_idx++;
@@ -1316,6 +1367,9 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 	fman_if_reset_mcast_filter_table(fman_intf);
 	/* Reset interface statistics */
 	fman_if_stats_reset(fman_intf);
+	/* Disable SG by default */
+	fman_if_set_sg(fman_intf, 0);
+	fman_if_set_maxfrm(fman_intf, ETHER_MAX_LEN + VLAN_TAG_SIZE);
 
 	return 0;
 
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index 2c38c34..2fc7231 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -39,9 +39,10 @@
 /* Alignment to use for cpu-local structs to avoid coherency problems. */
 #define MAX_CACHELINE			64
 
-#define DPAA_MIN_RX_BUF_SIZE 512
 #define DPAA_MAX_RX_PKT_LEN  10240
 
+#define DPAA_SGT_MAX_ENTRIES 16 /* maximum number of entries in SG Table */
+
 /* RX queue tail drop threshold (CGR Based) in frame count */
 #define CGR_RX_PERFQ_THRESH 256
 
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 168b77e..3a3a048 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -306,8 +306,6 @@ dpaa_eth_sg_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	int i = 0;
 	uint8_t fd_offset = fd->offset;
 
-	DPAA_DP_LOG(DEBUG, "Received an SG frame");
-
 	vaddr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd));
 	if (!vaddr) {
 		DPAA_PMD_ERR("unable to convert physical address");
@@ -349,6 +347,8 @@ dpaa_eth_sg_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 		}
 		prev_seg = cur_seg;
 	}
+	DPAA_DP_LOG(DEBUG, "Received an SG frame len =%d, num_sg =%d",
+			first_seg->pkt_len, first_seg->nb_segs);
 
 	dpaa_eth_packet_info(first_seg, vaddr);
 	rte_pktmbuf_free_seg(temp);
@@ -367,8 +367,6 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	uint16_t offset;
 	uint32_t length;
 
-	DPAA_DP_LOG(DEBUG, " FD--->MBUF");
-
 	if (unlikely(format == qm_fd_sg))
 		return dpaa_eth_sg_to_mbuf(fd, ifid);
 
@@ -379,6 +377,8 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	offset = (fd->opaque & DPAA_FD_OFFSET_MASK) >> DPAA_FD_OFFSET_SHIFT;
 	length = fd->opaque & DPAA_FD_LENGTH_MASK;
 
+	DPAA_DP_LOG(DEBUG, " FD--->MBUF off %d len = %d", offset, length);
+
 	/* Ignoring case when format != qm_fd_contig */
 	dpaa_display_frame(fd);
 
diff --git a/drivers/net/dpaa/dpaa_rxtx.h b/drivers/net/dpaa/dpaa_rxtx.h
index d3e6351..6de70a7 100644
--- a/drivers/net/dpaa/dpaa_rxtx.h
+++ b/drivers/net/dpaa/dpaa_rxtx.h
@@ -32,8 +32,6 @@
 /* L4 Type field: TCP */
 #define DPAA_L4_PARSE_RESULT_TCP	0x20
 
-#define DPAA_SGT_MAX_ENTRIES 16 /* maximum number of entries in SG Table */
-
 #define DPAA_MAX_DEQUEUE_NUM_FRAMES    63
 	/** <Maximum number of frames to be dequeued in a single rx call*/
 
-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 04/13] net/dpaa: fix link speed based on MAC type
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
                           ` (2 preceding siblings ...)
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 03/13] net/dpaa: implement scatter offload support Hemant Agrawal
@ 2018-09-21 11:05         ` Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 05/13] net/dpaa: minor debug log enhancements Hemant Agrawal
                           ` (9 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:05 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit; +Cc: Sachin Saxena, shreyansh.jain, stable

From: Sachin Saxena <sachin.saxena@nxp.com>

The link speed shall be on the basis of mac type.

Fixes: 799db4568c76 ("net/dpaa: support device info and speed capability")
Cc: shreyansh.jain@nxp.com
Cc: stable@dpdk.org

Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index fd45b24..53dc317 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -341,8 +341,15 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev,
 	dev_info->max_vfs = 0;
 	dev_info->max_vmdq_pools = ETH_16_POOLS;
 	dev_info->flow_type_rss_offloads = DPAA_RSS_OFFLOAD_ALL;
-	dev_info->speed_capa = (ETH_LINK_SPEED_1G |
-				ETH_LINK_SPEED_10G);
+
+	if (dpaa_intf->fif->mac_type == fman_mac_1g)
+		dev_info->speed_capa = ETH_LINK_SPEED_1G;
+	else if (dpaa_intf->fif->mac_type == fman_mac_10g)
+		dev_info->speed_capa = (ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G);
+	else
+		DPAA_PMD_ERR("invalid link_speed: %s, %d",
+			     dpaa_intf->name, dpaa_intf->fif->mac_type);
+
 	dev_info->rx_offload_capa = dev_rx_offloads_sup |
 					dev_rx_offloads_nodis;
 	dev_info->tx_offload_capa = dev_tx_offloads_sup |
-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 05/13] net/dpaa: minor debug log enhancements
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
                           ` (3 preceding siblings ...)
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 04/13] net/dpaa: fix link speed based on MAC type Hemant Agrawal
@ 2018-09-21 11:05         ` Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 06/13] bus/dpaa: add interrupt based portal fd support Hemant Agrawal
                           ` (8 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:05 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

Improving the debug message for event mode and
reducing the log level for less important log

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 53dc317..fc536a6 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -617,9 +617,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		fman_if_set_bp(dpaa_intf->fif, mp->size,
 			       dpaa_intf->bp_info->bpid, bp_size);
 		dpaa_intf->valid = 1;
-		DPAA_PMD_INFO("if =%s - fd_offset = %d offset = %d",
-			    dpaa_intf->name, fd_offset,
-			fman_if_get_fdoff(dpaa_intf->fif));
+		DPAA_PMD_DEBUG("if:%s fd_offset = %d offset = %d",
+				dpaa_intf->name, fd_offset,
+				fman_if_get_fdoff(dpaa_intf->fif));
 	}
 	DPAA_PMD_DEBUG("if:%s sg_on = %d, max_frm =%d", dpaa_intf->name,
 		fman_if_get_sg_enable(dpaa_intf->fif),
@@ -697,7 +697,8 @@ dpaa_eth_eventq_attach(const struct rte_eth_dev *dev,
 	struct qm_mcc_initfq opts = {0};
 
 	if (dpaa_push_mode_max_queue)
-		DPAA_PMD_WARN("PUSH mode already enabled for first %d queues.\n"
+		DPAA_PMD_WARN("PUSH mode q and EVENTDEV are not compatible\n"
+			      "PUSH mode already enabled for first %d queues.\n"
 			      "To disable set DPAA_PUSH_QUEUES_NUMBER to 0\n",
 			      dpaa_push_mode_max_queue);
 
-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 06/13] bus/dpaa: add interrupt based portal fd support
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
                           ` (4 preceding siblings ...)
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 05/13] net/dpaa: minor debug log enhancements Hemant Agrawal
@ 2018-09-21 11:05         ` Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path Hemant Agrawal
                           ` (7 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:05 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

This patch add supports in bus driver for qbman to support
and configure portal based FDs, which can be used for interrupt
based processing.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/base/qbman/bman_driver.c | 17 ++++++----
 drivers/bus/dpaa/base/qbman/qman.c        | 52 +++++++++++++++++++++++++++++++
 drivers/bus/dpaa/base/qbman/qman_driver.c |  7 ++++-
 drivers/bus/dpaa/include/fsl_qman.h       | 20 ++++++++++++
 drivers/bus/dpaa/include/fsl_usd.h        |  6 ++++
 drivers/bus/dpaa/rte_bus_dpaa_version.map | 16 +++++++++-
 6 files changed, 110 insertions(+), 8 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/bman_driver.c b/drivers/bus/dpaa/base/qbman/bman_driver.c
index b14b590..750b756 100644
--- a/drivers/bus/dpaa/base/qbman/bman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/bman_driver.c
@@ -23,7 +23,7 @@ static void *bman_ccsr_map;
 /* Portal driver */
 /*****************/
 
-static __thread int fd = -1;
+static __thread int bmfd = -1;
 static __thread struct bm_portal_config pcfg;
 static __thread struct dpaa_ioctl_portal_map map = {
 	.type = dpaa_portal_bman
@@ -70,14 +70,14 @@ static int fsl_bman_portal_init(uint32_t idx, int is_shared)
 	pcfg.index = map.index;
 	bman_depletion_fill(&pcfg.mask);
 
-	fd = open(BMAN_PORTAL_IRQ_PATH, O_RDONLY);
-	if (fd == -1) {
+	bmfd = open(BMAN_PORTAL_IRQ_PATH, O_RDONLY);
+	if (bmfd == -1) {
 		pr_err("BMan irq init failed");
 		process_portal_unmap(&map.addr);
 		return -EBUSY;
 	}
 	/* Use the IRQ FD as a unique IRQ number */
-	pcfg.irq = fd;
+	pcfg.irq = bmfd;
 
 	portal = bman_create_affine_portal(&pcfg);
 	if (!portal) {
@@ -90,7 +90,7 @@ static int fsl_bman_portal_init(uint32_t idx, int is_shared)
 	/* Set the IRQ number */
 	irq_map.type = dpaa_portal_bman;
 	irq_map.portal_cinh = map.addr.cinh;
-	process_portal_irq_map(fd, &irq_map);
+	process_portal_irq_map(bmfd, &irq_map);
 	return 0;
 }
 
@@ -99,7 +99,7 @@ static int fsl_bman_portal_finish(void)
 	__maybe_unused const struct bm_portal_config *cfg;
 	int ret;
 
-	process_portal_irq_unmap(fd);
+	process_portal_irq_unmap(bmfd);
 
 	cfg = bman_destroy_affine_portal();
 	DPAA_BUG_ON(cfg != &pcfg);
@@ -109,6 +109,11 @@ static int fsl_bman_portal_finish(void)
 	return ret;
 }
 
+int bman_thread_fd(void)
+{
+	return bmfd;
+}
+
 int bman_thread_init(void)
 {
 	/* Convert from contiguous/virtual cpu numbering to real cpu when
diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 7c17027..8730550 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -1040,6 +1040,50 @@ static inline unsigned int __poll_portal_fast(struct qman_portal *p,
 	return limit;
 }
 
+int qman_irqsource_add(u32 bits)
+{
+	struct qman_portal *p = get_affine_portal();
+
+	bits = bits & QM_PIRQ_VISIBLE;
+
+	/* Clear any previously remaining interrupt conditions in
+	 * QCSP_ISR. This prevents raising a false interrupt when
+	 * interrupt conditions are enabled in QCSP_IER.
+	 */
+	qm_isr_status_clear(&p->p, bits);
+	dpaa_set_bits(bits, &p->irq_sources);
+	qm_isr_enable_write(&p->p, p->irq_sources);
+
+
+	return 0;
+}
+
+int qman_irqsource_remove(u32 bits)
+{
+	struct qman_portal *p = get_affine_portal();
+	u32 ier;
+
+	/* Our interrupt handler only processes+clears status register bits that
+	 * are in p->irq_sources. As we're trimming that mask, if one of them
+	 * were to assert in the status register just before we remove it from
+	 * the enable register, there would be an interrupt-storm when we
+	 * release the IRQ lock. So we wait for the enable register update to
+	 * take effect in h/w (by reading it back) and then clear all other bits
+	 * in the status register. Ie. we clear them from ISR once it's certain
+	 * IER won't allow them to reassert.
+	 */
+
+	bits &= QM_PIRQ_VISIBLE;
+	dpaa_clear_bits(bits, &p->irq_sources);
+	qm_isr_enable_write(&p->p, p->irq_sources);
+	ier = qm_isr_enable_read(&p->p);
+	/* Using "~ier" (rather than "bits" or "~p->irq_sources") creates a
+	 * data-dependency, ie. to protect against re-ordering.
+	 */
+	qm_isr_status_clear(&p->p, ~ier);
+	return 0;
+}
+
 u16 qman_affine_channel(int cpu)
 {
 	if (cpu < 0) {
@@ -1114,6 +1158,14 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
 	return rx_number;
 }
 
+void qman_clear_irq(void)
+{
+	struct qman_portal *p = get_affine_portal();
+	u32 clear = QM_DQAVAIL_MASK | (p->irq_sources &
+		~(QM_PIRQ_CSCI | QM_PIRQ_CCSCI));
+	qm_isr_status_clear(&p->p, clear);
+}
+
 u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 			void **bufs)
 {
diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c
index f6ecd6b..ba15339 100644
--- a/drivers/bus/dpaa/base/qbman/qman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/qman_driver.c
@@ -113,6 +113,11 @@ static int fsl_qman_portal_finish(void)
 	return ret;
 }
 
+int qman_thread_fd(void)
+{
+	return qmfd;
+}
+
 int qman_thread_init(void)
 {
 	/* Convert from contiguous/virtual cpu numbering to real cpu when
@@ -135,7 +140,7 @@ void qman_thread_irq(void)
 	 * rather than breaking that encapsulation I am simply hard-coding the
 	 * offset to the inhibit register here.
 	 */
-	out_be32(qpcfg.addr_virt[DPAA_PORTAL_CI] + 0xe0c, 0);
+	out_be32(qpcfg.addr_virt[DPAA_PORTAL_CI] + 0x36C0, 0);
 }
 
 struct qman_portal *fsl_qman_portal_create(void)
diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index b18cf03..e438414 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -1316,6 +1316,26 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 			void **bufs);
 
 /**
+ * qman_irqsource_add - add processing sources to be interrupt-driven
+ * @bits: bitmask of QM_PIRQ_**I processing sources
+ *
+ * Adds processing sources that should be interrupt-driven (rather than
+ * processed via qman_poll_***() functions). Returns zero for success, or
+ * -EINVAL if the current CPU is sharing a portal hosted on another CPU.
+ */
+int qman_irqsource_add(u32 bits);
+
+/**
+ * qman_irqsource_remove - remove processing sources from being interrupt-driven
+ * @bits: bitmask of QM_PIRQ_**I processing sources
+ *
+ * Removes processing sources from being interrupt-driven, so that they will
+ * instead be processed via qman_poll_***() functions. Returns zero for success,
+ * or -EINVAL if the current CPU is sharing a portal hosted on another CPU.
+ */
+int qman_irqsource_remove(u32 bits);
+
+/**
  * qman_affine_channel - return the channel ID of an portal
  * @cpu: the cpu whose affine portal is the subject of the query
  *
diff --git a/drivers/bus/dpaa/include/fsl_usd.h b/drivers/bus/dpaa/include/fsl_usd.h
index e183617..ec1ab7c 100644
--- a/drivers/bus/dpaa/include/fsl_usd.h
+++ b/drivers/bus/dpaa/include/fsl_usd.h
@@ -55,6 +55,10 @@ int qman_free_raw_portal(struct dpaa_raw_portal *portal);
 int bman_allocate_raw_portal(struct dpaa_raw_portal *portal);
 int bman_free_raw_portal(struct dpaa_raw_portal *portal);
 
+/* Obtain thread-local UIO file-descriptors */
+int qman_thread_fd(void);
+int bman_thread_fd(void);
+
 /* Post-process interrupts. NB, the kernel IRQ handler disables the interrupt
  * line before notifying us, and this post-processing re-enables it once
  * processing is complete. As such, it is essential to call this before going
@@ -63,6 +67,8 @@ int bman_free_raw_portal(struct dpaa_raw_portal *portal);
 void qman_thread_irq(void);
 void bman_thread_irq(void);
 
+void qman_clear_irq(void);
+
 /* Global setup */
 int qman_global_init(void);
 int bman_global_init(void);
diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map
index 7d6d624..70076c7 100644
--- a/drivers/bus/dpaa/rte_bus_dpaa_version.map
+++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map
@@ -95,10 +95,24 @@ DPDK_18.02 {
 
 DPDK_18.08 {
 	global:
-
 	fman_if_get_sg_enable;
 	fman_if_set_sg;
 	of_get_mac_address;
 
 	local: *;
 } DPDK_18.02;
+
+DPDK_18.11 {
+	global:
+	bman_thread_irq;
+	fman_if_get_sg_enable;
+	fman_if_set_sg;
+	qman_clear_irq;
+
+	qman_irqsource_add;
+	qman_irqsource_remove;
+	qman_thread_fd;
+	qman_thread_irq;
+
+	local: *;
+} DPDK_18.08;
-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
                           ` (5 preceding siblings ...)
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 06/13] bus/dpaa: add interrupt based portal fd support Hemant Agrawal
@ 2018-09-21 11:05         ` Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 08/13] bus/dpaa: avoid using be conversions for contextb Hemant Agrawal
                           ` (6 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:05 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit; +Cc: Nipun Gupta

From: Nipun Gupta <nipun.gupta@nxp.com>

Minor optimization for TX path.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/dpaa/base/qbman/qman.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 8730550..71da275 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -2238,11 +2238,6 @@ int qman_enqueue_multi(struct qman_fq *fq,
 	/* try to send as many frames as possible */
 	while (eqcr->available && frames_to_send--) {
 		eq->fqid = fq->fqid_le;
-#ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-		eq->tag = cpu_to_be32(fq->key);
-#else
-		eq->tag = cpu_to_be32((u32)(uintptr_t)fq);
-#endif
 		eq->fd.opaque_addr = fd->opaque_addr;
 		eq->fd.addr = cpu_to_be40(fd->addr);
 		eq->fd.status = cpu_to_be32(fd->status);
-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 08/13] bus/dpaa: avoid using be conversions for contextb
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
                           ` (6 preceding siblings ...)
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path Hemant Agrawal
@ 2018-09-21 11:05         ` Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 09/13] net/dpaa: rearranging of atomic queue support code Hemant Agrawal
                           ` (5 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:05 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit; +Cc: Nipun Gupta

From: Nipun Gupta <nipun.gupta@nxp.com>

minor optimization in packet handling path

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/dpaa/base/qbman/qman.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 71da275..dc64d08 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -852,11 +852,9 @@ static u32 __poll_portal_slow(struct qman_portal *p, u32 is)
 			case QM_MR_VERB_FQPN:
 				/* Parked */
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-				fq = get_fq_table_entry(
-					be32_to_cpu(msg->fq.contextB));
+				fq = get_fq_table_entry(msg->fq.contextB);
 #else
-				fq = (void *)(uintptr_t)
-					be32_to_cpu(msg->fq.contextB);
+				fq = (void *)(uintptr_t)msg->fq.contextB;
 #endif
 				fq_state_change(p, fq, msg, verb);
 				if (fq->cb.fqs)
@@ -967,7 +965,6 @@ static inline unsigned int __poll_portal_fast(struct qman_portal *p,
 		*shadow = *dq;
 		dq = shadow;
 		shadow->fqid = be32_to_cpu(shadow->fqid);
-		shadow->contextB = be32_to_cpu(shadow->contextB);
 		shadow->seqnum = be16_to_cpu(shadow->seqnum);
 		hw_fd_to_cpu(&shadow->fd);
 #endif
@@ -1136,9 +1133,9 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
 
 		/* SDQCR: context_b points to the FQ */
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-		fq = qman_fq_lookup_table[be32_to_cpu(dq[rx_number]->contextB)];
+		fq = qman_fq_lookup_table[dq[rx_number]->contextB];
 #else
-		fq = (void *)be32_to_cpu(dq[rx_number]->contextB);
+		fq = (void *)dq[rx_number]->contextB;
 #endif
 		if (fq->cb.dqrr_prepare)
 			fq->cb.dqrr_prepare(shadow[rx_number],
@@ -1195,7 +1192,6 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 		*shadow = *dq;
 		dq = shadow;
 		shadow->fqid = be32_to_cpu(shadow->fqid);
-		shadow->contextB = be32_to_cpu(shadow->contextB);
 		shadow->seqnum = be16_to_cpu(shadow->seqnum);
 		hw_fd_to_cpu(&shadow->fd);
 #endif
@@ -1260,7 +1256,6 @@ struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq)
 	*shadow = *dq;
 	dq = shadow;
 	shadow->fqid = be32_to_cpu(shadow->fqid);
-	shadow->contextB = be32_to_cpu(shadow->contextB);
 	shadow->seqnum = be16_to_cpu(shadow->seqnum);
 	hw_fd_to_cpu(&shadow->fd);
 #endif
@@ -1556,7 +1551,7 @@ int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts)
 
 		mcc->initfq.we_mask |= QM_INITFQ_WE_CONTEXTB;
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-		mcc->initfq.fqd.context_b = fq->key;
+		mcc->initfq.fqd.context_b = cpu_to_be32(fq->key);
 #else
 		mcc->initfq.fqd.context_b = (u32)(uintptr_t)fq;
 #endif
-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 09/13] net/dpaa: rearranging of atomic queue support code
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
                           ` (7 preceding siblings ...)
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 08/13] bus/dpaa: avoid using be conversions for contextb Hemant Agrawal
@ 2018-09-21 11:05         ` Hemant Agrawal
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 10/13] net/dpaa: separate Rx function for LS1046 Hemant Agrawal
                           ` (4 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:05 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit; +Cc: Sunil Kumar Kori

From: Sunil Kumar Kori <sunil.kori@nxp.com>

This is to align the code with dpaa2 to ease out maintaince
of both driver code bases.

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
---
 drivers/net/dpaa/dpaa_rxtx.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 3a3a048..6698c97 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -870,6 +870,19 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 				DPAA_TX_BURST_SIZE : nb_bufs;
 		for (loop = 0; loop < frames_to_send; loop++) {
 			mbuf = *(bufs++);
+			seqn = mbuf->seqn;
+			if (seqn != DPAA_INVALID_MBUF_SEQN) {
+				index = seqn - 1;
+				if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) {
+					flags[loop] =
+					   ((index & QM_EQCR_DCA_IDXMASK) << 8);
+					flags[loop] |= QMAN_ENQUEUE_FLAG_DCA;
+					DPAA_PER_LCORE_DQRR_SIZE--;
+					DPAA_PER_LCORE_DQRR_HELD &=
+								~(1 << index);
+				}
+			}
+
 			if (likely(RTE_MBUF_DIRECT(mbuf))) {
 				mp = mbuf->pool;
 				bp_info = DPAA_MEMPOOL_TO_POOL_INFO(mp);
@@ -916,18 +929,6 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 					goto send_pkts;
 				}
 			}
-			seqn = mbuf->seqn;
-			if (seqn != DPAA_INVALID_MBUF_SEQN) {
-				index = seqn - 1;
-				if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) {
-					flags[loop] =
-					   ((index & QM_EQCR_DCA_IDXMASK) << 8);
-					flags[loop] |= QMAN_ENQUEUE_FLAG_DCA;
-					DPAA_PER_LCORE_DQRR_SIZE--;
-					DPAA_PER_LCORE_DQRR_HELD &=
-								~(1 << index);
-				}
-			}
 		}
 
 send_pkts:
-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 10/13] net/dpaa: separate Rx function for LS1046
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
                           ` (8 preceding siblings ...)
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 09/13] net/dpaa: rearranging of atomic queue support code Hemant Agrawal
@ 2018-09-21 11:05         ` Hemant Agrawal
  2018-09-21 11:06         ` [dpdk-dev] [PATCH v3 11/13] net/dpaa: tune prefetch in Rx path Hemant Agrawal
                           ` (3 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:05 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

This is to avoid the checks in datapath and help in performance.
LS1046 has different data stash settings.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c |  9 +++++--
 drivers/net/dpaa/dpaa_rxtx.c   | 60 +++++++++++++++++++++++++++++++++---------
 drivers/net/dpaa/dpaa_rxtx.h   |  3 +++
 3 files changed, 58 insertions(+), 14 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index fc536a6..1f2cc57 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -661,8 +661,13 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 				"ret:%d(%s)", rxq->fqid, ret, strerror(ret));
 			return ret;
 		}
-		rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb;
-		rxq->cb.dqrr_prepare = dpaa_rx_cb_prepare;
+		if (dpaa_svr_family == SVR_LS1043A_FAMILY) {
+			rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb_no_prefetch;
+		} else {
+			rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb;
+			rxq->cb.dqrr_prepare = dpaa_rx_cb_prepare;
+		}
+
 		rxq->is_static = true;
 	}
 	dev->data->rx_queues[queue_idx] = rxq;
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 6698c97..2c57741 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -398,8 +398,9 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	return mbuf;
 }
 
+/* Specific for LS1043 */
 void
-dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
+dpaa_rx_cb_no_prefetch(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
 	   void **bufs, int num_bufs)
 {
 	struct rte_mbuf *mbuf;
@@ -411,17 +412,13 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
 	uint32_t length;
 	uint8_t format;
 
-	if (dpaa_svr_family != SVR_LS1046A_FAMILY) {
-		bp_info = DPAA_BPID_TO_POOL_INFO(dqrr[0]->fd.bpid);
-		ptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[0]->fd));
-		rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
-		bufs[0] = (struct rte_mbuf *)((char *)ptr -
-				bp_info->meta_data_size);
-	}
+	bp_info = DPAA_BPID_TO_POOL_INFO(dqrr[0]->fd.bpid);
+	ptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[0]->fd));
+	rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
+	bufs[0] = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size);
 
 	for (i = 0; i < num_bufs; i++) {
-		if (dpaa_svr_family != SVR_LS1046A_FAMILY &&
-		    i < num_bufs - 1) {
+		if (i < num_bufs - 1) {
 			bp_info = DPAA_BPID_TO_POOL_INFO(dqrr[i + 1]->fd.bpid);
 			ptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[i + 1]->fd));
 			rte_prefetch0((void *)((uint8_t *)ptr +
@@ -458,6 +455,46 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
 	}
 }
 
+void
+dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
+	   void **bufs, int num_bufs)
+{
+	struct rte_mbuf *mbuf;
+	const struct qm_fd *fd;
+	struct dpaa_if *dpaa_intf;
+	uint16_t offset, i;
+	uint32_t length;
+	uint8_t format;
+
+	for (i = 0; i < num_bufs; i++) {
+		fd = &dqrr[i]->fd;
+		dpaa_intf = fq[0]->dpaa_intf;
+
+		format = (fd->opaque & DPAA_FD_FORMAT_MASK) >>
+				DPAA_FD_FORMAT_SHIFT;
+		if (unlikely(format == qm_fd_sg)) {
+			bufs[i] = dpaa_eth_sg_to_mbuf(fd, dpaa_intf->ifid);
+			continue;
+		}
+
+		offset = (fd->opaque & DPAA_FD_OFFSET_MASK) >>
+				DPAA_FD_OFFSET_SHIFT;
+		length = fd->opaque & DPAA_FD_LENGTH_MASK;
+
+		mbuf = bufs[i];
+		mbuf->data_off = offset;
+		mbuf->data_len = length;
+		mbuf->pkt_len = length;
+		mbuf->port = dpaa_intf->ifid;
+
+		mbuf->nb_segs = 1;
+		mbuf->ol_flags = 0;
+		mbuf->next = NULL;
+		rte_mbuf_refcnt_set(mbuf, 1);
+		dpaa_eth_packet_info(mbuf, mbuf->buf_addr);
+	}
+}
+
 void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs)
 {
 	struct dpaa_bp_info *bp_info = DPAA_BPID_TO_POOL_INFO(dq->fd.bpid);
@@ -468,8 +505,7 @@ void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs)
 	 * So we prefetch the annoation beforehand, so that it is available
 	 * in cache when accessed.
 	 */
-	if (dpaa_svr_family == SVR_LS1046A_FAMILY)
-		rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
+	rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
 
 	*bufs = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size);
 }
diff --git a/drivers/net/dpaa/dpaa_rxtx.h b/drivers/net/dpaa/dpaa_rxtx.h
index 6de70a7..75b093c 100644
--- a/drivers/net/dpaa/dpaa_rxtx.h
+++ b/drivers/net/dpaa/dpaa_rxtx.h
@@ -270,4 +270,7 @@ void dpaa_rx_cb(struct qman_fq **fq,
 		struct qm_dqrr_entry **dqrr, void **bufs, int num_bufs);
 
 void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs);
+
+void dpaa_rx_cb_no_prefetch(struct qman_fq **fq,
+		    struct qm_dqrr_entry **dqrr, void **bufs, int num_bufs);
 #endif
-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 11/13] net/dpaa: tune prefetch in Rx path
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
                           ` (9 preceding siblings ...)
  2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 10/13] net/dpaa: separate Rx function for LS1046 Hemant Agrawal
@ 2018-09-21 11:06         ` Hemant Agrawal
  2018-09-21 11:06         ` [dpdk-dev] [PATCH v3 12/13] bus/dpaa: add check for re-definition in compat Hemant Agrawal
                           ` (2 subsequent siblings)
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:06 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

As part of performance optimization excercise, tuning
the prefetch placement.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_rxtx.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 2c57741..c4471c2 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -370,10 +370,6 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	if (unlikely(format == qm_fd_sg))
 		return dpaa_eth_sg_to_mbuf(fd, ifid);
 
-	ptr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd));
-
-	rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
-
 	offset = (fd->opaque & DPAA_FD_OFFSET_MASK) >> DPAA_FD_OFFSET_SHIFT;
 	length = fd->opaque & DPAA_FD_LENGTH_MASK;
 
@@ -381,8 +377,11 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 
 	/* Ignoring case when format != qm_fd_contig */
 	dpaa_display_frame(fd);
+	ptr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd));
 
 	mbuf = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size);
+	/* Prefetch the Parse results and packet data to L1 */
+	rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));
 
 	mbuf->data_off = offset;
 	mbuf->data_len = length;
-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 12/13] bus/dpaa: add check for re-definition in compat
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
                           ` (10 preceding siblings ...)
  2018-09-21 11:06         ` [dpdk-dev] [PATCH v3 11/13] net/dpaa: tune prefetch in Rx path Hemant Agrawal
@ 2018-09-21 11:06         ` Hemant Agrawal
  2018-09-21 11:06         ` [dpdk-dev] [PATCH v3 13/13] mempool/dpaa: change the debug log level to DP Hemant Agrawal
  2018-09-24 14:28         ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Ferruh Yigit
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:06 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

Few fields in compat are giving re-defination error
with new drivers such as caam_jr.
Checks have been added.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/include/compat.h | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/bus/dpaa/include/compat.h b/drivers/bus/dpaa/include/compat.h
index 92241d2..4122657 100644
--- a/drivers/bus/dpaa/include/compat.h
+++ b/drivers/bus/dpaa/include/compat.h
@@ -57,8 +57,9 @@
 #ifndef __packed
 #define __packed	__rte_packed
 #endif
+#ifndef noinline
 #define noinline	__attribute__((noinline))
-
+#endif
 #define L1_CACHE_BYTES 64
 #define ____cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES)))
 #define __stringify_1(x) #x
@@ -75,20 +76,25 @@
 		printf(fmt, ##args); \
 		fflush(stdout); \
 	} while (0)
-
+#ifndef pr_crit
 #define pr_crit(fmt, args...)	 prflush("CRIT:" fmt, ##args)
+#endif
+#ifndef pr_err
 #define pr_err(fmt, args...)	 prflush("ERR:" fmt, ##args)
+#endif
+#ifndef pr_warn
 #define pr_warn(fmt, args...)	 prflush("WARN:" fmt, ##args)
+#endif
+#ifndef pr_info
 #define pr_info(fmt, args...)	 prflush(fmt, ##args)
-
-#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS
-#ifdef pr_debug
-#undef pr_debug
 #endif
+#ifndef pr_debug
+#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS
 #define pr_debug(fmt, args...)	printf(fmt, ##args)
 #else
 #define pr_debug(fmt, args...) {}
 #endif
+#endif
 
 #define DPAA_BUG_ON(x) RTE_ASSERT(x)
 
@@ -256,7 +262,9 @@ __bswap_24(uint32_t x)
 #define be16_to_cpu(x) rte_be_to_cpu_16(x)
 
 #define cpu_to_be64(x) rte_cpu_to_be_64(x)
+#if !defined(cpu_to_be32)
 #define cpu_to_be32(x) rte_cpu_to_be_32(x)
+#endif
 #define cpu_to_be16(x) rte_cpu_to_be_16(x)
 
 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
-- 
2.7.4

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

* [dpdk-dev] [PATCH v3 13/13] mempool/dpaa: change the debug log level to DP
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
                           ` (11 preceding siblings ...)
  2018-09-21 11:06         ` [dpdk-dev] [PATCH v3 12/13] bus/dpaa: add check for re-definition in compat Hemant Agrawal
@ 2018-09-21 11:06         ` Hemant Agrawal
  2018-09-24 14:28         ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Ferruh Yigit
  13 siblings, 0 replies; 48+ messages in thread
From: Hemant Agrawal @ 2018-09-21 11:06 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit

When the system goes out of buffers temporarily, the logs
further slow down the system. There is no need for this
continuos logs.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/mempool/dpaa/dpaa_mempool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c
index 10c536b..1c12122 100644
--- a/drivers/mempool/dpaa/dpaa_mempool.c
+++ b/drivers/mempool/dpaa/dpaa_mempool.c
@@ -122,7 +122,7 @@ dpaa_buf_free(struct dpaa_bp_info *bp_info, uint64_t addr)
 	struct bm_buffer buf;
 	int ret;
 
-	DPAA_MEMPOOL_DEBUG("Free 0x%" PRIx64 " to bpid: %d",
+	DPAA_MEMPOOL_DPDEBUG("Free 0x%" PRIx64 " to bpid: %d",
 			   addr, bp_info->bpid);
 
 	bm_buffer_set64(&buf, addr);
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements
  2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
                           ` (12 preceding siblings ...)
  2018-09-21 11:06         ` [dpdk-dev] [PATCH v3 13/13] mempool/dpaa: change the debug log level to DP Hemant Agrawal
@ 2018-09-24 14:28         ` Ferruh Yigit
  13 siblings, 0 replies; 48+ messages in thread
From: Ferruh Yigit @ 2018-09-24 14:28 UTC (permalink / raw)
  To: Hemant Agrawal, dev, thomas

On 9/21/2018 12:05 PM, Hemant Agrawal wrote:
> Misc driver level enhancements
> 
> V3: fix the description and implementation of jumbo buffer fix
> 
> V2: remove the unused function from map file
>     Add description/details in git commit logs.
> 
> 
> Hemant Agrawal (9):
>   net/dpaa: configure frame queue on MAC ID basis
>   net/dpaa: fix jumbo buffer config
>   net/dpaa: implement scatter offload support
>   net/dpaa: minor debug log enhancements
>   bus/dpaa: add interrupt based portal fd support
>   net/dpaa: separate Rx function for LS1046
>   net/dpaa: tune prefetch in Rx path
>   bus/dpaa: add check for re-definition in compat
>   mempool/dpaa: change the debug log level to DP
> 
> Nipun Gupta (2):
>   bus/dpaa: avoid tag Set for eqcr in Tx path
>   bus/dpaa: avoid using be conversions for contextb
> 
> Sachin Saxena (1):
>   net/dpaa: fix link speed based on MAC type
> 
> Sunil Kumar Kori (1):
>   net/dpaa: rearranging of atomic queue support code

Series applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2018-09-24 14:28 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 10:47 [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
2018-09-18 13:31   ` [dpdk-dev] [PATCH v2 00/13] NXP DPAA driver enhancements Hemant Agrawal
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
2018-09-21 11:05       ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Hemant Agrawal
2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 01/13] net/dpaa: configure frame queue on MAC ID basis Hemant Agrawal
2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 02/13] net/dpaa: fix jumbo buffer config Hemant Agrawal
2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 03/13] net/dpaa: implement scatter offload support Hemant Agrawal
2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 04/13] net/dpaa: fix link speed based on MAC type Hemant Agrawal
2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 05/13] net/dpaa: minor debug log enhancements Hemant Agrawal
2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 06/13] bus/dpaa: add interrupt based portal fd support Hemant Agrawal
2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path Hemant Agrawal
2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 08/13] bus/dpaa: avoid using be conversions for contextb Hemant Agrawal
2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 09/13] net/dpaa: rearranging of atomic queue support code Hemant Agrawal
2018-09-21 11:05         ` [dpdk-dev] [PATCH v3 10/13] net/dpaa: separate Rx function for LS1046 Hemant Agrawal
2018-09-21 11:06         ` [dpdk-dev] [PATCH v3 11/13] net/dpaa: tune prefetch in Rx path Hemant Agrawal
2018-09-21 11:06         ` [dpdk-dev] [PATCH v3 12/13] bus/dpaa: add check for re-definition in compat Hemant Agrawal
2018-09-21 11:06         ` [dpdk-dev] [PATCH v3 13/13] mempool/dpaa: change the debug log level to DP Hemant Agrawal
2018-09-24 14:28         ` [dpdk-dev] [PATCH v3 00/13] NXP DPAA driver enhancements Ferruh Yigit
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 02/13] net/dpaa: fix jumbo buffer config Hemant Agrawal
2018-09-18 14:03       ` Thomas Monjalon
2018-09-18 16:22         ` Hemant
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 03/13] net/dpaa: implement scatter offload support Hemant Agrawal
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 04/13] net/dpaa: fix link speed based on MAC type Hemant Agrawal
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 05/13] net/dpaa: minor debug log enhancements Hemant Agrawal
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 06/13] bus/dpaa: add interrupt based portal fd support Hemant Agrawal
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path Hemant Agrawal
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 08/13] bus/dpaa: avoid using be conversions for contextb Hemant Agrawal
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 09/13] net/dpaa: rearranging of atomic queue support code Hemant Agrawal
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 10/13] net/dpaa: separate Rx function for LS1046 Hemant Agrawal
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 11/13] net/dpaa: tune prefetch in Rx path Hemant Agrawal
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 12/13] bus/dpaa: add check for re-definition in compat Hemant Agrawal
2018-09-18 13:31     ` [dpdk-dev] [PATCH v2 13/13] mempool/dpaa: change the debug log level to DP Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 02/13] net/dpaa: fix jumbo buffer config Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 03/13] net/dpaa: implement scatter offload support Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 04/13] net/dpaa: set correct speed based on MAC type Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 05/13] net/dpaa: minor debug log enhancements Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 06/13] bus/dpaa: add interrupt based portal fd support Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 08/13] bus/dpaa: avoid using be conversions for contextb Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 09/13] net/dpaa: rearranging of atomic queue support code Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 10/13] net/dpaa: separate Rx function for LS1046 Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 11/13] net/dpaa: tune prefetch in Rx path Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 12/13] bus/dpaa: add check for re-definition in compat Hemant Agrawal
2018-08-29 10:47 ` [dpdk-dev] [PATCH 13/13] mempool/dpaa: change the debug log level to DP Hemant Agrawal
2018-09-14 10:56 ` [dpdk-dev] [PATCH 00/13] driver/net: NXP DPAA driver enhancements Ferruh Yigit
2018-09-16 19:44   ` Thomas Monjalon
2018-09-17  3:21     ` Hemant Agrawal

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