linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Pe: [PATCH v5 1/3] virtio-scsi: first version
@ 2012-02-06  9:51 Christian Hoff
  2012-02-07  9:54 ` Paolo Bonzini
  0 siblings, 1 reply; 34+ messages in thread
From: Christian Hoff @ 2012-02-06  9:51 UTC (permalink / raw)
  To: pbonzini, linux-kernel; +Cc: linux-scsi, rusty, mst, kvm

Hello Paolo,

first let me say that your patch is working fine on my local clone of the 
qemu repository.

Let me ask just one question about the format of the data being 
transmitted over the virtqueue.

Paolo Bonzini wrote:
+                cmd->req.cmd = (struct virtio_scsi_cmd_req){
+                                .lun[0] = 1,
+                                .lun[1] = sc->device->id,
+                                .lun[2] = (sc->device->lun >> 8) | 0x40,
+                                .lun[3] = sc->device->lun & 0xff,
+                               [...]
+                };

Can't we have seperate fields for the SCSI target ID and the LUN number 
here? Putting all this into a single field seems confusing. The following 
line of code (sc->device->lun >> 8) | 0x40 essentially means that LUN 
numbers will be limited to 8+6 Bits=14 Bits for no obvious reason that I 
can see. Maybe we could just split the LUN field up into two uint32 fields 
for target ID and LUN number?

Also, lun[1] = sc->device->id means that only 255 SCSI target IDs will be 
supported. Think about bigger usage scenarios, such as FCP networks with 
several hundred HBAs in the net. If you want to have the target ID<->HBA 
mapping the same as on the guest as on the host, then 255 virtual target 
IDs could be a limit.

Sorry for coming up so late with these suggestions. I hope there is still 
enough time left to discuss and address these problems.

Mit freundlichen Grüßen / Kind regards

Christian Hoff

Student - Applied Computer Science


Phone:
49-16098976-950
 IBM Deutschland

E-Mail:
christian.hoff@de.ibm.com
 Am Fichtenberg 1


 71083 Herrenberg


 Germany


IBM Deutschland GmbH / Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Martina Koederitz (Vorsitzende), Reinhard Reschke, 
Dieter Scholz, Gregor Pillen, Joachim Heel, Christian Noll
Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart, 
HRB 14562 / WEEE-Reg.-Nr. DE 99369940 


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2012-02-14  9:57 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06  9:51 Pe: [PATCH v5 1/3] virtio-scsi: first version Christian Hoff
2012-02-07  9:54 ` Paolo Bonzini
2012-02-07 11:10   ` Michael S. Tsirkin
2012-02-07 11:26     ` Paolo Bonzini
2012-02-07 11:56   ` Christian Borntraeger
2012-02-07 12:31     ` Paolo Bonzini
2012-02-07 13:18       ` Christian Borntraeger
2012-02-07 13:59         ` Christian Hoff
2012-02-07 14:28           ` Paolo Bonzini
2012-02-08 13:37             ` Christian Hoff
2012-02-09  9:25               ` Paolo Bonzini
2012-02-09 12:18                 ` Christian Hoff
2012-02-12 20:16                 ` James Bottomley
2012-02-12 23:41                   ` Rusty Russell
2012-02-13  7:05                   ` Christian Borntraeger
2012-02-13  7:57                     ` Dor Laor
2012-02-13 12:40                       ` Nicholas A. Bellinger
2012-02-13 12:54                         ` Dor Laor
2012-02-13 13:00                           ` Michael S. Tsirkin
2012-02-13 13:13                             ` ronnie sahlberg
2012-02-13 13:17                               ` Paolo Bonzini
2012-02-13 13:18                               ` Michael S. Tsirkin
2012-02-13 15:12                                 ` Hannes Reinecke
2012-02-13 20:42                                   ` ronnie sahlberg
2012-02-13 20:53                                     ` ronnie sahlberg
2012-02-13 22:59                                       ` Michael S. Tsirkin
2012-02-13 23:30                                         ` ronnie sahlberg
2012-02-13 23:33                                           ` Michael S. Tsirkin
2012-02-14  0:49                                             ` ronnie sahlberg
2012-02-14  1:11                                               ` Michael S. Tsirkin
2012-02-14  9:57                                                 ` Paolo Bonzini
2012-02-13 11:08                     ` Bart Van Assche
2012-02-13  9:19                   ` Paolo Bonzini
2012-02-14  0:07                     ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).