Spdk/lib
Shuhei Matsumoto 6d156d5b7d iscsi: Dump PDU contents to know what PDU was sent in illegal state
In some test cases, unknown iSCSI PDU other than the login request
has been sent to the iSCSI target when the iSCSI target is not in
runnable state, and it has caused failure in iSCSI target.

To know what PDU was received by the iSCSI target, this patch changes
the iSCSI taget to collect dump of the PDU.

SPDK has already the SPDK_LOGDUMP macro but the SPDK_ERRLOGDUMP macro
will be appropriate in this use case and added. Then the SPDK_ERRLOGDUMP
is used in iSCSI library.

We can decode PDU and output any format easy to read by human, but
creating good format is not easy task and error prone. So this patch
uses simple dump.

Dump outputs like:

PDU
00000000  40 80 00 00 00 00 00 00  00 00 00 00 00 00 00 00  @...............
00000010  0b 06 00 10 ff ff ff ff  00 00 00 5a 00 00 00 03  ...........Z....
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3ed2fca7fec24ccff17b89ba749a58c397b72c13
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456952
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>
2019-06-07 05:11:00 +00:00
..
bdev bdev/raid: add additional NULL check for data iovec 2019-06-07 05:05:22 +00:00
blob blobstore: Remove blob on blobstore load when required 2019-05-24 23:09:56 +00:00
blobfs blobfs: fix the semphore usage issue in spdk_file_read 2019-05-30 17:56:16 +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 env: added spdk_mempool_obj_iter 2019-06-07 04:39:14 +00:00
event env: Add free_space parameter to spdk_ring_enqueue 2019-06-05 05:23:58 +00:00
ftl lib/ftl: Remove ftl_md struct from band 2019-06-07 04:39:14 +00:00
ioat ioat: allocate device struct using regular calloc 2019-04-09 06:30:42 +00:00
iscsi iscsi: Dump PDU contents to know what PDU was sent in illegal state 2019-06-07 05:11:00 +00:00
json json_util: fix typo in debug message. 2019-05-31 14:39:53 +00:00
jsonrpc jsonrpc: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
log log/fdump: fix alignment of the last printed line 2019-05-10 10:27:29 +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 deal with supporting single r2t 2019-06-06 00:58:58 +00:00
nvmf nvmf/tcp: Support single r2t usage 2019-06-05 16:46:55 +00:00
reduce lib/reduce: add new API to retrieve volume parameters 2019-05-13 15:41:35 +00:00
rocksdb rocksdb: cleanup SpdkInitializeThread/SpdkFinalizeThread 2019-05-02 09:00:43 +00:00
rpc rpc: rename RPC get_rpc_methods to rpc_get_methods 2019-05-27 12:52:53 +00:00
scsi scsi: add a helper function to check the LUN holds a reservation or not 2019-06-03 23:59:49 +00:00
sock sock: fix a uninitialized-variable error 2019-05-08 21:24:13 +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: Compute CRC-32C for extended LBA payload 2019-06-06 02:08:15 +00:00
vhost vhost_blk: set the maximum supported data segment based on bdev 2019-06-07 05:05:22 +00:00
virtio virtio: zero-out virtqueue structures at init 2019-04-22 16:49:39 +00:00
vmd lib/vmd: Moved MAX_VMD_TARGET definition to public header 2019-06-05 15:19:51 +00:00
Makefile vmd: Initial SPDK VMD baseline code 2019-05-30 17:32:43 +00:00