numam-spdk/lib
Shuhei Matsumoto f62d5ccbe6 nvme/tcp: Properly handle multiple iovecs in nvme_tcp_pdu_set_data_buf
nvme_tcp_pdu_set_data_buf() has been used to process C2H and H2C for
NVMe/TCP initiator.

In this case, NVMe/TCP cuts out the part of the input data buffer
and transfers the part, and repeats these cut and transfers until
the whole data buffer is transferred. NVMe/TCP uses two SGLs, and
use one to parse from the offset datao to datao + datal and another
to append from the offset 0 to datal.

However, the current nvme_tcp_pdu_set_data_buf() had used
data_length as not data length of this transfer but total length
of the whole transfers by mistake.

Recently DIF library updated to properly handle very similar
cases, and so this patch takes DIF library as a reference and
corrects the implementation.

The next patch will add UT code to verify the bug will be fixed.
The code size is pretty large and so UT code is separated.

Change-Id: Ibeed4de182b8b8740566e874e2757280dc21f9e8
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455623
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2019-07-01 08:28:20 +00:00
..
bdev bdev: rewind child offset to last block size aligned iov 2019-07-01 04:20:21 +00:00
blob blobstore: Cleanup after power failure while creating snapshot 2019-06-26 08:00:14 +00:00
blobfs blobfs: make internal asynchronous APIs as public APIs 2019-06-28 09:50:50 +00:00
conf string: spdk_strtol to delegate additional error checking 2019-01-29 00:10:57 +00:00
copy misc/rpc: rename some C functions of rpc methods 2019-05-07 05:30:16 +00:00
env_dpdk lib/env_dpdk: Allow iterating over all detected PCI devices 2019-06-26 08:24:02 +00:00
event lib/event/subsystems: Added VMD dependency to bdev subsystem 2019-07-01 03:54:45 +00:00
ftl lib/ftl: Check if any additional relocation was added 2019-07-01 03:29:00 +00:00
ioat ioat: allocate device struct using regular calloc 2019-04-09 06:30:42 +00:00
iscsi iscsi: Use not malloc'ed but fixed size string for portal porta number 2019-07-01 05:03:07 +00:00
json json_util: fix typo in debug message. 2019-05-31 14:39:53 +00:00
jsonrpc lib/jsonrpc: Fix memory leaks about connection request. 2019-06-26 06:26:50 +00:00
log log: passing user-defined log 2019-06-18 03:56:50 +00:00
lvol lvol: Fix for lvol failed deletion flow 2019-04-02 19:23:22 +00:00
nbd nbd: optional nbd_device in start_nbd_disk 2019-04-04 08:35:50 +00:00
net net: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
notify lib/notify: rename spdk_notify_get_events to spdk_notify_foreach_event 2019-05-07 06:11:27 +00:00
nvme nvme/tcp: Properly handle multiple iovecs in nvme_tcp_pdu_set_data_buf 2019-07-01 08:28:20 +00:00
nvmf nvmf/tcp: Add a maximal PDU loop number 2019-06-28 12:28:54 +00:00
reduce reduce: check pmem buf before unmap 2019-06-25 13:39:09 +00:00
rocksdb lib/rocksdb: Optional VMD enumeration 2019-07-01 03:53:06 +00:00
rpc rpc: rename RPC get_rpc_methods to rpc_get_methods 2019-05-27 12:52:53 +00:00
scsi scsi: Add data offset to DIF context separately from start block address 2019-06-11 18:53:58 +00:00
sock net/vpp: switch to session.api 2019-06-27 08:23:08 +00:00
thread env: Add free_space parameter to spdk_ring_enqueue 2019-06-05 05:23:58 +00:00
trace trace: print error message if event name is too long 2019-05-02 08:41:56 +00:00
ut_mock thread: Eliminate use of pthread_self and thread_ids 2019-01-15 16:53:12 +00:00
util dif: Factor out converting size from LBA based to extended LBA based 2019-06-28 04:13:02 +00:00
vhost lib/vhost: Fix unaligned pointer value error 2019-06-17 07:18:48 +00:00
virtio lib/virtio: change the definition of cookie 2019-06-26 08:03:37 +00:00
vmd lib/vmd: Hooking devices behind VMD endpoint to PCI subsystem 2019-06-11 04:35:31 +00:00
Makefile vmd: Initial SPDK VMD baseline code 2019-05-30 17:32:43 +00:00