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

DPDK: use multiple mempools, assert hugepage count is > 0 #3581

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions lisa/tools/hugepages.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from enum import Enum
from typing import Any, Set

from assertpy import assert_that

from lisa.executable import Tool
from lisa.tools.echo import Echo
from lisa.tools.free import Free
Expand Down Expand Up @@ -81,6 +83,10 @@ def _enable_hugepages(self, hugepage_size_kb: HugePageSize) -> None:
)

request_pages = request_space_kb // hugepage_size_kb.value
assert_that(request_pages).described_as(
"Must request huge page count > 0. Verify this system has enough "
"free memory to allocate ~2GB of hugepages"
).is_greater_than(0)
for i in range(numa_nodes):
# nr_hugepages will be written with the number calculated
# based on 2MB hugepages if not specified, subject to change
Expand Down
1 change: 1 addition & 0 deletions microsoft/testsuites/dpdk/dpdktestpmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ def generate_testpmd_command(
f"{self._testpmd_install_path} {core_list} "
f"{nic_include_info} -- --forward-mode={mode} "
f"-a --stats-period 2 --nb-cores={forwarding_cores} {extra_args} "
"--mbuf-size=2048,4096"
)

def run_for_n_seconds(self, cmd: str, timeout: int) -> str:
Expand Down
Loading