Spdk/lib/nvme
Shuhei Matsumoto 8b539eb553 nvme: Set appropriate value to max_xfer_size and max_sge
SPDK NVMe-oF initiator driver could not transfer IO whose size is
more than 128KiB even if NVMe-oF target allows IO whose size is
more than 128KiB both for RDMA and TCP transport.

Some use cases need to transfer IO larger than 128KiB.

For RDMA transport, max_mr_size by ibv_query_device of RDMA devices
indicates the maximum size of a single memory region and is independent
from the actual I/O size, and is very likely to be larger than 2 MiB
which is the granularity we currently register memory regions.

Actually some RDMA NICs return UINT64_MAX for max_mr_size by ibv_query_device.

Hence use UINT32_MAX and let the generic layer use the controller data
to moderate this value.

On the other hand, for TCP transport, there is no limit for maximum IO
size and hence use UINT32_MAX.

Besides, for RDMA transport, max_sges should be the minimum of
max_sge got by querying RDMA devices and NVME_RDMA_MAX_SGL_DESCRIPTORS.
Hence do this change together in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idc813afd3e525bf5f370c0fcd2623f9c146a5528
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459218
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-07-05 06:35:41 +00:00
..
Makefile Opal: Add Opal library 2019-04-08 17:04:25 +00:00
nvme_ctrlr_cmd.c nvme: add qpair parameter to nvme_complete_request 2019-05-22 14:51:01 +00:00
nvme_ctrlr_ocssd_cmd.c ocssd: hold lock when calling nvme_ctrlr_submit_admin_request 2019-02-15 21:27:58 +00:00
nvme_ctrlr.c nvme: Ensure max_sges not to exceed what controller supports in generic layer 2019-07-05 06:35:41 +00:00
nvme_fabric.c nvme: switch to spdk_*malloc(). 2019-06-27 04:34:50 +00:00
nvme_internal.h nvme: assign qpair when req is allocated 2019-06-04 00:01:35 +00:00
nvme_ns_cmd.c nvme: explicitly mark _nvme_ns_cmd_rw as inline 2019-06-03 03:11:08 +00:00
nvme_ns_ocssd_cmd.c vtophys: add length parameter to the vtophys function 2019-01-09 08:24:59 +00:00
nvme_ns.c nvme: make identify NS id descriptors can be executed asynchronously 2018-10-15 17:57:56 +00:00
nvme_opal_internal.h opal: add support for getting locking range info 2019-07-05 02:23:28 +00:00
nvme_opal.c opal: add support for getting locking range info 2019-07-05 02:23:28 +00:00
nvme_pcie.c nvme: fix the endless loop of aborting trackers 2019-06-21 08:34:41 +00:00
nvme_qpair.c nvme: switch to spdk_*malloc(). 2019-06-27 04:34:50 +00:00
nvme_quirks.c nvme: add SHST_COMPLETE quirk for VMWare emulated SSDs 2019-02-27 01:46:32 +00:00
nvme_rdma.c nvme: Set appropriate value to max_xfer_size and max_sge 2019-07-05 06:35:41 +00:00
nvme_tcp.c nvme: Set appropriate value to max_xfer_size and max_sge 2019-07-05 06:35:41 +00:00
nvme_transport.c nvme: add qpair is_connecting flag 2019-05-14 08:48:11 +00:00
nvme_uevent.c nvme: add vfio driver parse event 2019-05-29 02:36:41 +00:00
nvme_uevent.h nvme: Add support of hotplug for vfio-attached devices. 2017-12-06 17:04:49 -05:00
nvme.c lib/nvme: fix a warning of spdk_pci_addr->domain 2019-07-01 13:07:48 +00:00