Commit a95fdad6 authored by Jim Harris's avatar Jim Harris
Browse files

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: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I2708c7f5aaa54a368ec932ec40dd6447f1a4fde0

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452474


Reviewed-by: default avatarSeth Howell <seth.howell5141@gmail.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 78326e72
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -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",