numam-spdk/lib/iscsi
Daniel Verkamp 1e33a802b4 iscsi: fix layout of logout request reason field
The Logout Request reason field is the low 7 bits of byte byte 1; the
last bit of byte 1 is specified to be always 1, and we shouldn't
consider it to be part of the reason field.

The existing debug print code was parsing the reason field correctly (by
masking it against 0x7f), but it's simpler to just make the reason field
into a bitfield of the proper size; this fixes the real bug in the
reqh->reason != 0 check, which did not use the 0x7f mask.

Fixes GitHub issue #198.

Change-Id: I4813da2236c70dc1761e303b34d321750ee36626
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378658
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-22 16:11:11 -04:00
..
acceptor.c lib: replace strerror with strerror_r 2017-08-15 16:47:01 -04:00
acceptor.h iscsi: Add an iscsi library. 2016-08-03 14:43:40 -07:00
conn.c log: remove uses of SPDK_TRACE_DEBUG 2017-08-29 15:07:13 -04:00
conn.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
init_grp.c log: remove uses of SPDK_TRACE_DEBUG 2017-08-29 15:07:13 -04:00
init_grp.h iscsi: Add an iscsi library. 2016-08-03 14:43:40 -07:00
iscsi_rpc.c iscsi: free strings in construct_target_node RPC 2017-08-09 13:24:40 -04:00
iscsi_subsystem.c log: remove uses of SPDK_TRACE_DEBUG 2017-08-29 15:07:13 -04:00
iscsi.c iscsi: fix layout of logout request reason field 2017-09-22 16:11:11 -04:00
iscsi.h iscsi: fix AHS handling 2017-07-14 11:14:21 -04:00
Makefile util: add CRC32 utility functions 2017-08-02 19:47:35 -04:00
md5.c include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
md5.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
param.c log: remove uses of SPDK_TRACE_DEBUG 2017-08-29 15:07:13 -04: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 log: remove uses of SPDK_TRACE_DEBUG 2017-08-29 15:07:13 -04:00
portal_grp.h iscsi: fixed crash on invalid add_portal_group call 2017-03-27 15:19:38 -07:00
task.c scsi: Remove cb_event. It is no longer necessary. 2017-06-22 10:47:31 -04:00
task.h iscsi: change iscsi_bhs_scsi_req variable names. 2017-07-18 13:14:16 -04:00
tgt_node.c log: remove uses of SPDK_TRACE_DEBUG 2017-08-29 15:07:13 -04:00
tgt_node.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00