Spdk/test/unit
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
..
include test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
lib nvme: account for PRACT when calculating max sectors per transfer 2021-02-10 08:44:54 +00:00
Makefile test: add histogram unit tests 2017-12-29 14:20:48 -05:00
unittest.sh ut/bdev_ocssd: Move bdev_ocssd_ut from bdev directory to bdev/nvme directory 2021-02-09 11:29:53 +00:00