Skip to content

Commit

Permalink
Fix version and installation criteria in testpmd
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgov committed Nov 19, 2024
1 parent c4f52f8 commit 6572cb6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion microsoft/testsuites/dpdk/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def _should_install(
# At the moment, we use create() to force re-initialization.
# If we ever fix things so that we use .get,
# we will need this check. So add it now.q
or (required_arch != self._arch)
or (self._arch and required_arch != self._arch)
or (
required_version is not None
and required_version > self.get_installed_version()
Expand Down
2 changes: 1 addition & 1 deletion microsoft/testsuites/dpdk/dpdktestpmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ def _install(self) -> bool:
):
raise SkippedException("MANA DPDK test is not supported on this OS")

self.installer.do_installation()
self.installer.do_installation(required_arch=self._build_arch)
self._dpdk_version_info = self.installer.get_installed_version()
self._load_drivers_for_dpdk()
self.find_testpmd_binary(check_path=self._expected_install_path)
Expand Down
10 changes: 6 additions & 4 deletions microsoft/testsuites/dpdk/dpdkutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
)
from microsoft.testsuites.dpdk.dpdktestpmd import PACKAGE_MANAGER_SOURCE, DpdkTestpmd
from microsoft.testsuites.dpdk.rdmacore import (
RDMA_CORE_I386_DEFAULT_SOURCE,
RDMA_CORE_I386_MANA_DEFAULT_SOURCE,
RDMA_CORE_MANA_DEFAULT_SOURCE,
RDMA_CORE_PACKAGE_DEPENDENCIES,
RDMA_CORE_SOURCE_DEPENDENCIES,
Expand Down Expand Up @@ -138,8 +138,7 @@ def get_rdma_core_installer(
# set rdma-core installer type.
if not build_arch:
build_arch = node.tools[Lscpu].get_architecture()
if build_arch == CpuArchitecture.I386 and not rdma_source:
rdma_source = RDMA_CORE_I386_DEFAULT_SOURCE

if rdma_source:
if is_url_for_git_repo(rdma_source):
# else, if we have a user provided rdma-core source, use it
Expand All @@ -153,7 +152,10 @@ def get_rdma_core_installer(
)
# handle MANA special case, build a default rdma-core with mana provider
elif not rdma_source and node.nics.is_mana_device_present():
downloader = TarDownloader(node, RDMA_CORE_MANA_DEFAULT_SOURCE)
if build_arch == CpuArchitecture.I386:
downloader = TarDownloader(node, RDMA_CORE_I386_MANA_DEFAULT_SOURCE)
else:
downloader = TarDownloader(node, RDMA_CORE_MANA_DEFAULT_SOURCE)
else:
# no rdma_source and not mana, just use the package manager
return RdmaCorePackageManagerInstall(
Expand Down
2 changes: 1 addition & 1 deletion microsoft/testsuites/dpdk/rdmacore.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"https://github.com/linux-rdma/rdma-core/"
"releases/download/v50.1/rdma-core-50.1.tar.gz"
)
RDMA_CORE_I386_DEFAULT_SOURCE = (
RDMA_CORE_I386_MANA_DEFAULT_SOURCE = (
"https://github.com/linux-rdma/rdma-core/"
"releases/download/v53.1/rdma-core-53.1.tar.gz"
)
Expand Down

0 comments on commit 6572cb6

Please sign in to comment.