nvmf/rdma: Use spdk allocation scheme for RDMA requests and receives
In a similar manner for what we do for other per IO data-structures of cmds, cpls and bufs, use the conventional huge-pages based spdk allocation scheme for RDMA requests and receives. Change-Id: I4c2e86e928106e78c053f24915e2a9ce1a200c78 Signed-off-by: Or Gerlitz <ogerlitz@nvidia.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12273 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
5edb8edca7
commit
bfcfdb7903
@ -694,8 +694,8 @@ nvmf_rdma_resources_destroy(struct spdk_nvmf_rdma_resources *resources)
|
||||
spdk_free(resources->cmds);
|
||||
spdk_free(resources->cpls);
|
||||
spdk_free(resources->bufs);
|
||||
free(resources->reqs);
|
||||
free(resources->recvs);
|
||||
spdk_free(resources->reqs);
|
||||
spdk_free(resources->recvs);
|
||||
free(resources);
|
||||
}
|
||||
|
||||
@ -718,8 +718,10 @@ nvmf_rdma_resources_create(struct spdk_nvmf_rdma_resource_opts *opts)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
resources->reqs = calloc(opts->max_queue_depth, sizeof(*resources->reqs));
|
||||
resources->recvs = calloc(opts->max_queue_depth, sizeof(*resources->recvs));
|
||||
resources->reqs = spdk_zmalloc(opts->max_queue_depth * sizeof(*resources->reqs),
|
||||
0x1000, NULL, SPDK_ENV_LCORE_ID_ANY, SPDK_MALLOC_DMA);
|
||||
resources->recvs = spdk_zmalloc(opts->max_queue_depth * sizeof(*resources->recvs),
|
||||
0x1000, NULL, SPDK_ENV_LCORE_ID_ANY, SPDK_MALLOC_DMA);
|
||||
resources->cmds = spdk_zmalloc(opts->max_queue_depth * sizeof(*resources->cmds),
|
||||
0x1000, NULL, SPDK_ENV_LCORE_ID_ANY, SPDK_MALLOC_DMA);
|
||||
resources->cpls = spdk_zmalloc(opts->max_queue_depth * sizeof(*resources->cpls),
|
||||
|
Loading…
Reference in New Issue
Block a user