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.si...@nxp.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 682427ba2c..3ca5147761 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -655,6 +655,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)
@@ -704,11 +709,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;
 }
 
-- 
2.25.1

Reply via email to