From bdc81134c20a18fcde35f43b7f84efd0d52a280c Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Wed, 30 Jan 2019 13:40:29 -0700 Subject: [PATCH] nvmf: use io unit size in transport buffer pools When this structure was brought up to the generic layer, the tcp transport was using max_io_size and the rdma transport was using io_unit_size. In the interest of conserving memory, we should use io_unit_size instead of max_io_size. Change-Id: I2633306fcbfd8c3d557445959c745cb2d9a0999e Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/c/442778 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto Reviewed-by: Paul Luse Reviewed-by: Ben Walker --- lib/nvmf/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nvmf/transport.c b/lib/nvmf/transport.c index 8535d8389..7c8e193fa 100644 --- a/lib/nvmf/transport.c +++ b/lib/nvmf/transport.c @@ -122,7 +122,7 @@ spdk_nvmf_transport_create(enum spdk_nvme_transport_type type, transport->data_buf_pool = spdk_mempool_create(spdk_mempool_name, opts->num_shared_buffers, - opts->max_io_size + NVMF_DATA_BUFFER_ALIGNMENT, + opts->io_unit_size + NVMF_DATA_BUFFER_ALIGNMENT, SPDK_MEMPOOL_DEFAULT_CACHE_SIZE, SPDK_ENV_SOCKET_ID_ANY);