All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, Nipun Gupta <nipun.gupta@nxp.com>
Subject: [dpdk-dev] [PATCH v2 11/29] net/dpaa: update process specific device info
Date: Tue,  7 Jul 2020 14:52:26 +0530	[thread overview]
Message-ID: <20200707092244.12791-12-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <20200707092244.12791-1-hemant.agrawal@nxp.com>

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

For DPAA devices the memory maps stored in the FMAN interface
information is per process. Store them in the device process specific
area.
This is required to support multi-process apps.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 207 ++++++++++++++++-----------------
 drivers/net/dpaa/dpaa_ethdev.h |   1 -
 2 files changed, 102 insertions(+), 106 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index c0ded9086..6c94fd396 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -149,7 +149,6 @@ dpaa_poll_queue_default_config(struct qm_mcc_initfq *opts)
 static int
 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 + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN
 				+ VLAN_TAG_SIZE;
 	uint32_t buffsz = dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM;
@@ -185,7 +184,7 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 
 	dev->data->dev_conf.rxmode.max_rx_pkt_len = frame_size;
 
-	fman_if_set_maxfrm(dpaa_intf->fif, frame_size);
+	fman_if_set_maxfrm(dev->process_private, frame_size);
 
 	return 0;
 }
@@ -193,7 +192,6 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 static int
 dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 {
-	struct dpaa_if *dpaa_intf = dev->data->dev_private;
 	struct rte_eth_conf *eth_conf = &dev->data->dev_conf;
 	uint64_t rx_offloads = eth_conf->rxmode.offloads;
 	uint64_t tx_offloads = eth_conf->txmode.offloads;
@@ -232,14 +230,14 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 			max_len = DPAA_MAX_RX_PKT_LEN;
 		}
 
-		fman_if_set_maxfrm(dpaa_intf->fif, max_len);
+		fman_if_set_maxfrm(dev->process_private, max_len);
 		dev->data->mtu = max_len
 			- RTE_ETHER_HDR_LEN - RTE_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);
+		fman_if_set_sg(dev->process_private, 1);
 		dev->data->scattered_rx = 1;
 	}
 
@@ -283,18 +281,18 @@ static int dpaa_eth_dev_start(struct rte_eth_dev *dev)
 	else
 		dev->tx_pkt_burst = dpaa_eth_queue_tx;
 
-	fman_if_enable_rx(dpaa_intf->fif);
+	fman_if_enable_rx(dev->process_private);
 
 	return 0;
 }
 
 static void dpaa_eth_dev_stop(struct rte_eth_dev *dev)
 {
-	struct dpaa_if *dpaa_intf = dev->data->dev_private;
+	struct fman_if *fif = dev->process_private;
 
 	PMD_INIT_FUNC_TRACE();
 
-	fman_if_disable_rx(dpaa_intf->fif);
+	fman_if_disable_rx(fif);
 	dev->tx_pkt_burst = dpaa_eth_tx_drop_all;
 }
 
@@ -342,6 +340,7 @@ static int dpaa_eth_dev_info(struct rte_eth_dev *dev,
 			     struct rte_eth_dev_info *dev_info)
 {
 	struct dpaa_if *dpaa_intf = dev->data->dev_private;
+	struct fman_if *fif = dev->process_private;
 
 	DPAA_PMD_DEBUG(": %s", dpaa_intf->name);
 
@@ -354,18 +353,18 @@ static int dpaa_eth_dev_info(struct rte_eth_dev *dev,
 	dev_info->max_vmdq_pools = ETH_16_POOLS;
 	dev_info->flow_type_rss_offloads = DPAA_RSS_OFFLOAD_ALL;
 
-	if (dpaa_intf->fif->mac_type == fman_mac_1g) {
+	if (fif->mac_type == fman_mac_1g) {
 		dev_info->speed_capa = ETH_LINK_SPEED_1G;
-	} else if (dpaa_intf->fif->mac_type == fman_mac_2_5g) {
+	} else if (fif->mac_type == fman_mac_2_5g) {
 		dev_info->speed_capa = ETH_LINK_SPEED_1G
 					| ETH_LINK_SPEED_2_5G;
-	} else if (dpaa_intf->fif->mac_type == fman_mac_10g) {
+	} else if (fif->mac_type == fman_mac_10g) {
 		dev_info->speed_capa = ETH_LINK_SPEED_1G
 					| ETH_LINK_SPEED_2_5G
 					| ETH_LINK_SPEED_10G;
 	} else {
 		DPAA_PMD_ERR("invalid link_speed: %s, %d",
-			     dpaa_intf->name, dpaa_intf->fif->mac_type);
+			     dpaa_intf->name, fif->mac_type);
 		return -EINVAL;
 	}
 
@@ -388,18 +387,19 @@ static int dpaa_eth_link_update(struct rte_eth_dev *dev,
 {
 	struct dpaa_if *dpaa_intf = dev->data->dev_private;
 	struct rte_eth_link *link = &dev->data->dev_link;
+	struct fman_if *fif = dev->process_private;
 
 	PMD_INIT_FUNC_TRACE();
 
-	if (dpaa_intf->fif->mac_type == fman_mac_1g)
+	if (fif->mac_type == fman_mac_1g)
 		link->link_speed = ETH_SPEED_NUM_1G;
-	else if (dpaa_intf->fif->mac_type == fman_mac_2_5g)
+	else if (fif->mac_type == fman_mac_2_5g)
 		link->link_speed = ETH_SPEED_NUM_2_5G;
-	else if (dpaa_intf->fif->mac_type == fman_mac_10g)
+	else if (fif->mac_type == fman_mac_10g)
 		link->link_speed = ETH_SPEED_NUM_10G;
 	else
 		DPAA_PMD_ERR("invalid link_speed: %s, %d",
-			     dpaa_intf->name, dpaa_intf->fif->mac_type);
+			     dpaa_intf->name, fif->mac_type);
 
 	link->link_status = dpaa_intf->valid;
 	link->link_duplex = ETH_LINK_FULL_DUPLEX;
@@ -410,21 +410,17 @@ static int dpaa_eth_link_update(struct rte_eth_dev *dev,
 static int dpaa_eth_stats_get(struct rte_eth_dev *dev,
 			       struct rte_eth_stats *stats)
 {
-	struct dpaa_if *dpaa_intf = dev->data->dev_private;
-
 	PMD_INIT_FUNC_TRACE();
 
-	fman_if_stats_get(dpaa_intf->fif, stats);
+	fman_if_stats_get(dev->process_private, stats);
 	return 0;
 }
 
 static int dpaa_eth_stats_reset(struct rte_eth_dev *dev)
 {
-	struct dpaa_if *dpaa_intf = dev->data->dev_private;
-
 	PMD_INIT_FUNC_TRACE();
 
-	fman_if_stats_reset(dpaa_intf->fif);
+	fman_if_stats_reset(dev->process_private);
 
 	return 0;
 }
@@ -433,7 +429,6 @@ static int
 dpaa_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 		    unsigned int n)
 {
-	struct dpaa_if *dpaa_intf = dev->data->dev_private;
 	unsigned int i = 0, num = RTE_DIM(dpaa_xstats_strings);
 	uint64_t values[sizeof(struct dpaa_if_stats) / 8];
 
@@ -443,7 +438,7 @@ dpaa_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	if (xstats == NULL)
 		return 0;
 
-	fman_if_stats_get_all(dpaa_intf->fif, values,
+	fman_if_stats_get_all(dev->process_private, values,
 			      sizeof(struct dpaa_if_stats) / 8);
 
 	for (i = 0; i < num; i++) {
@@ -480,15 +475,13 @@ dpaa_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
 	uint64_t values_copy[sizeof(struct dpaa_if_stats) / 8];
 
 	if (!ids) {
-		struct dpaa_if *dpaa_intf = dev->data->dev_private;
-
 		if (n < stat_cnt)
 			return stat_cnt;
 
 		if (!values)
 			return 0;
 
-		fman_if_stats_get_all(dpaa_intf->fif, values_copy,
+		fman_if_stats_get_all(dev->process_private, values_copy,
 				      sizeof(struct dpaa_if_stats) / 8);
 
 		for (i = 0; i < stat_cnt; i++)
@@ -537,44 +530,36 @@ dpaa_xstats_get_names_by_id(
 
 static int dpaa_eth_promiscuous_enable(struct rte_eth_dev *dev)
 {
-	struct dpaa_if *dpaa_intf = dev->data->dev_private;
-
 	PMD_INIT_FUNC_TRACE();
 
-	fman_if_promiscuous_enable(dpaa_intf->fif);
+	fman_if_promiscuous_enable(dev->process_private);
 
 	return 0;
 }
 
 static int dpaa_eth_promiscuous_disable(struct rte_eth_dev *dev)
 {
-	struct dpaa_if *dpaa_intf = dev->data->dev_private;
-
 	PMD_INIT_FUNC_TRACE();
 
-	fman_if_promiscuous_disable(dpaa_intf->fif);
+	fman_if_promiscuous_disable(dev->process_private);
 
 	return 0;
 }
 
 static int dpaa_eth_multicast_enable(struct rte_eth_dev *dev)
 {
-	struct dpaa_if *dpaa_intf = dev->data->dev_private;
-
 	PMD_INIT_FUNC_TRACE();
 
-	fman_if_set_mcast_filter_table(dpaa_intf->fif);
+	fman_if_set_mcast_filter_table(dev->process_private);
 
 	return 0;
 }
 
 static int dpaa_eth_multicast_disable(struct rte_eth_dev *dev)
 {
-	struct dpaa_if *dpaa_intf = dev->data->dev_private;
-
 	PMD_INIT_FUNC_TRACE();
 
-	fman_if_reset_mcast_filter_table(dpaa_intf->fif);
+	fman_if_reset_mcast_filter_table(dev->process_private);
 
 	return 0;
 }
@@ -587,6 +572,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 			    struct rte_mempool *mp)
 {
 	struct dpaa_if *dpaa_intf = dev->data->dev_private;
+	struct fman_if *fif = dev->process_private;
 	struct qman_fq *rxq = &dpaa_intf->rx_queues[queue_idx];
 	struct qm_mcc_initfq opts = {0};
 	u32 flags = 0;
@@ -643,22 +629,22 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		icp.iciof = DEFAULT_ICIOF;
 		icp.iceof = DEFAULT_RX_ICEOF;
 		icp.icsz = DEFAULT_ICSZ;
-		fman_if_set_ic_params(dpaa_intf->fif, &icp);
+		fman_if_set_ic_params(fif, &icp);
 
 		fd_offset = RTE_PKTMBUF_HEADROOM + DPAA_HW_BUF_RESERVE;
-		fman_if_set_fdoff(dpaa_intf->fif, fd_offset);
+		fman_if_set_fdoff(fif, fd_offset);
 
 		/* Buffer pool size should be equal to Dataroom Size*/
 		bp_size = rte_pktmbuf_data_room_size(mp);
-		fman_if_set_bp(dpaa_intf->fif, mp->size,
+		fman_if_set_bp(fif, mp->size,
 			       dpaa_intf->bp_info->bpid, bp_size);
 		dpaa_intf->valid = 1;
 		DPAA_PMD_DEBUG("if:%s fd_offset = %d offset = %d",
 				dpaa_intf->name, fd_offset,
-				fman_if_get_fdoff(dpaa_intf->fif));
+				fman_if_get_fdoff(fif));
 	}
 	DPAA_PMD_DEBUG("if:%s sg_on = %d, max_frm =%d", dpaa_intf->name,
-		fman_if_get_sg_enable(dpaa_intf->fif),
+		fman_if_get_sg_enable(fif),
 		dev->data->dev_conf.rxmode.max_rx_pkt_len);
 	/* checking if push mode only, no error check for now */
 	if (!rxq->is_static &&
@@ -950,11 +936,12 @@ dpaa_flow_ctrl_set(struct rte_eth_dev *dev,
 		return 0;
 	} else if (fc_conf->mode == RTE_FC_TX_PAUSE ||
 		 fc_conf->mode == RTE_FC_FULL) {
-		fman_if_set_fc_threshold(dpaa_intf->fif, fc_conf->high_water,
+		fman_if_set_fc_threshold(dev->process_private,
+					 fc_conf->high_water,
 					 fc_conf->low_water,
-				dpaa_intf->bp_info->bpid);
+					 dpaa_intf->bp_info->bpid);
 		if (fc_conf->pause_time)
-			fman_if_set_fc_quanta(dpaa_intf->fif,
+			fman_if_set_fc_quanta(dev->process_private,
 					      fc_conf->pause_time);
 	}
 
@@ -990,10 +977,11 @@ dpaa_flow_ctrl_get(struct rte_eth_dev *dev,
 		fc_conf->autoneg = net_fc->autoneg;
 		return 0;
 	}
-	ret = fman_if_get_fc_threshold(dpaa_intf->fif);
+	ret = fman_if_get_fc_threshold(dev->process_private);
 	if (ret) {
 		fc_conf->mode = RTE_FC_TX_PAUSE;
-		fc_conf->pause_time = fman_if_get_fc_quanta(dpaa_intf->fif);
+		fc_conf->pause_time =
+			fman_if_get_fc_quanta(dev->process_private);
 	} else {
 		fc_conf->mode = RTE_FC_NONE;
 	}
@@ -1008,11 +996,11 @@ dpaa_dev_add_mac_addr(struct rte_eth_dev *dev,
 			     __rte_unused uint32_t pool)
 {
 	int ret;
-	struct dpaa_if *dpaa_intf = dev->data->dev_private;
 
 	PMD_INIT_FUNC_TRACE();
 
-	ret = fman_if_add_mac_addr(dpaa_intf->fif, addr->addr_bytes, index);
+	ret = fman_if_add_mac_addr(dev->process_private,
+				   addr->addr_bytes, index);
 
 	if (ret)
 		DPAA_PMD_ERR("Adding the MAC ADDR failed: err = %d", ret);
@@ -1023,11 +1011,9 @@ static void
 dpaa_dev_remove_mac_addr(struct rte_eth_dev *dev,
 			  uint32_t index)
 {
-	struct dpaa_if *dpaa_intf = dev->data->dev_private;
-
 	PMD_INIT_FUNC_TRACE();
 
-	fman_if_clear_mac_addr(dpaa_intf->fif, index);
+	fman_if_clear_mac_addr(dev->process_private, index);
 }
 
 static int
@@ -1035,11 +1021,10 @@ dpaa_dev_set_mac_addr(struct rte_eth_dev *dev,
 		       struct rte_ether_addr *addr)
 {
 	int ret;
-	struct dpaa_if *dpaa_intf = dev->data->dev_private;
 
 	PMD_INIT_FUNC_TRACE();
 
-	ret = fman_if_add_mac_addr(dpaa_intf->fif, addr->addr_bytes, 0);
+	ret = fman_if_add_mac_addr(dev->process_private, addr->addr_bytes, 0);
 	if (ret)
 		DPAA_PMD_ERR("Setting the MAC ADDR failed %d", ret);
 
@@ -1142,7 +1127,6 @@ int
 rte_pmd_dpaa_set_tx_loopback(uint8_t port, uint8_t on)
 {
 	struct rte_eth_dev *dev;
-	struct dpaa_if *dpaa_intf;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
 
@@ -1151,17 +1135,16 @@ rte_pmd_dpaa_set_tx_loopback(uint8_t port, uint8_t on)
 	if (!is_dpaa_supported(dev))
 		return -ENOTSUP;
 
-	dpaa_intf = dev->data->dev_private;
-
 	if (on)
-		fman_if_loopback_enable(dpaa_intf->fif);
+		fman_if_loopback_enable(dev->process_private);
 	else
-		fman_if_loopback_disable(dpaa_intf->fif);
+		fman_if_loopback_disable(dev->process_private);
 
 	return 0;
 }
 
-static int dpaa_fc_set_default(struct dpaa_if *dpaa_intf)
+static int dpaa_fc_set_default(struct dpaa_if *dpaa_intf,
+			       struct fman_if *fman_intf)
 {
 	struct rte_eth_fc_conf *fc_conf;
 	int ret;
@@ -1177,10 +1160,10 @@ static int dpaa_fc_set_default(struct dpaa_if *dpaa_intf)
 		}
 	}
 	fc_conf = dpaa_intf->fc_conf;
-	ret = fman_if_get_fc_threshold(dpaa_intf->fif);
+	ret = fman_if_get_fc_threshold(fman_intf);
 	if (ret) {
 		fc_conf->mode = RTE_FC_TX_PAUSE;
-		fc_conf->pause_time = fman_if_get_fc_quanta(dpaa_intf->fif);
+		fc_conf->pause_time = fman_if_get_fc_quanta(fman_intf);
 	} else {
 		fc_conf->mode = RTE_FC_NONE;
 	}
@@ -1342,6 +1325,39 @@ static int dpaa_debug_queue_init(struct qman_fq *fq, uint32_t fqid)
 }
 #endif
 
+/* Initialise a network interface */
+static int
+dpaa_dev_init_secondary(struct rte_eth_dev *eth_dev)
+{
+	struct rte_dpaa_device *dpaa_device;
+	struct fm_eth_port_cfg *cfg;
+	struct dpaa_if *dpaa_intf;
+	struct fman_if *fman_intf;
+	int dev_id;
+
+	PMD_INIT_FUNC_TRACE();
+
+	dpaa_device = DEV_TO_DPAA_DEVICE(eth_dev->device);
+	dev_id = dpaa_device->id.dev_id;
+	cfg = dpaa_get_eth_port_cfg(dev_id);
+	fman_intf = cfg->fman_if;
+	eth_dev->process_private = fman_intf;
+
+	/* Plugging of UCODE burst API not supported in Secondary */
+	dpaa_intf = eth_dev->data->dev_private;
+	eth_dev->rx_pkt_burst = dpaa_eth_queue_rx;
+	if (dpaa_intf->cgr_tx)
+		eth_dev->tx_pkt_burst = dpaa_eth_queue_tx_slow;
+	else
+		eth_dev->tx_pkt_burst = dpaa_eth_queue_tx;
+#ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
+	qman_set_fq_lookup_table(
+		dpaa_intf->rx_queues->qman_fq_lookup_table);
+#endif
+
+	return 0;
+}
+
 /* Initialise a network interface */
 static int
 dpaa_dev_init(struct rte_eth_dev *eth_dev)
@@ -1360,23 +1376,6 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	dpaa_intf = eth_dev->data->dev_private;
-	/* For secondary processes, the primary has done all the work */
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
-		eth_dev->dev_ops = &dpaa_devops;
-		/* Plugging of UCODE burst API not supported in Secondary */
-		eth_dev->rx_pkt_burst = dpaa_eth_queue_rx;
-		if (dpaa_intf->cgr_tx)
-			eth_dev->tx_pkt_burst = dpaa_eth_queue_tx_slow;
-		else
-			eth_dev->tx_pkt_burst = dpaa_eth_queue_tx;
-#ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-		qman_set_fq_lookup_table(
-				dpaa_intf->rx_queues->qman_fq_lookup_table);
-#endif
-		return 0;
-	}
-
 	dpaa_device = DEV_TO_DPAA_DEVICE(eth_dev->device);
 	dev_id = dpaa_device->id.dev_id;
 	dpaa_intf = eth_dev->data->dev_private;
@@ -1386,7 +1385,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 	dpaa_intf->name = dpaa_device->name;
 
 	/* save fman_if & cfg in the interface struture */
-	dpaa_intf->fif = fman_intf;
+	eth_dev->process_private = fman_intf;
 	dpaa_intf->ifid = dev_id;
 	dpaa_intf->cfg = cfg;
 
@@ -1455,7 +1454,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->fif->mac_idx *
+			fqid = DPAA_PCD_FQID_START + fman_intf->mac_idx *
 				DPAA_PCD_FQID_MULTIPLIER + loop;
 
 		if (dpaa_intf->cgr_rx)
@@ -1527,7 +1526,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 	DPAA_PMD_DEBUG("All frame queues created");
 
 	/* Get the initial configuration for flow control */
-	dpaa_fc_set_default(dpaa_intf);
+	dpaa_fc_set_default(dpaa_intf, fman_intf);
 
 	/* reset bpool list, initialize bpool dynamically */
 	list_for_each_entry_safe(bp, tmp_bp, &cfg->fman_if->bpool_list, node) {
@@ -1674,6 +1673,13 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
 			return -ENOMEM;
 		eth_dev->device = &dpaa_dev->device;
 		eth_dev->dev_ops = &dpaa_devops;
+
+		ret = dpaa_dev_init_secondary(eth_dev);
+		if (ret != 0) {
+			RTE_LOG(ERR, PMD, "secondary dev init failed\n");
+			return ret;
+		}
+
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
 	}
@@ -1709,29 +1715,20 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
 		}
 	}
 
-	/* In case of secondary process, the device is already configured
-	 * and no further action is required, except portal initialization
-	 * and verifying secondary attachment to port name.
-	 */
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
-		eth_dev = rte_eth_dev_attach_secondary(dpaa_dev->name);
-		if (!eth_dev)
-			return -ENOMEM;
-	} else {
-		eth_dev = rte_eth_dev_allocate(dpaa_dev->name);
-		if (eth_dev == NULL)
-			return -ENOMEM;
+	eth_dev = rte_eth_dev_allocate(dpaa_dev->name);
+	if (!eth_dev)
+		return -ENOMEM;
 
-		eth_dev->data->dev_private = rte_zmalloc(
-						"ethdev private structure",
-						sizeof(struct dpaa_if),
-						RTE_CACHE_LINE_SIZE);
-		if (!eth_dev->data->dev_private) {
-			DPAA_PMD_ERR("Cannot allocate memzone for port data");
-			rte_eth_dev_release_port(eth_dev);
-			return -ENOMEM;
-		}
+	eth_dev->data->dev_private =
+			rte_zmalloc("ethdev private structure",
+					sizeof(struct dpaa_if),
+					RTE_CACHE_LINE_SIZE);
+	if (!eth_dev->data->dev_private) {
+		DPAA_PMD_ERR("Cannot allocate memzone for port data");
+		rte_eth_dev_release_port(eth_dev);
+		return -ENOMEM;
 	}
+
 	eth_dev->device = &dpaa_dev->device;
 	dpaa_dev->eth_dev = eth_dev;
 
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index d4261f885..4c40ff86a 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -116,7 +116,6 @@ struct dpaa_if {
 	uint16_t nb_rx_queues;
 	uint16_t nb_tx_queues;
 	uint32_t ifid;
-	struct fman_if *fif;
 	struct dpaa_bp_info *bp_info;
 	struct rte_eth_fc_conf *fc_conf;
 };
-- 
2.17.1


  parent reply	other threads:[~2020-07-07  9:29 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 13:22 [dpdk-dev] [PATCH 00/37] NXP DPAAx enhancements Hemant Agrawal
2020-05-27 13:22 ` [dpdk-dev] [PATCH 01/37] bus/fslmc: fix getting the FD error Hemant Agrawal
2020-05-27 18:07   ` Akhil Goyal
2020-05-27 13:22 ` [dpdk-dev] [PATCH 02/37] net/dpaa: fix fd offset data type Hemant Agrawal
2020-05-27 18:08   ` Akhil Goyal
2020-05-27 13:22 ` [dpdk-dev] [PATCH 03/37] net/dpaa2: enable timestamp for Rx offload case as well Hemant Agrawal
2020-05-27 13:22 ` [dpdk-dev] [PATCH 04/37] bus/fslmc: combine thread specific variables Hemant Agrawal
2020-05-27 13:22 ` [dpdk-dev] [PATCH 05/37] bus/fslmc: rework portal allocation to a per thread basis Hemant Agrawal
2020-07-01  7:23   ` Ferruh Yigit
2020-05-27 13:22 ` [dpdk-dev] [PATCH 06/37] bus/fslmc: support handle portal alloc failure Hemant Agrawal
2020-05-27 13:22 ` [dpdk-dev] [PATCH 07/37] bus/fslmc: support portal migration Hemant Agrawal
2020-05-27 13:22 ` [dpdk-dev] [PATCH 08/37] bus/fslmc: rename the cinh read functions used for ls1088 Hemant Agrawal
2020-05-27 13:22 ` [dpdk-dev] [PATCH 09/37] net/dpaa: enable Tx queue taildrop Hemant Agrawal
2020-05-27 13:22 ` [dpdk-dev] [PATCH 10/37] net/dpaa: add 2.5G support Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 11/37] net/dpaa: update process specific device info Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 12/37] drivers: optimize thread local storage for dpaa Hemant Agrawal
2020-05-27 18:13   ` Akhil Goyal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 13/37] bus/dpaa: enable link state interrupt Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 14/37] bus/dpaa: enable set link status Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 15/37] net/dpaa: add support for fmlib in dpdk Hemant Agrawal
2020-06-30 17:00   ` Ferruh Yigit
2020-07-01  4:18     ` Hemant Agrawal
2020-07-01  7:35       ` Ferruh Yigit
2020-05-27 13:23 ` [dpdk-dev] [PATCH 16/37] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 17/37] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-06-30 17:01   ` Ferruh Yigit
2020-07-01  4:04     ` Hemant Agrawal
2020-07-01  7:37       ` Ferruh Yigit
2020-05-27 13:23 ` [dpdk-dev] [PATCH 18/37] bus/dpaa: add shared MAC support Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 19/37] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 20/37] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 21/37] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 22/37] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 23/37] net/dpaa2: dynamic flow control support Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 24/37] net/dpaa2: key extracts of flow API Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 25/37] net/dpaa2: sanity check for flow extracts Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 26/37] net/dpaa2: free flow rule memory Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 27/37] net/dpaa2: flow QoS or FS table entry indexing Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 28/37] net/dpaa2: define the size of table entry Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 29/37] net/dpaa2: log of flow extracts and rules Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 30/37] net/dpaa2: discrimination between IPv4 and IPv6 Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 31/37] net/dpaa2: distribution size set on multiple TCs Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 32/37] net/dpaa2: index of queue action for flow Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 33/37] net/dpaa2: flow data sanity check Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 34/37] net/dpaa2: flow API QoS setup follows FS setup Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 35/37] net/dpaa2: flow API FS miss action configuration Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 36/37] net/dpaa2: configure per class distribution size Hemant Agrawal
2020-05-27 13:23 ` [dpdk-dev] [PATCH 37/37] net/dpaa2: support raw flow classification Hemant Agrawal
2020-06-30 17:01 ` [dpdk-dev] [PATCH 00/37] NXP DPAAx enhancements Ferruh Yigit
2020-07-01  4:08   ` Hemant Agrawal
2020-07-07  9:22 ` [dpdk-dev] [PATCH v2 00/29] " Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 01/29] bus/fslmc: fix getting the FD error Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 02/29] net/dpaa: fix fd offset data type Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 03/29] net/dpaa2: enable timestamp for Rx offload case as well Hemant Agrawal
2020-07-11 13:46     ` Thomas Monjalon
2020-07-13  3:47       ` Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 04/29] bus/fslmc: combine thread specific variables Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 05/29] bus/fslmc: rework portal allocation to a per thread basis Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 06/29] bus/fslmc: support handle portal alloc failure Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 07/29] bus/fslmc: support portal migration Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 08/29] bus/fslmc: rename the cinh read functions used for ls1088 Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 09/29] net/dpaa: enable Tx queue taildrop Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 10/29] net/dpaa: add 2.5G support Hemant Agrawal
2020-07-07  9:22   ` Hemant Agrawal [this message]
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 12/29] drivers: optimize thread local storage for dpaa Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 13/29] bus/dpaa: enable link state interrupt Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 14/29] bus/dpaa: enable set link status Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 15/29] net/dpaa2: support dynamic flow control Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 16/29] net/dpaa2: support key extracts of flow API Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 17/29] net/dpaa2: add sanity check for flow extracts Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 18/29] net/dpaa2: free flow rule memory Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 19/29] net/dpaa2: support QoS or FS table entry indexing Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 20/29] net/dpaa2: define the size of table entry Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 21/29] net/dpaa2: add logging of flow extracts and rules Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 22/29] net/dpaa2: support iscrimination between IPv4 and IPv6 Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 23/29] net/dpaa2: support distribution size set on multiple TCs Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 24/29] net/dpaa2: support ndex of queue action for flow Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 25/29] net/dpaa2: add flow data sanity check Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 26/29] net/dpaa2: modify flow API QoS setup to follow FS setup Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 27/29] net/dpaa2: support flow API FS miss action configuration Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 28/29] net/dpaa2: configure per class distribution size Hemant Agrawal
2020-07-07  9:22   ` [dpdk-dev] [PATCH v2 29/29] net/dpaa2: support raw flow classification Hemant Agrawal
2020-07-09  1:54   ` [dpdk-dev] [PATCH v2 00/29] NXP DPAAx enhancements Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200707092244.12791-12-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=nipun.gupta@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.