sut_node - System Under Test Node

System under test (DPDK + hardware) node.

A system under test (SUT) is the combination of DPDK and the hardware we’re testing with DPDK (NICs, crypto and other devices). An SUT node is where this SUT runs.

class DPDKBuildInfo

Bases: object

Various versions and other information about a DPDK build.

dpdk_version

The DPDK version that was built.

Type:

str | None

compiler_version

The version of the compiler used to build DPDK.

Type:

str | None

__init__(dpdk_version: str | None, compiler_version: str | None) None
class SutNode

Bases: Node

The system under test node.

The SUT node extends Node with DPDK specific features:

  • Managing DPDK source tree on the remote SUT,

  • Building the DPDK from source or using a pre-built version,

  • Gathering of DPDK build info,

  • The running of DPDK apps, interactively or one-time execution,

  • DPDK apps cleanup.

Building DPDK from source uses build configuration inside dpdk_build of configuration.

config

The SUT node configuration.

Type:

framework.config.SutNodeConfiguration

virtual_devices

The virtual devices used on the node.

Type:

list[framework.testbed_model.virtual_device.VirtualDevice]

__init__(node_config: SutNodeConfiguration)

Extend the constructor with SUT node specifics.

Parameters:

node_config (SutNodeConfiguration) – The SUT node’s test run configuration.

property remote_dpdk_build_dir: str | pathlib.PurePath

The remote DPDK build dir path.

property dpdk_version: str | None

Last built DPDK version.

property node_info: OSSessionInfo

Additional node information.

property compiler_version: str | None

The node’s compiler version.

property path_to_devbind_script: pathlib.PurePath | str

The path to the dpdk-devbind.py script on the node.

get_dpdk_build_info() DPDKBuildInfo

Get additional DPDK build information.

Returns:

The DPDK build information,

Return type:

DPDKBuildInfo

set_up_test_run(test_run_config: TestRunConfiguration, dpdk_build_config: framework.config.DPDKPrecompiledBuildConfiguration | framework.config.DPDKUncompiledBuildConfiguration) None

Extend the test run setup with vdev config and DPDK build set up.

This method extends the setup process by configuring virtual devices and preparing the DPDK environment based on the provided configuration.

Parameters:
tear_down_test_run() None

Extend the test run teardown with virtual device teardown and DPDK teardown.

build_dpdk_app(app_name: str, **meson_dpdk_args: str | bool) PurePath

Build one or all DPDK apps.

Requires DPDK to be already built on the SUT node.

Parameters:
  • app_name (str) – The name of the DPDK app to build. When app_name is all, build all example apps.

  • meson_dpdk_args (str | bool) – The arguments found in meson_options.txt in root DPDK directory. Do not use -D with them.

Returns:

The directory path of the built app. If building all apps, return the path to the examples directory (where all apps reside).

Return type:

PurePath

kill_cleanup_dpdk_apps() None

Kill all dpdk applications on the SUT, then clean up hugepages.

run_dpdk_app(app_path: PurePath, eal_params: EalParams, timeout: float = 30) CommandResult

Run DPDK application on the remote node.

The application is not run interactively - the command that starts the application is executed and then the call waits for it to finish execution.

Parameters:
  • app_path (PurePath) – The remote path to the DPDK application.

  • eal_params (EalParams) – EAL parameters to run the DPDK application with.

  • timeout (float) – Wait at most this long in seconds for command execution to complete.

Returns:

The result of the DPDK app execution.

Return type:

CommandResult

bind_ports_to_driver(for_dpdk: bool = True) None

Bind all ports on the SUT to a driver.

Parameters:

for_dpdk (bool) – If True, binds ports to os_driver_for_dpdk. If False, binds to os_driver.