Skip to content

Commit

Permalink
explain pci device number selection
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcolombo committed Dec 19, 2024
1 parent b7f5aa1 commit 4aac06a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sled-agent/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,8 @@ impl InstanceRunner {
id: disk.disk_id,
device: NvmeDisk {
backend_id: SpecKey::Uuid(disk.disk_id),
// Add 16 to the disk slot number to match Propolis's
// previous interpretation of disk slot parameters.
pci_path: PciPath::new(0, disk.slot + 0x10, 0)?,
serial_number,
},
Expand Down Expand Up @@ -944,6 +946,8 @@ impl InstanceRunner {
device: VirtioNic {
backend_id: SpecKey::Uuid(nic.id),
interface_id: nic.id,
// Add 8 to the NIC slot number to match Propolis's
// previous interpretation of NIC slot parameters.
pci_path: PciPath::new(0, nic.slot + 8, 0)?,
},
backend: VirtioNetworkBackend {
Expand Down

0 comments on commit 4aac06a

Please sign in to comment.