From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: [PATCH v3 07/19] net/dpaa2: fix device init for secondary process Date: Fri, 11 Jan 2019 12:24:27 +0000 Message-ID: <20190111122305.7133-8-shreyansh.jain@nxp.com> References: <20190111115712.6482-1-shreyansh.jain@nxp.com> <20190111122305.7133-1-shreyansh.jain@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: "ferruh.yigit@intel.com" , Shreyansh Jain , "stable@dpdk.org" To: "dev@dpdk.org" Return-path: In-Reply-To: <20190111122305.7133-1-shreyansh.jain@nxp.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In order to support I/O from secondary process, the burst APIs and OPS APIs shall be mapped/plugged. Fixes: c147eae01cb3 ("net/dpaa2: introduce NXP DPAA2 driver") Cc: stable@dpdk.org Signed-off-by: Shreyansh Jain --- drivers/net/dpaa2/dpaa2_ethdev.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_eth= dev.c index 8d4ea1bca..39f85ae7b 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -1918,8 +1918,15 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); =20 /* For secondary processes, the primary has done all the work */ - if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) + if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) { + /* In case of secondary, only burst and ops API need to be + * plugged. + */ + eth_dev->dev_ops =3D &dpaa2_ethdev_ops; + eth_dev->rx_pkt_burst =3D dpaa2_dev_prefetch_rx; + eth_dev->tx_pkt_burst =3D dpaa2_dev_tx; return 0; + } =20 dpaa2_dev =3D container_of(dev, struct rte_dpaa2_device, device); =20 --=20 2.17.1