Spdk/lib/nvme
Jim Harris 5354d0c63f nvme: reset mapping_length correctly for contig SGL
spdk_vtophys() takes a mapping_length parameter, so
it can return the length for which the returned
virtual address is valid.

But spdk_vtophys() will only return the max
between the valid length and the input mapping_length
parameter.

So the nvme SGL building code for contiguous buffers
was broken, since it would only set the mapping_length
once, before the loop started.  Worst case, if a buffer
started just before (maybe 256 bytes) before a huge page
boundary, each time through the loop we would create
a new SGL for only 256 bytes at a time, very quickly
running out of SGL entries for a large buffer.

Fixes #1852.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7659
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-29 07:09:43 +00:00
..
Makefile lib: add a hotplug lib for device 2021-04-12 09:48:21 +00:00
nvme_ctrlr_cmd.c lib/nvme: add two async API for Directive Send and Directive Receive. 2021-01-20 16:27:34 +00:00
nvme_ctrlr_ocssd_cmd.c nvme: Move nsdata to namespace structure 2021-03-02 08:06:15 +00:00
nvme_ctrlr.c lib/nvme: Expose APIs to Access PMR 2021-04-22 20:10:21 +00:00
nvme_cuse.c lib/env_dpdk: Change the location of lock files from /tmp to /var/tmp 2020-11-17 08:25:31 +00:00
nvme_cuse.h lib/nvme: add RPC for interacting with CUSE devices 2019-10-24 23:43:59 +00:00
nvme_fabric.c nvme/fabric: Make connect related logs more verbose 2021-02-17 10:18:05 +00:00
nvme_internal.h nvme/pcie: Add support for Persistent Memory Region (PMR) 2021-04-22 20:10:21 +00:00
nvme_io_msg.c nvme: only process io_msg in primary process 2021-04-22 01:06:02 +00:00
nvme_io_msg.h lib/nvme: update io msg producers on ns manage 2020-06-05 09:01:44 +00:00
nvme_ns_cmd.c nvme: Handle errors returned by submit function 2021-04-05 22:58:57 +00:00
nvme_ns_ocssd_cmd.c nvme: save separate metadata size to nvme request 2020-04-02 07:02:38 +00:00
nvme_ns.c nvme/quirk: add MDTS excludes interleaved metadata quirk 2021-03-29 07:38:37 +00:00
nvme_opal_internal.h nvme/opal: deprecate spdk_opal_supported() 2020-05-20 14:16:44 +00:00
nvme_opal.c lib/opal: remove deprecated spdk_opal_supported() 2021-03-18 14:43:08 +00:00
nvme_pcie_common.c nvme/pcie: Add statistics per poll group 2021-04-13 21:30:52 +00:00
nvme_pcie_internal.h nvme/pcie: Add support for Persistent Memory Region (PMR) 2021-04-22 20:10:21 +00:00
nvme_pcie.c nvme: reset mapping_length correctly for contig SGL 2021-04-29 07:09:43 +00:00
nvme_poll_group.c nvme: Add functions to get/free poll group statistics 2021-04-13 21:30:52 +00:00
nvme_qpair.c nvme: add spdk_nvme_qpair_get_id 2021-02-17 10:17:43 +00:00
nvme_quirks.c nvme: remove IDENTIFY_CNS quirk from normal QEMU SSDs 2021-04-29 07:09:43 +00:00
nvme_rdma.c nvme: Add transport intrafce to get/free stats 2021-04-13 21:30:52 +00:00
nvme_tcp.c nvme/tcp: Only flush socket if not part of poll group 2021-04-19 12:54:24 +00:00
nvme_transport.c nvme/pcie: Add support for Persistent Memory Region (PMR) 2021-04-22 20:10:21 +00:00
nvme_vfio_user.c vfio-user: optimize notice log to debug log 2021-04-15 11:23:47 +00:00
nvme_zns.c nvme: Move nsdata_zns to namespace structure 2021-03-02 08:06:15 +00:00
nvme.c lib: add a hotplug lib for device 2021-04-12 09:48:21 +00:00
spdk_nvme.map lib/nvme: Expose APIs to Access PMR 2021-04-22 20:10:21 +00:00