diff --git a/lib/iscsi/conn.c b/lib/iscsi/conn.c index 567b0597ea..8533064905 100644 --- a/lib/iscsi/conn.c +++ b/lib/iscsi/conn.c @@ -814,7 +814,7 @@ spdk_iscsi_conn_read_data(struct spdk_iscsi_conn *conn, int bytes, ret = spdk_sock_recv(conn->sock, buf, bytes); if (ret > 0) { - spdk_trace_record(TRACE_READ_FROM_SOCKET_DONE, conn->id, ret, 0, 0); + spdk_trace_record(TRACE_ISCSI_READ_FROM_SOCKET_DONE, conn->id, ret, 0, 0); return ret; } @@ -1078,7 +1078,7 @@ spdk_iscsi_conn_flush_pdus_internal(struct spdk_iscsi_conn *conn) } } - spdk_trace_record(TRACE_FLUSH_WRITEBUF_START, conn->id, total_length, 0, iovec_cnt); + spdk_trace_record(TRACE_ISCSI_FLUSH_WRITEBUF_START, conn->id, total_length, 0, iovec_cnt); bytes = spdk_sock_writev(conn->sock, iov, iovec_cnt); if (bytes == -1) { @@ -1091,7 +1091,7 @@ spdk_iscsi_conn_flush_pdus_internal(struct spdk_iscsi_conn *conn) } } - spdk_trace_record(TRACE_FLUSH_WRITEBUF_DONE, conn->id, bytes, 0, 0); + spdk_trace_record(TRACE_ISCSI_FLUSH_WRITEBUF_DONE, conn->id, bytes, 0, 0); pdu = TAILQ_FIRST(&conn->write_pdu_list); @@ -1380,13 +1380,14 @@ SPDK_TRACE_REGISTER_FN(iscsi_conn_trace) { spdk_trace_register_owner(OWNER_ISCSI_CONN, 'c'); spdk_trace_register_object(OBJECT_ISCSI_PDU, 'p'); - spdk_trace_register_description("READ_FROM_SOCKET_DONE", "", TRACE_READ_FROM_SOCKET_DONE, + spdk_trace_register_description("ISCSI_READ_FROM_SOCKET_DONE", "", + TRACE_ISCSI_READ_FROM_SOCKET_DONE, OWNER_ISCSI_CONN, OBJECT_NONE, 0, 0, ""); - spdk_trace_register_description("FLUSH_WRITEBUF_START", "", TRACE_FLUSH_WRITEBUF_START, + spdk_trace_register_description("ISCSI_FLUSH_WRITEBUF_START", "", TRACE_ISCSI_FLUSH_WRITEBUF_START, OWNER_ISCSI_CONN, OBJECT_NONE, 0, 0, "iovec: "); - spdk_trace_register_description("FLUSH_WRITEBUF_DONE", "", TRACE_FLUSH_WRITEBUF_DONE, + spdk_trace_register_description("ISCSI_FLUSH_WRITEBUF_DONE", "", TRACE_ISCSI_FLUSH_WRITEBUF_DONE, OWNER_ISCSI_CONN, OBJECT_NONE, 0, 0, ""); - spdk_trace_register_description("READ_PDU", "", TRACE_READ_PDU, + spdk_trace_register_description("ISCSI_READ_PDU", "", TRACE_ISCSI_READ_PDU, OWNER_ISCSI_CONN, OBJECT_ISCSI_PDU, 1, 0, "opc: "); spdk_trace_register_description("ISCSI_TASK_DONE", "", TRACE_ISCSI_TASK_DONE, OWNER_ISCSI_CONN, OBJECT_SCSI_TASK, 0, 0, ""); diff --git a/lib/iscsi/conn.h b/lib/iscsi/conn.h index bc917a7fc1..0a4bd3af5f 100644 --- a/lib/iscsi/conn.h +++ b/lib/iscsi/conn.h @@ -58,14 +58,14 @@ #define OBJECT_ISCSI_PDU 0x1 #define TRACE_GROUP_ISCSI 0x1 -#define TRACE_READ_FROM_SOCKET_DONE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x0) -#define TRACE_FLUSH_WRITEBUF_START SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x1) -#define TRACE_FLUSH_WRITEBUF_DONE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x2) -#define TRACE_READ_PDU SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x3) -#define TRACE_ISCSI_TASK_DONE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x4) -#define TRACE_ISCSI_TASK_QUEUE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x5) -#define TRACE_ISCSI_CONN_ACTIVE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x6) -#define TRACE_ISCSI_CONN_IDLE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x7) +#define TRACE_ISCSI_READ_FROM_SOCKET_DONE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x0) +#define TRACE_ISCSI_FLUSH_WRITEBUF_START SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x1) +#define TRACE_ISCSI_FLUSH_WRITEBUF_DONE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x2) +#define TRACE_ISCSI_READ_PDU SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x3) +#define TRACE_ISCSI_TASK_DONE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x4) +#define TRACE_ISCSI_TASK_QUEUE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x5) +#define TRACE_ISCSI_CONN_ACTIVE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x6) +#define TRACE_ISCSI_CONN_IDLE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x7) struct spdk_poller; diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 99fd851ccb..7d96c9cb26 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -492,7 +492,7 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu) /* All data for this PDU has now been read from the socket. */ conn->pdu_in_progress = NULL; - spdk_trace_record(TRACE_READ_PDU, conn->id, pdu->data_valid_bytes, + spdk_trace_record(TRACE_ISCSI_READ_PDU, conn->id, pdu->data_valid_bytes, (uintptr_t)pdu, pdu->bhs.opcode); /* Data Segment */