Commit 00986873 authored by Seth Howell's avatar Seth Howell Committed by Jim Harris
Browse files

init: add --match-allocations to init params.



This feature was added to DPDK by Jim to avoid the failures that can
come from splitting a buffer over memory regions in RDMA.

Change-Id: I13b646e22a4e2a4ccf915b0274061d31d02c03f7
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/446166


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 34bdceab
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -329,6 +329,18 @@ spdk_build_eal_cmdline(const struct spdk_env_opts *opts)
		return -1;
	}

	/* --match-allocation prevents DPDK from merging or splitting system memory allocations under the hood.
	 * This is critical for RDMA when attempting to use an rte_mempool based buffer pool. If DPDK merges two
	 * physically or IOVA contiguous memory regions, then when we go to allocate a buffer pool, it can split
	 * the memory for a buffer over two allocations meaning the buffer will be split over a memory region.
	 */
#if RTE_VERSION >= RTE_VERSION_NUM(19, 02, 0, 0)
	args = spdk_push_arg(args, &argcount, _sprintf_alloc("%s", "--match-allocations"));
	if (args == NULL) {
		return -1;
	}
#endif

	if (opts->shm_id < 0) {
		args = spdk_push_arg(args, &argcount, _sprintf_alloc("--file-prefix=spdk_pid%d",
				     getpid()));