From 0c5fd10decea570692a1bb796ec261106e9995f8 Mon Sep 17 00:00:00 2001 From: Nipun Gupta Date: Mon, 5 Feb 2018 10:51:55 +0530 Subject: [PATCH] bus/dpaa: fix mempool ops registration Fixes: 2bd0d5b951a9 ("bus/dpaa: register platform HW mempool on runtime") Signed-off-by: Nipun Gupta Acked-by: Santosh Shukla Acked-by: Shreyansh Jain --- drivers/bus/dpaa/dpaa_bus.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 1946bbe619..290b967daf 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -495,10 +495,16 @@ rte_dpaa_bus_probe(void) ret = drv->probe(drv, dev); if (ret) DPAA_BUS_ERR("Unable to probe.\n"); + break; } } - rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME); + + /* Register DPAA mempool ops only if any DPAA device has + * been detected. + */ + if (!TAILQ_EMPTY(&rte_dpaa_bus.device_list)) + rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME); svr_file = fopen(DPAA_SOC_ID_FILE, "r"); if (svr_file) { -- 2.20.1