Calling rte_eth_dev_allocated() is enough to retrieve the ethdev device object.
This leaves no user of the ethdev field in the dpaa device object. Signed-off-by: David Marchand <[email protected]> --- drivers/bus/dpaa/bus_dpaa_driver.h | 3 --- drivers/net/dpaa/dpaa_ethdev.c | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/bus/dpaa/bus_dpaa_driver.h b/drivers/bus/dpaa/bus_dpaa_driver.h index 0642aee14a..4aed83f84d 100644 --- a/drivers/bus/dpaa/bus_dpaa_driver.h +++ b/drivers/bus/dpaa/bus_dpaa_driver.h @@ -80,9 +80,6 @@ struct dpaa_device_id { struct rte_dpaa_device { struct rte_device device; - union { - struct rte_eth_dev *eth_dev; - }; struct dpaa_device_id id; struct rte_intr_handle *intr_handle; enum rte_dpaa_type device_type; /**< Ethernet or crypto type device */ diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 9f976d179b..967e814b5d 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -2592,7 +2592,6 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv, } eth_dev->device = &dpaa_dev->device; - dpaa_dev->eth_dev = eth_dev; qman_ern_register_cb(dpaa_free_mbuf); @@ -2678,7 +2677,7 @@ rte_dpaa_remove(struct rte_dpaa_device *dpaa_dev) PMD_INIT_FUNC_TRACE(); - eth_dev = dpaa_dev->eth_dev; + eth_dev = rte_eth_dev_allocated(dpaa_dev->device.name); dpaa_eth_dev_close(eth_dev); ret = rte_eth_dev_release_port(eth_dev); dpaa_valid_dev--; -- 2.53.0

