From ac0c53ae585ded5709bb1518428b0fccf76c9548 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Mon, 11 Apr 2022 00:32:50 +0000 Subject: [PATCH] env_dpdk: do not set RTE_MEMPOOL_F_NO_IOVA_CONTIG This was added in patch 07526d85, back in March 2018. This was before DPDK supported dynamic hugepage allocations. Presumably this flag was added to reduce the amount of memory lost due to mempool buffers that would otherwise span an IOVA boundary (mostly typical with IOMMU off and we are relying on physical addresses). Removing it simplifies any code in SPDK that uses mempool buffers for DMA operations, since it doesn't have to worry about splitting buffers that span an IOVA boundary - DPDK has already done it for us. Signed-off-by: Jim Harris Change-Id: I49f6c1407fad02acae7e07c9dd00cb0449bd3554 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12277 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Aleksey Marchuk --- lib/env_dpdk/env.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/env_dpdk/env.c b/lib/env_dpdk/env.c index 1d1da6918..832aedeb2 100644 --- a/lib/env_dpdk/env.c +++ b/lib/env_dpdk/env.c @@ -223,13 +223,6 @@ spdk_mempool_create_ctor(const char *name, size_t count, { struct rte_mempool *mp; size_t tmp; - unsigned dpdk_flags = 0; - -#if RTE_VERSION >= RTE_VERSION_NUM(21, 11, 0, 0) - dpdk_flags |= RTE_MEMPOOL_F_NO_IOVA_CONTIG; -#else - dpdk_flags |= MEMPOOL_F_NO_IOVA_CONTIG; -#endif if (socket_id == SPDK_ENV_SOCKET_ID_ANY) { socket_id = SOCKET_ID_ANY; @@ -247,7 +240,7 @@ spdk_mempool_create_ctor(const char *name, size_t count, mp = rte_mempool_create(name, count, ele_size, cache_size, 0, NULL, NULL, (rte_mempool_obj_cb_t *)obj_init, obj_init_arg, - socket_id, dpdk_flags); + socket_id, 0); return (struct spdk_mempool *)mp; }