summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpbonzini <pbonzini@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>2014-06-09 13:14:36 +0000
committerpbonzini <pbonzini@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>2014-06-09 13:14:36 +0000
commitcd774921624c5fa3073de8fb2e4710d35869a51e (patch)
tree687c5bd59f05885fc86d7d41ecb6a936585e05ac
parenta445ec1a4367808a636f23b39e060e72c21303b1 (diff)
virtio-scsi: fixes to protection information
pi_bytesin is in the device-readable section. Document lack of residual field. Use le32 instead of u32. This matches the new patch series that Nicholas sent for vhost-scsi. Cc: <nab@daterainc.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@378 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
-rw-r--r--content.tex20
1 files changed, 12 insertions, 8 deletions
diff --git a/content.tex b/content.tex
index 7c46e75..85f1315 100644
--- a/content.tex
+++ b/content.tex
@@ -4562,7 +4562,8 @@ struct virtio_scsi_req_cmd {
u8 cdb[cdb_size];
// The next two fields are only present if VIRTIO_SCSI_F_T10_PI
// is negotiated.
- u32 pi_bytesout;
+ le32 pi_bytesout;
+ le32 pi_bytesin;
u8 pi_out[pi_bytesout];
u8 dataout[];
@@ -4575,7 +4576,6 @@ struct virtio_scsi_req_cmd {
u8 sense[sense_size];
// The next two fields are only present if VIRTIO_SCSI_F_T10_PI
// is negotiated
- u32 pi_bytesin;
u8 pi_in[pi_bytesin];
u8 datain[];
};
@@ -4630,8 +4630,9 @@ always device-readable.
\field{pi_bytesout} determines the size of the \field{pi_out} field
in bytes. If it is nonzero, the \field{pi_out} field contains outgoing
-protection information for write operations. Both fields are only
-present if VIRTIO_SCSI_F_T10_PI has been negotiated.
+protection information for write operations. \field{pi_bytesin} determines
+the size of the \field{pi_in} field in the device-writable section, in bytes.
+All three fields are only present if VIRTIO_SCSI_F_T10_PI has been negotiated.
The remainder of the device-readable part is the data output buffer,
\field{dataout}.
@@ -4650,10 +4651,13 @@ exceeds the size of \field{datain} means that \field{dataout} was
processed partially and \field{datain} was not processed at
all.
-\field{pi_bytesin} determines the size of the \field{pi_in} field
-in bytes. If it is nonzero, the \field{pi_in} field contains incoming
-protection information for read operations. Both fields are only present
-if VIRTIO_SCSI_F_T10_PI has been negotiated.
+If the \field{pi_bytesin} is nonzero, the \field{pi_in} field contains
+incoming protection information for read operations. \field{pi_in} is
+only present if VIRTIO_SCSI_F_T10_PI has been negotiated\footnote{There
+ is no separate residual size for \field{pi_bytesout} and
+ \field{pi_bytesin}. It can be computed from the \field{residual} field,
+ the size of the data integrity information per sector, and the sizes
+ of \field{pi_out}, \field{pi_in}, \field{dataout} and \field{datain}.}.
The remainder of the device-writable part is the data input buffer,
\field{datain}.