aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dpaa2/dpaa2_ethdev.c
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2019-04-15 14:36:48 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2019-04-16 08:38:15 +0200
commit0b6b37f6a2ee1764e8912fe9f57dd4ed2baadecd (patch)
treee9c4dd16e978e7b5c4f59efb8a63fe110786592b /drivers/net/dpaa2/dpaa2_ethdev.c
parentba7d9829e24a32d31b31f5816e8b9a3a8799ba68 (diff)
New upstream version 18.11.1
Change-Id: I2394f61ba94cc575bf2c55186f14e5d6fba9eec7 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'drivers/net/dpaa2/dpaa2_ethdev.c')
-rw-r--r--drivers/net/dpaa2/dpaa2_ethdev.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index fa71807e..39f85ae7 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -311,8 +311,7 @@ dpaa2_free_rx_tx_queues(struct rte_eth_dev *dev)
/* cleanup tx queue cscn */
for (i = 0; i < priv->nb_tx_queues; i++) {
dpaa2_q = (struct dpaa2_queue *)priv->tx_vq[i];
- if (!dpaa2_q->cscn)
- rte_free(dpaa2_q->cscn);
+ rte_free(dpaa2_q->cscn);
}
/*free memory for all queues (RX+TX) */
rte_free(priv->rx_vq[0]);
@@ -1919,8 +1918,15 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
PMD_INIT_FUNC_TRACE();
/* For secondary processes, the primary has done all the work */
- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+ /* In case of secondary, only burst and ops API need to be
+ * plugged.
+ */
+ eth_dev->dev_ops = &dpaa2_ethdev_ops;
+ eth_dev->rx_pkt_burst = dpaa2_dev_prefetch_rx;
+ eth_dev->tx_pkt_burst = dpaa2_dev_tx;
return 0;
+ }
dpaa2_dev = container_of(dev, struct rte_dpaa2_device, device);