Spdk/test/unit/lib/nvme
Niklas Cassel 4249dc1010 nvme: account for PRACT when calculating max sectors per transfer
There is a special case when using 8-byte metadata + PI + PRACT
where no metadata is transferred to/from controller.

Since _nvme_ns_cmd_rw() already calculates the proper sector size
using _nvme_get_host_buffer_sector_size(), which takes PRACT into
account, change the sectors_per_max_io calculation to also take
PRACT into account.

This will avoid certain requests that don't need splitting getting
split.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I8d450d37c2458453701189f0e0eca4b8fe71173b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6247
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-10 08:44:54 +00:00
..
nvme_ctrlr_cmd.c test/nvme_ctrlr_cmd: initialize mutex 2021-02-04 08:38:12 +00:00
nvme_ctrlr_ocssd_cmd.c test/nvme_ctrlr_ocssd_cmd: initialize mutex 2021-02-04 08:38:27 +00:00
nvme_ctrlr.c lib/nvme: Remove qpair from all lists before freeing it. 2021-02-08 16:13:59 +00:00
nvme_ns_cmd.c nvme: account for PRACT when calculating max sectors per transfer 2021-02-10 08:44:54 +00:00
nvme_ns_ocssd_cmd.c test/unit/lib/nvme: Add unit test stubs 2020-11-19 09:49:41 +00:00
nvme_ns.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
nvme_pcie.c nvme: add set_nvme_pcie_set_hotplug_filter 2021-02-09 11:27:19 +00:00
nvme_poll_group.c nvme: Add the interface to get the optimal polling group 2021-02-04 08:30:54 +00:00
nvme_qpair.c nvme: Don't log an error when we can't resubmit all requests 2020-10-26 11:48:46 +00:00
nvme_quirks.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
nvme_rdma.c unittest/nvmf_rdma: increase code coverage for nvme_rdma_alloc_rsps 2021-02-09 11:27:55 +00:00
nvme_tcp.c test/nvme_tcp: nvme tcp UT cases 2021-02-10 08:32:30 +00:00
nvme_uevent.c nvme: read all uevents 2020-08-24 07:38:33 +00:00
nvme.c unittest/nvme: initialize mutex for portability 2021-02-04 08:38:44 +00:00
Makefile test/unit: add poll_group unit tests. 2020-04-07 08:38:40 +00:00