Skip to content

Commit

Permalink
DPDK: symmetric MP use devname on mana
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgov committed Jan 28, 2025
1 parent 3474886 commit ca4b648
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions microsoft/testsuites/dpdk/dpdksuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def verify_dpdk_symmetric_mp(
log,
variables,
"netvsc",
HugePageSize.HUGE_1GB,
HugePageSize.HUGE_2MB,
extra_nics=extra_nics,
)
except (NotEnoughMemoryException, UnsupportedOperationException) as err:
Expand All @@ -170,16 +170,27 @@ def verify_dpdk_symmetric_mp(
f'mac={extra_nics[0].mac_addr}"'
)

# node.execute(
# f"{str(testpmd.get_example_app_path('dpdk-devname'))} {' '.join(nic_args)}",
# sudo=True,
# shell=True,
# )
output = node.execute(
f"{str(testpmd.get_example_app_path('dpdk-devname'))} {nic_args}",
sudo=True,
shell=True,
).stdout
port_mask = 0x0
port_regex = re.compile(
r"dpdk-devname found port=(?P<port_id>[0-9]+) driver=net_netvsc .*\n"
)
matches = port_regex.findall(output)
if not matches:
fail("could not find port ids")
for match in matches:
port_mask ^= 1 << (int(match))

node.log.debug(f"Port mask: {hex(port_mask)}")
# primary_nic = node.nics.get_primary_nic().pci_slot
symmetric_mp_args = (
f"{nic_args} --proc-type auto "
# "--log-level netvsc,debug --log-level mana,debug --log-level eal,debug "
"-- --num-procs 2 -p 6"
"--log-level netvsc,debug --log-level mana,debug --log-level eal,debug "
f"-- -p {hex(port_mask)[2:]} --num-procs 2"
)
primary = node.tools[Timeout].start_with_timeout(
command=f"{str(symmetric_mp_path)} -l 1,2 {symmetric_mp_args} --proc-id 0",
Expand Down

0 comments on commit ca4b648

Please sign in to comment.