If DIF mode is local and C2H data is extended LBA payload, DIF should be verified just before sending the payload. Add a helper function nvmf_tcp_pdu_verify_dif and call it in spdk_nvmf_tcp_send_c2h_data after completing nvme_tcp_pdu_set_data_buf. When nvmf_tcp_pdu_verify_dif returns error, treat the error as fatal transport error because the error is caused by the target itself. Handle the fatal NVMe/TCP transport error by terminating the connection as described in the NVMe specification. On the other hand, data digest error is treated as a non-fatal transport error because the error is caused outside the target. This is reasonable. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I9680af2556c08f5888aeaf0a772097e4744182be Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458921 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> |
||
---|---|---|
.. | ||
ctrlr_bdev.c | ||
ctrlr_discovery.c | ||
ctrlr.c | ||
Makefile | ||
nvmf_fc.h | ||
nvmf_internal.h | ||
nvmf.c | ||
rdma.c | ||
subsystem.c | ||
tcp.c | ||
transport.c | ||
transport.h |