a7a32ea052
When DIF is inserted or stripped, nvme_tcp_pdu_set_data_buf must shift the range of the buffer from LBA based to extended LBA based because the extended LBA based range must be passed to create a special temporary iovec array to leave a space of metadata for each block then. This patch do the following: - Add a pointer to the current DIF context to struct nvme_tcp_pdu. This pointer is set when DIF is inserted or stripped to the current NVMf request. - When the pointer to the current DIF context in the PDU is set, get the extended LBA based offset and length by calling spdk_dif_get_range_with_md() and use them in nvme_tcp_pdu_set_data_buf(). - Original data length is set in the PDU and original data offset is set in the current DIF context in nvme_tcp_pdu_set_data_buf(). - Add UT code. Change-Id: Ic1f4fd326b5b3e3d4c74677592bda34d6949a11e Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458920 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> |
||
---|---|---|
.. | ||
include | ||
lib | ||
Makefile | ||
unittest.sh |