nvmf: remove unnecessary size checks when creating transport

The individual transports will adjust these sizes when
necessary.  In fact, we have to remove this check, since
RDMA transport may adjust the io_unit_size based on the
max number of SGEs - and can adjust it to a value that
will fail this check if we reload the configuration.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2708c7f5aaa54a368ec932ec40dd6447f1a4fde0

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452474
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Jim Harris 2019-04-29 07:34:35 -07:00
parent 78326e722f
commit a95fdad68f

View File

@ -85,17 +85,6 @@ spdk_nvmf_transport_create(enum spdk_nvme_transport_type type,
char spdk_mempool_name[MAX_MEMPOOL_NAME_LENGTH];
int chars_written;
if ((opts->max_io_size % opts->io_unit_size != 0) ||
(opts->max_io_size / opts->io_unit_size >
SPDK_NVMF_MAX_SGL_ENTRIES)) {
SPDK_ERRLOG("%s: invalid IO size, MaxIO:%d, UnitIO:%d, MaxSGL:%d\n",
spdk_nvme_transport_id_trtype_str(type),
opts->max_io_size,
opts->io_unit_size,
SPDK_NVMF_MAX_SGL_ENTRIES);
return NULL;
}
ops = spdk_nvmf_get_transport_ops(type);
if (!ops) {
SPDK_ERRLOG("Transport type %s unavailable.\n",