From: Mike Christie <michaelc@xxxxxxxxxxx> The nop tx/rx counters were not getting updated. Signed-off-by: Mike Christie <michaelc@xxxxxxxxxxx> --- drivers/scsi/libiscsi.c | 7 ++++++- include/scsi/libiscsi.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 5b4adc4..d134b40 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -978,6 +978,7 @@ static int iscsi_send_nopout(struct iscsi_conn *conn, struct iscsi_nopin *rhdr) conn->ping_task = task; conn->last_ping = jiffies; } + conn->noptx_pdus++; return 0; } @@ -1146,6 +1147,8 @@ int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr, switch(opcode) { case ISCSI_OP_NOOP_IN: + conn->noprx_pdus++; + if (datalen) { rc = ISCSI_ERR_PROTO; break; @@ -1184,11 +1187,13 @@ int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr, * LLD handles R2Ts if they need to. */ return 0; + case ISCSI_OP_NOOP_IN: + conn->noprx_pdus++; + /* fall through */ case ISCSI_OP_LOGOUT_RSP: case ISCSI_OP_LOGIN_RSP: case ISCSI_OP_TEXT_RSP: case ISCSI_OP_SCSI_TMFUNC_RSP: - case ISCSI_OP_NOOP_IN: task = iscsi_itt_to_task(conn, hdr->itt); if (!task) return ISCSI_ERR_BAD_ITT; diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 6e33386..b9ffcc5 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h @@ -221,6 +221,8 @@ struct iscsi_conn { uint32_t scsirsp_pdus_cnt; uint32_t datain_pdus_cnt; uint32_t r2t_pdus_cnt; + uint32_t noptx_pdus; + uint32_t noprx_pdus; uint32_t tmfcmd_pdus_cnt; int32_t tmfrsp_pdus_cnt; -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html