summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemant Agrawal <hemant.agrawal@nxp.com>2018-01-29 13:40:48 +0530
committerThomas Monjalon <thomas@monjalon.net>2018-01-29 19:02:05 +0100
commit2bd0d5b951a92ce1be828f6614a27197b30e1e07 (patch)
treee190db897dcf9201b8a763a0897f061b4e1781d8
parent0e79856795144d0622d5289f49e53ccb0751a9dd (diff)
downloaddpdk-2bd0d5b951a92ce1be828f6614a27197b30e1e07.zip
dpdk-2bd0d5b951a92ce1be828f6614a27197b30e1e07.tar.gz
dpdk-2bd0d5b951a92ce1be828f6614a27197b30e1e07.tar.xz
bus/dpaa: register platform HW mempool on runtime
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
-rw-r--r--config/defconfig_arm64-dpaa-linuxapp-gcc1
-rw-r--r--drivers/bus/dpaa/dpaa_bus.c2
-rw-r--r--drivers/bus/dpaa/rte_dpaa_bus.h2
-rw-r--r--drivers/mempool/dpaa/dpaa_mempool.c2
4 files changed, 5 insertions, 2 deletions
diff --git a/config/defconfig_arm64-dpaa-linuxapp-gcc b/config/defconfig_arm64-dpaa-linuxapp-gcc
index c2ca16a..ab9e67d 100644
--- a/config/defconfig_arm64-dpaa-linuxapp-gcc
+++ b/config/defconfig_arm64-dpaa-linuxapp-gcc
@@ -25,7 +25,6 @@ CONFIG_RTE_LIBRTE_DPAA_HWDEBUG=n
# NXP DPAA Mempool
CONFIG_RTE_LIBRTE_DPAA_MEMPOOL=y
-CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS="dpaa"
# Compile software NXP DPAA PMD
CONFIG_RTE_LIBRTE_DPAA_PMD=y
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index ba33566..f5840de 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -31,6 +31,7 @@
#include <rte_malloc.h>
#include <rte_ring.h>
#include <rte_bus.h>
+#include <rte_mbuf_pool_ops.h>
#include <rte_dpaa_bus.h>
#include <rte_dpaa_logs.h>
@@ -469,6 +470,7 @@ rte_dpaa_bus_probe(void)
break;
}
}
+ rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
svr_file = fopen(DPAA_SOC_ID_FILE, "r");
if (svr_file) {
diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h
index 6fa0c3d..d613660 100644
--- a/drivers/bus/dpaa/rte_dpaa_bus.h
+++ b/drivers/bus/dpaa/rte_dpaa_bus.h
@@ -17,6 +17,8 @@
#define FSL_DPAA_BUS_NAME "FSL_DPAA_BUS"
+#define DPAA_MEMPOOL_OPS_NAME "dpaa"
+
#define DEV_TO_DPAA_DEVICE(ptr) \
container_of(ptr, struct rte_dpaa_device, device)
diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c
index ddc4e47..dc4bcc9 100644
--- a/drivers/mempool/dpaa/dpaa_mempool.c
+++ b/drivers/mempool/dpaa/dpaa_mempool.c
@@ -290,7 +290,7 @@ dpaa_register_memory_area(const struct rte_mempool *mp,
}
struct rte_mempool_ops dpaa_mpool_ops = {
- .name = "dpaa",
+ .name = DPAA_MEMPOOL_OPS_NAME,
.alloc = dpaa_mbuf_create_pool,
.free = dpaa_mbuf_free_pool,
.enqueue = dpaa_mbuf_free_bulk,