Skip to content

Commit 13a6e71

Browse files
committed
explain pci device number selection
1 parent 12534db commit 13a6e71

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sled-agent/src/instance.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,8 @@ impl InstanceRunner {
911911
id: disk.disk_id,
912912
device: NvmeDisk {
913913
backend_id: SpecKey::Uuid(disk.disk_id),
914+
// Add 16 to the disk slot number to match Propolis's
915+
// previous interpretation of disk slot parameters.
914916
pci_path: PciPath::new(0, disk.slot + 0x10, 0)?,
915917
serial_number,
916918
},
@@ -944,6 +946,8 @@ impl InstanceRunner {
944946
device: VirtioNic {
945947
backend_id: SpecKey::Uuid(nic.id),
946948
interface_id: nic.id,
949+
// Add 8 to the NIC slot number to match Propolis's
950+
// previous interpretation of NIC slot parameters.
947951
pci_path: PciPath::new(0, nic.slot + 8, 0)?,
948952
},
949953
backend: VirtioNetworkBackend {

0 commit comments

Comments
 (0)