Browse Source

Added some minimal debugging for transmitted PDUs.

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
0743dc5b0d
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      src/net/tcp/iscsi.c

+ 7
- 0
src/net/tcp/iscsi.c View File

@@ -75,6 +75,11 @@ static void iscsi_start_command ( struct iscsi_session *iscsi ) {
75 75
 	command->cmdsn = htonl ( iscsi->cmdsn );
76 76
 	command->expstatsn = htonl ( iscsi->statsn + 1 );
77 77
 	memcpy ( &command->cdb, &iscsi->command->cdb, sizeof ( command->cdb ));
78
+	DBG ( "iSCSI %p start " SCSI_CDB_FORMAT " %s %#x\n",
79
+	      iscsi, SCSI_CDB_DATA ( command->cdb ),
80
+	      ( iscsi->command->data_in ? "in" : "out" ),
81
+	      ( iscsi->command->data_in ?
82
+		iscsi->command->data_in_len : iscsi->command->data_out_len ) );
78 83
 }
79 84
 
80 85
 /**
@@ -200,6 +205,8 @@ static void iscsi_start_data_out ( struct iscsi_session *iscsi,
200 205
 	data_out->expstatsn = htonl ( iscsi->statsn + 1 );
201 206
 	data_out->datasn = htonl ( datasn );
202 207
 	data_out->offset = htonl ( iscsi->transfer_offset + offset );
208
+	DBG ( "iSCSI %p start data out DataSN %#x len %#lx\n",
209
+	      iscsi, datasn, len );
203 210
 }
204 211
 
205 212
 /**

Loading…
Cancel
Save