numam-spdk/include/spdk_internal
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
..
assert.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
copy_engine.h scripts/check_format: check for spaces before tabs 2018-03-05 11:09:13 -05:00
event.h event: spdk_subsystem_config_json is no longer asynchronous 2019-03-19 15:54:34 +00:00
log.h iscsi: Dump PDU contents to know what PDU was sent in illegal state 2019-06-07 05:11:00 +00:00
lvolstore.h lvol: add option to change default data erase method 2019-01-23 22:25:37 +00:00
memory.h env: move VALUE_2MB defines into a new internal header 2019-01-13 00:47:26 +00:00
mock.h mock: remove trailing semicolon from MOCK_ definitions 2019-03-22 05:03:42 +00:00
nvme_tcp.h nvme/tcp: Rename _iov_ctx to _nvme_tcp_sgl to match DIF library 2019-05-24 23:19:24 +00:00
sock.h sock: Add spdk_sock_readv(sock, iov, iovcnt) 2019-03-08 01:21:26 +00:00
thread.h thread: Use TLS to accelerate thread look up 2018-12-14 18:54:03 +00:00
utf.h utf.h: remove #include "spdk/json.h" 2018-01-31 14:37:16 -05:00
vhost_user.h virtio: export spec-defined structures into a separate header 2019-03-13 14:26:20 +00:00
virtio.h virtio: allow config read/write to fail 2018-07-05 20:47:38 +00:00