+8
−5
Loading
The issue was found when size of spdk_bdev_ext_io_opts in nvmf_bdev_ctrlr_read_cmd was set to a correct value. As result, dif_check_flags_exclude_mask fit into the size and was actually used by bdev layer. If initiator doesn't specify any DIF related fields then dif_check_flags_exclude_mask is set to SPDK_NVME_IO_FLAGS_PRCHK_MASK and bdev layer disables all DIF operations. However, transport layer still attempts to verify DIF on read and get the following errors (fio_dif_1_default test): [2025-09-29 10:18:07.256795] dif.c: 922:_dif_verify: *ERROR*: Failed to compare Guard: LBA=0, Expected=0, Actual=e4c3 [2025-09-29 10:18:07.256803] tcp.c:2953:_nvmf_tcp_send_c2h_data: *ERROR*: DIF error detected. type=4, offset=0 [2025-09-29 10:18:07.256826] dif.c: 922:_dif_verify: *ERROR*: Failed to compare Guard: LBA=0, Expected=0, Actual=a366 [2025-09-29 10:18:07.256832] tcp.c:2953:_nvmf_tcp_send_c2h_data: *ERROR*: DIF error detected. type=4, offset=0 [2025-09-29 10:18:07.256853] dif.c: 922:_dif_verify: *ERROR*: Failed to compare Guard: LBA=0, Expected=0, Actual=9503 [2025-09-29 10:18:07.256859] tcp.c:2953:_nvmf_tcp_send_c2h_data: *ERROR*: DIF error detected. type=4, offset=0 [2025-09-29 10:18:07.256914] bdev_nvme.c:7994:bdev_nvme_readv_done: *ERROR*: readv completed with PI error (sct=2, sc=130) [2025-09-29 10:18:07.257014] bdev_nvme.c:7994:bdev_nvme_readv_done: *ERROR*: readv completed with PI error (sct=2, sc=130) [2025-09-29 10:18:07.257032] bdev_nvme.c:7994:bdev_nvme_readv_done: *ERROR*: readv completed with PI error (sct=2, sc=130) The fix is to set dif_check_flags_exclude_mask if dif_insert_or_strip in transport is disabled Change-Id: Ib65f6645d0a46edafa083db9cf6906c585b1e831 Signed-off-by:Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26794 Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Community-CI: Mellanox Build Bot