bus/dpaa: move mempool registration before probing

moving the mempool ops registration before DPAA
devices probe so that device probe functions can
also be able to use mempool operations.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This commit is contained in:
Gagandeep Singh 2022-10-07 08:57:41 +05:30 committed by Ferruh Yigit
parent 533c31cc83
commit c82b17b780

View File

@ -656,6 +656,11 @@ rte_dpaa_bus_probe(void)
if (TAILQ_EMPTY(&rte_dpaa_bus.device_list))
return 0;
/* Register DPAA mempool ops only if any DPAA device has
* been detected.
*/
rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
svr_file = fopen(DPAA_SOC_ID_FILE, "r");
if (svr_file) {
if (fscanf(svr_file, "svr:%x", &svr_ver) > 0)
@ -705,11 +710,6 @@ rte_dpaa_bus_probe(void)
}
}
/* Register DPAA mempool ops only if any DPAA device has
* been detected.
*/
rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
return 0;
}