nop: add even more SN debugging
Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
12
lib/nop.c
12
lib/nop.c
@@ -77,8 +77,8 @@ iscsi_nop_out_async(struct iscsi_context *iscsi, iscsi_command_cb cb,
|
|||||||
|
|
||||||
iscsi->nops_in_flight++;
|
iscsi->nops_in_flight++;
|
||||||
ISCSI_LOG(iscsi, (iscsi->nops_in_flight > 1) ? 1 : 6,
|
ISCSI_LOG(iscsi, (iscsi->nops_in_flight > 1) ? 1 : 6,
|
||||||
"NOP Out Send (nops_in_flight: %d, pdu->cmdsn %08x, pdu->itt %08x, maxcmdsn %08x, expcmdsn %08x)",
|
"NOP Out Send (nops_in_flight: %d, pdu->cmdsn %08x, pdu->itt %08x, pdu->ttt %08x, iscsi->maxcmdsn %08x, iscsi->expcmdsn %08x)",
|
||||||
iscsi->nops_in_flight, pdu->cmdsn, pdu->itt, iscsi->maxcmdsn, iscsi->expcmdsn);
|
iscsi->nops_in_flight, pdu->cmdsn, pdu->itt, 0xffffffff, iscsi->maxcmdsn, iscsi->expcmdsn);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -120,6 +120,10 @@ iscsi_send_target_nop_out(struct iscsi_context *iscsi, uint32_t ttt)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ISCSI_LOG(iscsi, (iscsi->nops_in_flight > 1) ? 1 : 6,
|
||||||
|
"NOP Out Send (nops_in_flight: %d, pdu->cmdsn %08x, pdu->itt %08x, pdu->ttt %08x, iscsi->maxcmdsn %08x, iscsi->expcmdsn %08x)",
|
||||||
|
iscsi->nops_in_flight, pdu->cmdsn, 0xffffffff, ttt, iscsi->maxcmdsn, iscsi->expcmdsn);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,8 +136,8 @@ iscsi_process_nop_out_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
|
|||||||
iscsi_adjust_maxexpcmdsn(iscsi, in);
|
iscsi_adjust_maxexpcmdsn(iscsi, in);
|
||||||
|
|
||||||
ISCSI_LOG(iscsi, (iscsi->nops_in_flight > 1) ? 1 : 6,
|
ISCSI_LOG(iscsi, (iscsi->nops_in_flight > 1) ? 1 : 6,
|
||||||
"NOP Out Reply received (pdu->itt %08x, maxcmdsn %08x, expcmdsn %08x)",
|
"NOP-In received (pdu->itt %08x, pdu->ttt %08x, iscsi->maxcmdsn %08x, iscsi->expcmdsn %08x, iscsi->statsn %08x)",
|
||||||
pdu->itt, iscsi->maxcmdsn, iscsi->expcmdsn);
|
pdu->itt, 0xffffffff, iscsi->maxcmdsn, iscsi->expcmdsn, iscsi->statsn);
|
||||||
|
|
||||||
iscsi->nops_in_flight = 0;
|
iscsi->nops_in_flight = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -319,13 +319,16 @@ static const char *iscsi_reject_reason_str(enum iscsi_reject_reason reason)
|
|||||||
int iscsi_process_target_nop_in(struct iscsi_context *iscsi,
|
int iscsi_process_target_nop_in(struct iscsi_context *iscsi,
|
||||||
struct iscsi_in_pdu *in)
|
struct iscsi_in_pdu *in)
|
||||||
{
|
{
|
||||||
uint32_t ttt;
|
uint32_t ttt = scsi_get_uint32(&in->hdr[20]);
|
||||||
|
uint32_t itt = scsi_get_uint32(&in->hdr[16]);
|
||||||
ttt = scsi_get_uint32(&in->hdr[20]);
|
|
||||||
|
|
||||||
iscsi_adjust_statsn(iscsi, in);
|
iscsi_adjust_statsn(iscsi, in);
|
||||||
iscsi_adjust_maxexpcmdsn(iscsi, in);
|
iscsi_adjust_maxexpcmdsn(iscsi, in);
|
||||||
|
|
||||||
|
ISCSI_LOG(iscsi, (iscsi->nops_in_flight > 1) ? 1 : 6,
|
||||||
|
"NOP-In received (pdu->itt %08x, pdu->ttt %08x, iscsi->maxcmdsn %08x, iscsi->expcmdsn %08x, iscsi->statsn %08x)",
|
||||||
|
itt, ttt, iscsi->maxcmdsn, iscsi->expcmdsn, iscsi->statsn);
|
||||||
|
|
||||||
/* if the server does not want a response */
|
/* if the server does not want a response */
|
||||||
if (ttt == 0xffffffff) {
|
if (ttt == 0xffffffff) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user