From: Nipun Gupta Date: Mon, 5 Feb 2018 05:21:55 +0000 (+0530) Subject: bus/dpaa: fix mempool ops registration X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0c5fd10decea570692a1bb796ec261106e9995f8;p=dpdk.git 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 --- 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) {