Pe: [PATCH v5 1/3] virtio-scsi: first version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
 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 

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux