Spdk/lib/iscsi
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
..
conn.c lib/iscsi: fix iscsi connection schedule 2019-06-05 17:39:12 +00:00
conn.h iscsi: Deprecate MinConnectionsPerCore 2019-05-06 17:10:48 +00:00
init_grp.c iscsi: Remove the prefix spdk_ from names of private functions 2019-04-01 00:52:56 +00:00
init_grp.h iscsi: Use not C++ style comments // but C-style comments /* */ 2018-10-31 22:01:47 +00:00
iscsi_rpc.c lib/iscsi: Make iscsi_shutdown_tgt_node_by_name asynchronous 2019-04-22 16:00:42 +00:00
iscsi_subsystem.c iscsi: fix double free when failed to start target 2019-05-13 07:55:40 +00:00
iscsi.c iscsi: Dump PDU contents to know what PDU was sent in illegal state 2019-06-07 05:11:00 +00:00
iscsi.h iscsi: Remove SPDK_SUCCESS and use 0 instead 2019-06-06 02:08:15 +00:00
Makefile iscsi: Move acceptor into portal_grp 2019-05-16 23:23:45 +00:00
md5.c astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
md5.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
param.c iscsi: Remove the prefix spdk_ from names of private functions 2019-04-01 00:52:56 +00:00
param.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
portal_grp.c iscsi: Move acceptor into portal_grp 2019-05-16 23:23:45 +00:00
portal_grp.h iscsi: Move acceptor into portal_grp 2019-05-16 23:23:45 +00:00
task.c iscsi: Remove the prefix spdk_ from names of private functions 2019-04-01 00:52:56 +00:00
task.h iscsi: Propagate SCSI error status to split SCSI read/write commands 2018-12-11 16:37:55 +00:00
tgt_node.c lib/scsi: Make spdk_scsi_dev_destruct asynchronous 2019-04-22 18:22:59 +00:00
tgt_node.h lib/iscsi: Make iscsi_tgt_node_destruct asynchronous 2019-04-22 16:00:42 +00:00