Skip to content

Commit

Permalink
vmbus_devices_channels: fix count for MANA
Browse files Browse the repository at this point in the history
MANA has a 1:1 channel to core ratio up to 64.
Fix test to account for MANA environments
  • Loading branch information
mcgov authored and LiliDeng committed Aug 11, 2023
1 parent 573570b commit a389724
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lisa/nic.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ def _load_nics(self) -> None:
self.nics[nic].pci_slot = pci_device.slot
break

def is_mana_present(self) -> bool:
return self._is_mana_device_discovered()

def _is_mana_device_discovered(self) -> bool:
lspci = self._node.tools[Lspci]
pci_devices = lspci.get_devices_by_type(
Expand Down
5 changes: 4 additions & 1 deletion microsoft/testsuites/core/lsvmbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ def verify_vmbus_devices_channels(self, node: Node) -> None:
expected_network_channel_count = min(core_count, 8)
# Each storvsc SCSI device should have "the_number_of_vCPUs / 4" channel(s)
# with a cap value of 64.
expected_scsi_channel_count = math.ceil(min(core_count, 256) / 4)
if node.nics.is_mana_present():
expected_scsi_channel_count = min(core_count, 64)
else:
expected_scsi_channel_count = math.ceil(min(core_count, 256) / 4)
for vmbus_device in vmbus_devices_list:
if vmbus_device.name == "Synthetic network adapter":
assert_that(vmbus_device.channel_vp_map).is_length(
Expand Down

0 comments on commit a389724

Please sign in to comment.