iscsi: fix ISCSI_READ_PDU spdk_trace_record

This was accidentally moved to the wrong place as
part of some earlier iSCSI refactoring.  This trace
record should be executed when we have finished
reading all of the data for any PDU, not just those
with immediate data.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib1d17e5e79ff220e9e9b3dd55e247e745bd58019
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7756
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
Jim Harris 2021-05-05 21:22:55 +00:00 committed by Tomasz Zawadzki
parent 3faf457f56
commit 7e52eb740a

View File

@ -4703,10 +4703,6 @@ iscsi_pdu_payload_read(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
}
}
/* All data for this PDU has now been read from the socket. */
spdk_trace_record(TRACE_ISCSI_READ_PDU, conn->id, pdu->data_valid_bytes,
(uintptr_t)pdu, pdu->bhs.opcode);
/* check data digest */
if (conn->data_digest) {
_iscsi_pdu_calc_data_digest(pdu);
@ -4843,6 +4839,10 @@ iscsi_read_pdu(struct spdk_iscsi_conn *conn)
}
}
/* All data for this PDU has now been read from the socket. */
spdk_trace_record(TRACE_ISCSI_READ_PDU, conn->id, pdu->data_valid_bytes,
(uintptr_t)pdu, pdu->bhs.opcode);
if (!pdu->is_rejected) {
rc = iscsi_pdu_payload_handle(conn, pdu);
} else {