Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Review] Dpdk: add symmetric_mp test #3629

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DPDK: allow rescind in symmetric_mp test
  • Loading branch information
mcgov committed Feb 5, 2025
commit 571d648025dcf49ab6b18179b5588c35f9c0b99b
26 changes: 26 additions & 0 deletions microsoft/testsuites/dpdk/dpdksuite.py
Original file line number Diff line number Diff line change
@@ -130,6 +130,32 @@ def verify_dpdk_symmetric_mp(
) -> None:
run_dpdk_symmetric_mp(node, log, variables)

@TestCaseMetadata(
description="""
netvsc pmd version.
This test case checks DPDK can be built and installed correctly.
Prerequisites, accelerated networking must be enabled.
The VM should have at least two network interfaces,
with one interface for management.
More details refer https://docs.microsoft.com/en-us/azure/virtual-network/setup-dpdk#prerequisites # noqa: E501
""",
priority=2,
requirement=simple_requirement(
min_core_count=8,
min_nic_count=3,
network_interface=Sriov(),
unsupported_features=[Gpu, Infiniband],
),
)
def verify_dpdk_symmetric_mp_netvsc_rescind(
self,
node: Node,
log: Logger,
variables: Dict[str, Any],
result: TestResult,
) -> None:
run_dpdk_symmetric_mp(node, log, variables, trigger_rescind=True)

@TestCaseMetadata(
description="""
netvsc pmd version with 1GiB hugepages
53 changes: 26 additions & 27 deletions microsoft/testsuites/dpdk/dpdkutil.py
Original file line number Diff line number Diff line change
@@ -1324,7 +1324,7 @@ def run_dpdk_symmetric_mp(
f"{str(symmetric_mp_path)} -l 1 --proc-type auto "
f"{symmetric_mp_args} --proc-id 0"
),
timeout=630,
timeout=330,
signal=SIGINT,
kill_timeout=30,
)
@@ -1338,7 +1338,7 @@ def run_dpdk_symmetric_mp(
f"{str(symmetric_mp_path)} -l 2 --proc-type secondary "
f"{symmetric_mp_args} --proc-id 1"
),
timeout=600,
timeout=300,
signal=SIGINT,
kill_timeout=35,
)
@@ -1350,35 +1350,34 @@ def run_dpdk_symmetric_mp(
enable=False, wait=False, reset_connections=False
)

# wait for the RTE_DEV_EVENT_REMOVE message
primary.wait_output(
"HN_DRIVER: netvsc_hotadd_callback(): "
"Device notification type=1" # RTE_DEV_EVENT_REMOVE
) # relying on compiler defaults here, not great.
# wait for the RTE_DEV_EVENT_REMOVE message
primary.wait_output(
"HN_DRIVER: netvsc_hotadd_callback(): "
"Device notification type=1" # RTE_DEV_EVENT_REMOVE
) # relying on compiler defaults here, not great.

if trigger_rescind:
# turn SRIOV on
node.features[NetworkInterface].switch_sriov(
enable=True, wait=False, reset_connections=False
)

# wait for the RTE_DEV_EVENT_ADD message
primary.wait_output(
(
"HN_DRIVER: netvsc_hotadd_callback(): "
"Device notification type=0" # RTE_DEV_EVENT_ADD
),
delta_only=True,
) # relying on compiler defaults here, not great.
primary.wait_output(
(
"HN_DRIVER: netvsc_hotplug_retry(): Found matching MAC address, "
f"adding device {test_nics[0].pci_device_name} "
f"network name {test_nics[0].lower} "
f"args mac={test_nics[0].mac_addr},mac={test_nics[1].mac_addr}"
),
delta_only=True,
) # relying on compiler defaults here, not great.
# wait for the RTE_DEV_EVENT_ADD message
primary.wait_output(
(
"HN_DRIVER: netvsc_hotadd_callback(): "
"Device notification type=0" # RTE_DEV_EVENT_ADD
),
delta_only=True,
) # relying on compiler defaults here, not great.
primary.wait_output(
(
"HN_DRIVER: netvsc_hotplug_retry(): Found matching MAC address, "
f"adding device {test_nics[0].pci_device_name} "
f"network name {test_nics[0].lower} "
f"args mac={test_nics[0].mac_addr},mac={test_nics[1].mac_addr}"
),
delta_only=True,
) # relying on compiler defaults here, not great.

ping.ping_async(
target=test_nics[0].ip_addr,
@@ -1391,8 +1390,8 @@ def run_dpdk_symmetric_mp(
count=100,
ignore_error=True,
)

# # check the exit codes
test_kit.dmesg.check_kernel_errors(force_run=True)
# check the exit codes
secondary_result = secondary.wait_result(
expected_exit_code=0,
expected_exit_code_failure_message=(