Page MenuHomeFreeBSD

bhyve/virtio-scsi: support for multiple targets
Needs ReviewPublic

Authored by rosenfeld_grumpf.hope-2000.org on Mon, Oct 20, 5:46 PM.
Tags
None
Referenced Files
F135801412: D53221.id165412.diff
Thu, Nov 13, 12:40 AM
Unknown Object (File)
Sun, Nov 9, 4:23 PM
Unknown Object (File)
Sat, Nov 8, 3:23 PM
Unknown Object (File)
Sat, Nov 8, 5:16 AM
Unknown Object (File)
Fri, Nov 7, 5:26 PM
Unknown Object (File)
Fri, Nov 7, 10:57 AM
Unknown Object (File)
Thu, Nov 6, 10:45 AM
Unknown Object (File)
Fri, Oct 31, 5:52 AM

Details

Reviewers
jhb
corvink
markj
Group Reviewers
bhyve
Summary

Currently, virtio-scsi supports only one target with 16383 LUNs, which
fits nicely with what CTL provides. It would be useful to support more
than that, multiple targets each with 16383 LUNs.

While this can be useful with CTL by attaching each target to another
CTL target port, this will be necessary to support SCSI passthrough.

The new syntax for configuring targets will look like this:

-s X,virtio-scsi,target=/dev/foo,target=/dev/bar,target=/dev/baz

This will create the following configuration nodes:

pci.0.X.0.device=virtio-scsi
pci.0.X.0.target.0=/dev/foo
pci.0.X.0.target.1=/dev/bar
pci.0.X.0.target.2=/dev/baz

The existing configuration syntax is still understood for compatibility:

(1) -s X,virtio-scsi
(2) -s X,virtio-scsi,/dev/foo
(3) -s X,virtio-scsi,dev=/dev/foo

This will create the following configuration nodes:

pci.0.X.0.device=virtio-scsi (1, 2, 3)
pci.0.X.0.target.0=/dev/cam/ctl (1)
pci.0.X.0.target.0=/dev/foo (2, 3)

This is currently also under review in illumos: https://code.illumos.org/c/illumos-gate/+/4423

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 68274
Build 65157: arc lint + arc unit

Event Timeline

Clarify comment in pci_vtscsi_init_target().