On Tue, Feb 28, 2012 at 11:05 AM, Stefan Hajnoczi <stefa...@gmail.com> wrote:
Sorry for the delay, I didn't realize you had replied. I am not subscribed to this mailing list, please Reply-All and keep me CCed. >> The QEMU system emulator now supports the virtio-scsi SCSI transport >> for efficient virtualized SCSI I/O. I would like to support >> virtio-scsi debugging and analysis with pcap. >> >> The pcap data will include the virtio buffers containing SCSI command >> metadata, CDB, and data-out buffer. A similar structure is also used >> for SCSI responses with the data-in buffer and a footer. >> >> You can find detailed information on virtio-scsi in Appendix H of the >> virtio specification: >> http://ozlabs.org/~rusty/virtio-spec/virtio-0.9.4.pdf > > OK, so what does a single packet look like? Does each packet correspond to a > single SCSI command or response? There are SCSI commands and responses. Commands and responses are separate pcap packets because there can be multiple outstanding commands to multiple targets/LUNs. From the spec, commands have the following layout: u8 lun[8]; u64 id; u8 task_attr; u8 prio; u8 crn; char cdb[cdb_size]; char dataout[]; Responses have the following layout: u32 sense_len; u32 residual; u16 status_qualifier; u8 status; u8 response; u8 sense[sense_size]; char datain[]; The pcap mapping of this layout should be straightforward. Stefan - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.