Extract the code for DIF from nvmf_rdma_fill_wr_sgl() into nvmf_rdma_fill_wr_sgl_with_dif(). Then clean up nvmf_rdma_request_fill_iovs() and nvmf_rdma_request_fill_iovs_multi_sgl(). Additionally, this patch has a bug fix. nvmf_rdma_fill_wr_sgl_with_dif() returned false if spdk_rdma_get_translation() failed. However, the type of return value of nvmf_rdma_fill_wr_sgl_with_dif() is not bool but int. The boolean false is 0 in integer. Hence in this case, nvmf_rdma_fill_wr_sgl_with_dif() returned 0 even if it failed. Change nvmf_rdma_fill_wr_sgl_with_dif() to return rc as is if spdk_rdma_get_translation() returns non-zero rc. Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I71cc186458bfe8863964ab68e2d014c495312cd3 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11965 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: fengchunsong <fengchunsong@huawei.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> |
||
---|---|---|
.. | ||
ctrlr_bdev.c | ||
ctrlr_discovery.c | ||
ctrlr.c | ||
fc_ls.c | ||
fc.c | ||
Makefile | ||
nvmf_fc.h | ||
nvmf_internal.h | ||
nvmf_rpc.c | ||
nvmf.c | ||
rdma.c | ||
spdk_nvmf.map | ||
subsystem.c | ||
tcp.c | ||
transport.c | ||
transport.h | ||
vfio_user.c |