From patchwork Fri Jul 5 18:29:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Pratte X-Patchwork-Id: 142164 X-Patchwork-Delegate: juraj.linkes@pantheon.tech Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C8BBD4559C; Fri, 5 Jul 2024 20:29:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B67FF410FD; Fri, 5 Jul 2024 20:29:23 +0200 (CEST) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by mails.dpdk.org (Postfix) with ESMTP id E9237410F2 for ; Fri, 5 Jul 2024 20:29:21 +0200 (CEST) Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-79ef7608635so1491485a.2 for ; Fri, 05 Jul 2024 11:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1720204161; x=1720808961; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/Ms3xaAX11End6xsLlnWH82zcpunVrjjV4wybhLF2Kk=; b=jCTS5rV5LCsAd+lrZvWHEZ8tit6s+bfkDESKLXjGuIJ1i+GlGm66pxxGTqjclUXGVe hcgAgcQOHIomS/iaGskhLibAGFjWaj08LszKr8TVeqmb34uCZtF8ayCZW9XYzEMmpNO5 Ki5KIMVZa2b+nSpuKUwaZdgRYrq5TFhYZknZ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720204161; x=1720808961; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/Ms3xaAX11End6xsLlnWH82zcpunVrjjV4wybhLF2Kk=; b=t93Q66EzvuhcjWlh4TKLMF+AdE6on0fQ1O3WCsWZQF7qiDQLANu/t1GgaW0xudxqM5 0HWG25gkPM29xhynLposh5Mglg8iRwH/LM738Stt1IQNF6JXZM79cyYLTA3lHVyb6rOY Eni8BV7+O7Dw0+bHrxbTcCbA11xL9nQKJMmSXSfOoQvn8Wx+JpYABLupXGobcUFebSoe 5GQ4r84nvypazF1nnSIRHqpYJQs4VsnWz7WWRjo0seX+8jgnCfw+bxkaLblgBbDYtwsF SWb3PiFaNsxSiW1vMh4QISd33ZU+SqO7//t9uryPsBr7F1pWcVU0aURR6s7th1SW4Zkl +sbg== X-Gm-Message-State: AOJu0YyC+ha9O4xrbl2bJe1sbYQ4qPNJWgBYxD2OeZAEgQYPsagiD6jE y+OdJIckszPSpY5RlRoOgbZaSb583gnGbFgyt9LL83dTKBw4QeOHg/e/Rp+8vqE= X-Google-Smtp-Source: AGHT+IGRhZLJ3D92c7it5NXsU+XPZMFCMHp9fm3xQn36tNRFKB+LmgoCf7vadUfJ7q6IlGTsXKq3gw== X-Received: by 2002:ae9:c20f:0:b0:79b:eca2:b807 with SMTP id af79cd13be357-79eee2b5684mr500215885a.3.1720204161244; Fri, 05 Jul 2024 11:29:21 -0700 (PDT) Received: from localhost.unh.edu ([2606:4100:3880:1257::1003]) by smtp.gmail.com with ESMTPSA id af79cd13be357-79d6932ff9csm788391385a.133.2024.07.05.11.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 11:29:20 -0700 (PDT) From: Nicholas Pratte To: dmarx@iol.unh.edu, paul.szczepanek@arm.com, juraj.linkes@pantheon.tech, yoan.picchi@foss.arm.com, jspewock@iol.unh.edu, luca.vizzarro@arm.com, probb@iol.unh.edu, Honnappa.Nagarahalli@arm.com Cc: dev@dpdk.org, Nicholas Pratte Subject: [PATCH v2 1/6] dts: Remove build target config and list of devices Date: Fri, 5 Jul 2024 14:29:11 -0400 Message-ID: <20240705182910.28009-2-npratte@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240705171341.23894-2-npratte@iol.unh.edu> References: <20240705171341.23894-2-npratte@iol.unh.edu> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Remove the list of devices from the schema, as these are unuesed. Likewise, removed build-target information since these is not currently used, and it is unlikely to be used in the future. Adjustments to the dts.rst are made to reflect these changes. Bugzilla ID: 1360 Signed-off-by: Nicholas Pratte --- dts/conf.yaml | 5 +- dts/framework/config/__init__.py | 30 +------- dts/framework/config/conf_yaml_schema.json | 79 ---------------------- dts/framework/config/types.py | 6 -- dts/framework/runner.py | 2 +- dts/framework/test_result.py | 14 +--- dts/framework/testbed_model/sut_node.py | 8 +-- 7 files changed, 5 insertions(+), 139 deletions(-) diff --git a/dts/conf.yaml b/dts/conf.yaml index 7d95016e68..56cc08ced2 100644 --- a/dts/conf.yaml +++ b/dts/conf.yaml @@ -5,11 +5,8 @@ test_runs: # define one test run environment - build_targets: - - arch: x86_64 - os: linux - cpu: native # the combination of the following two makes CC="ccache gcc" - compiler: gcc + - compiler: gcc compiler_wrapper: ccache perf: false # disable performance testing func: true # enable functional testing diff --git a/dts/framework/config/__init__.py b/dts/framework/config/__init__.py index df60a5030e..456a8a83ab 100644 --- a/dts/framework/config/__init__.py +++ b/dts/framework/config/__init__.py @@ -85,22 +85,6 @@ class OS(StrEnum): windows = auto() -@unique -class CPUType(StrEnum): - r"""The supported CPUs of :class:`~framework.testbed_model.node.Node`\s.""" - - #: - native = auto() - #: - armv8a = auto() - #: - dpaa2 = auto() - #: - thunderx = auto() - #: - xgene1 = auto() - - @unique class Compiler(StrEnum): r"""The supported compilers of :class:`~framework.testbed_model.node.Node`\s.""" @@ -341,28 +325,20 @@ class BuildTargetConfiguration: The configuration used for building DPDK. Attributes: - arch: The target architecture to build for. - os: The target os to build for. - cpu: The target CPU to build for. compiler: The compiler executable to use. compiler_wrapper: This string will be put in front of the compiler when executing the build. Useful for adding wrapper commands, such as ``ccache``. name: The name of the compiler. """ - arch: Architecture - os: OS - cpu: CPUType compiler: Compiler compiler_wrapper: str - name: str @classmethod def from_dict(cls, d: BuildTargetConfigDict) -> Self: r"""A convenience method that processes the inputs before creating an instance. - `arch`, `os`, `cpu` and `compiler` are converted to :class:`Enum`\s and - `name` is constructed from `arch`, `os`, `cpu` and `compiler`. + `compiler` is converted to :class:`Enum`\s Args: d: The configuration dictionary. @@ -371,12 +347,8 @@ def from_dict(cls, d: BuildTargetConfigDict) -> Self: The build target configuration instance. """ return cls( - arch=Architecture(d["arch"]), - os=OS(d["os"]), - cpu=CPUType(d["cpu"]), compiler=Compiler(d["compiler"]), compiler_wrapper=d.get("compiler_wrapper", ""), - name=f"{d['arch']}-{d['os']}-{d['cpu']}-{d['compiler']}", ) diff --git a/dts/framework/config/conf_yaml_schema.json b/dts/framework/config/conf_yaml_schema.json index f02a310bb5..3f7bc2acae 100644 --- a/dts/framework/config/conf_yaml_schema.json +++ b/dts/framework/config/conf_yaml_schema.json @@ -6,76 +6,6 @@ "type": "string", "description": "A unique identifier for a node" }, - "NIC": { - "type": "string", - "enum": [ - "ALL", - "ConnectX3_MT4103", - "ConnectX4_LX_MT4117", - "ConnectX4_MT4115", - "ConnectX5_MT4119", - "ConnectX5_MT4121", - "I40E_10G-10G_BASE_T_BC", - "I40E_10G-10G_BASE_T_X722", - "I40E_10G-SFP_X722", - "I40E_10G-SFP_XL710", - "I40E_10G-X722_A0", - "I40E_1G-1G_BASE_T_X722", - "I40E_25G-25G_SFP28", - "I40E_40G-QSFP_A", - "I40E_40G-QSFP_B", - "IAVF-ADAPTIVE_VF", - "IAVF-VF", - "IAVF_10G-X722_VF", - "ICE_100G-E810C_QSFP", - "ICE_25G-E810C_SFP", - "ICE_25G-E810_XXV_SFP", - "IGB-I350_VF", - "IGB_1G-82540EM", - "IGB_1G-82545EM_COPPER", - "IGB_1G-82571EB_COPPER", - "IGB_1G-82574L", - "IGB_1G-82576", - "IGB_1G-82576_QUAD_COPPER", - "IGB_1G-82576_QUAD_COPPER_ET2", - "IGB_1G-82580_COPPER", - "IGB_1G-I210_COPPER", - "IGB_1G-I350_COPPER", - "IGB_1G-I354_SGMII", - "IGB_1G-PCH_LPTLP_I218_LM", - "IGB_1G-PCH_LPTLP_I218_V", - "IGB_1G-PCH_LPT_I217_LM", - "IGB_1G-PCH_LPT_I217_V", - "IGB_2.5G-I354_BACKPLANE_2_5GBPS", - "IGC-I225_LM", - "IGC-I226_LM", - "IXGBE_10G-82599_SFP", - "IXGBE_10G-82599_SFP_SF_QP", - "IXGBE_10G-82599_T3_LOM", - "IXGBE_10G-82599_VF", - "IXGBE_10G-X540T", - "IXGBE_10G-X540_VF", - "IXGBE_10G-X550EM_A_SFP", - "IXGBE_10G-X550EM_X_10G_T", - "IXGBE_10G-X550EM_X_SFP", - "IXGBE_10G-X550EM_X_VF", - "IXGBE_10G-X550T", - "IXGBE_10G-X550_VF", - "brcm_57414", - "brcm_P2100G", - "cavium_0011", - "cavium_a034", - "cavium_a063", - "cavium_a064", - "fastlinq_ql41000", - "fastlinq_ql41000_vf", - "fastlinq_ql45000", - "fastlinq_ql45000_vf", - "hi1822", - "virtio" - ] - }, - "ARCH": { "type": "string", "enum": [ @@ -124,12 +54,6 @@ "other" ] }, - "os": { - "$ref": "#/definitions/OS" - }, - "cpu": { - "$ref": "#/definitions/cpu" - }, "compiler": { "$ref": "#/definitions/compiler" }, @@ -140,9 +64,6 @@ }, "additionalProperties": false, "required": [ - "arch", - "os", - "cpu", "compiler" ] }, diff --git a/dts/framework/config/types.py b/dts/framework/config/types.py index cf16556403..2f75724c5e 100644 --- a/dts/framework/config/types.py +++ b/dts/framework/config/types.py @@ -74,12 +74,6 @@ class NodeConfigDict(TypedDict): class BuildTargetConfigDict(TypedDict): """Allowed keys and values.""" - #: - arch: str - #: - os: str - #: - cpu: str #: compiler: str #: diff --git a/dts/framework/runner.py b/dts/framework/runner.py index 6b6f6a05f5..2a1019899a 100644 --- a/dts/framework/runner.py +++ b/dts/framework/runner.py @@ -480,7 +480,7 @@ def _run_build_target( test_suites_with_cases: The test suites with test cases to run. """ self._logger.set_stage(DtsStage.build_target_setup) - self._logger.info(f"Running build target '{build_target_config.name}'.") + self._logger.info("Running build target.") try: sut_node.set_up_build_target(build_target_config) diff --git a/dts/framework/test_result.py b/dts/framework/test_result.py index 5694a2482b..7fcc24fecd 100644 --- a/dts/framework/test_result.py +++ b/dts/framework/test_result.py @@ -31,12 +31,9 @@ from typing import Union from .config import ( - OS, - Architecture, BuildTargetConfiguration, BuildTargetInfo, Compiler, - CPUType, NodeInfo, TestRunConfiguration, TestSuiteConfig, @@ -223,7 +220,7 @@ class DTSResult(BaseResult): """Stores environment information and test results from a DTS run. * Test run level information, such as testbed and the test suite list, - * Build target level information, such as compiler, target OS and cpu, + * Build target level compiler information * Test suite and test case results, * All errors that are caught and recorded during DTS execution. @@ -405,17 +402,11 @@ class BuildTargetResult(BaseResult): The internal list stores the results of all test suites in a given build target. Attributes: - arch: The DPDK build target architecture. - os: The DPDK build target operating system. - cpu: The DPDK build target CPU. compiler: The DPDK build target compiler. compiler_version: The DPDK build target compiler version. dpdk_version: The built DPDK version. """ - arch: Architecture - os: OS - cpu: CPUType compiler: Compiler compiler_version: str | None dpdk_version: str | None @@ -433,9 +424,6 @@ def __init__( build_target_config: The build target's test run configuration. """ super().__init__() - self.arch = build_target_config.arch - self.os = build_target_config.os - self.cpu = build_target_config.cpu self.compiler = build_target_config.compiler self.compiler_version = None self.dpdk_version = None diff --git a/dts/framework/testbed_model/sut_node.py b/dts/framework/testbed_model/sut_node.py index 2855fe0276..a4511157b7 100644 --- a/dts/framework/testbed_model/sut_node.py +++ b/dts/framework/testbed_model/sut_node.py @@ -115,12 +115,7 @@ def remote_dpdk_build_dir(self) -> PurePath: This is the directory where DPDK was built. We assume it was built in a subdirectory of the extracted tarball. """ - if self._build_target_config: - return self.main_session.join_remote_path( - self._remote_dpdk_dir, self._build_target_config.name - ) - else: - return self.main_session.join_remote_path(self._remote_dpdk_dir, "build") + return self.main_session.join_remote_path(self._remote_dpdk_dir, "build") @property def dpdk_version(self) -> str: @@ -217,7 +212,6 @@ def _configure_build_target(self, build_target_config: BuildTargetConfiguration) """Populate common environment variables and set build target config.""" self._env_vars = {} self._build_target_config = build_target_config - self._env_vars.update(self.main_session.get_dpdk_build_env_vars(build_target_config.arch)) self._env_vars["CC"] = build_target_config.compiler.name if build_target_config.compiler_wrapper: self._env_vars["CC"] = ( From patchwork Fri Jul 5 18:31:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Pratte X-Patchwork-Id: 142165 X-Patchwork-Delegate: juraj.linkes@pantheon.tech Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6CC554559C; Fri, 5 Jul 2024 20:31:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5900C410FD; Fri, 5 Jul 2024 20:31:56 +0200 (CEST) Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) by mails.dpdk.org (Postfix) with ESMTP id 454D2410F2 for ; Fri, 5 Jul 2024 20:31:55 +0200 (CEST) Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-6b5dfa18db1so2135756d6.0 for ; Fri, 05 Jul 2024 11:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1720204314; x=1720809114; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yjQ3pSbo/a80oFZM2tzQhbSXVFQ6PO+c2n+ZzCA6LWU=; b=CWgAoN2uCE/fUZrK7yQxtV8cqpEWBHYpXsGWLz937wcjWMajEwz7JHrT+KotSGa1LP 8mAsWMfRK6lyZFJtNcz3e4Ym/b+pZg7DmdB4OlJxah9USqC8Xns4UMASfFi/0AnTKJzG 0YzO8pNIBbYYDVtG6XPpuDX+6IjGJu+LRrZH4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720204314; x=1720809114; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yjQ3pSbo/a80oFZM2tzQhbSXVFQ6PO+c2n+ZzCA6LWU=; b=wGLHg3rv+HoeYVG3WUDHXIy7UBqZ3Bazo5Dv6iWtY6kp7bUjG8lmOZEiskGFNHgKbT ZhsES3SWwWjrCmkr8/vCBQfAxAXqbRH/dHzW01qrWqKJR69QSiR2x1qAMzA1fJlcgO32 7AYE9UbmCLSjx8lK8wc1L/uwS5w9pJ1nfIuUWxjJ3+qaRfwxJTbO8CrN9x4tqIi0CnIh Vx7BOTC0b+RTeFrXiE0azPDyejDGPbILM/UZVSip1nbSazKdLpvpy0dLvI9qCiT+F6m7 4yuXScBXSBYxZuN6NMPZjsyX2w4N8thG1JtTveU7xX8BqbEy5TFzK/KpcTTbTxSL1ir2 08nA== X-Gm-Message-State: AOJu0YwtN8F++RrinQz+cpZRV+zCGEon6cLe8TAIbAi6OejlFtXRLSMW DDh6Qh60GkZQSjdkOaOnrGKvZHajbKPeFP6h1DUePUjpkUpsK2L7Sty/22USaio= X-Google-Smtp-Source: AGHT+IErVvmXZC3jUqBwPQvp5bBn4u3l4OTazYqior/pie48Ku9Y6zXr4228ZtWAleCriP7nmP1APA== X-Received: by 2002:a05:620a:820f:b0:79c:d2fc:8b27 with SMTP id af79cd13be357-79eee2e4d77mr510214785a.7.1720204314390; Fri, 05 Jul 2024 11:31:54 -0700 (PDT) Received: from localhost.unh.edu ([2606:4100:3880:1257::1003]) by smtp.gmail.com with ESMTPSA id af79cd13be357-79ef9aa8889sm59382485a.20.2024.07.05.11.31.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 11:31:53 -0700 (PDT) From: Nicholas Pratte To: dmarx@iol.unh.edu, paul.szczepanek@arm.com, juraj.linkes@pantheon.tech, yoan.picchi@foss.arm.com, jspewock@iol.unh.edu, luca.vizzarro@arm.com, probb@iol.unh.edu, Honnappa.Nagarahalli@arm.com Cc: dev@dpdk.org, Nicholas Pratte Subject: [PATCH v2 2/6] dts: Use First Core Logic Change Date: Fri, 5 Jul 2024 14:31:35 -0400 Message-ID: <20240705183135.30255-1-npratte@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240705171341.23894-2-npratte@iol.unh.edu> References: <20240705171341.23894-2-npratte@iol.unh.edu> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Removed use_first_core from the conf.yaml in favor of determining this within the framework. use_first_core continue to serve a purpose in that it is only enabled when core 0 is explicitly provided in the configuration. Any other configuration, including "" or "any," will omit core 0. Documentation reworks are included to reflect the changes made. Bugzilla ID: 1360 Signed-off-by: Nicholas Pratte --- dts/conf.yaml | 3 +-- dts/framework/config/__init__.py | 11 +++++++---- dts/framework/config/conf_yaml_schema.json | 6 +----- dts/framework/testbed_model/node.py | 9 +++++++++ 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/dts/conf.yaml b/dts/conf.yaml index 56cc08ced2..53192e0761 100644 --- a/dts/conf.yaml +++ b/dts/conf.yaml @@ -29,8 +29,7 @@ nodes: user: dtsuser arch: x86_64 os: linux - lcores: "" # use all the available logical cores - use_first_core: false # tells DPDK to use any physical core + lcores: "" # use all available logical cores (Skips first core) memory_channels: 4 # tells DPDK to use 4 memory channels hugepages_2mb: # optional; if removed, will use system hugepage configuration number_of: 256 diff --git a/dts/framework/config/__init__.py b/dts/framework/config/__init__.py index 456a8a83ab..4c05373ef3 100644 --- a/dts/framework/config/__init__.py +++ b/dts/framework/config/__init__.py @@ -246,6 +246,9 @@ def from_dict( hugepage_config_dict["force_first_numa"] = False hugepage_config = HugepageConfiguration(**hugepage_config_dict) + lcores = "1" if "lcores" not in d else d["lcores"] if "any" not in d["lcores"] else "" + use_first_core = "0" in lcores + # The calls here contain duplicated code which is here because Mypy doesn't # properly support dictionary unpacking with TypedDicts if "traffic_generator" in d: @@ -256,8 +259,8 @@ def from_dict( password=d.get("password"), arch=Architecture(d["arch"]), os=OS(d["os"]), - lcores=d.get("lcores", "1"), - use_first_core=d.get("use_first_core", False), + lcores=lcores, + use_first_core=use_first_core, hugepages=hugepage_config, ports=[PortConfig.from_dict(d["name"], port) for port in d["ports"]], traffic_generator=TrafficGeneratorConfig.from_dict(d["traffic_generator"]), @@ -270,8 +273,8 @@ def from_dict( password=d.get("password"), arch=Architecture(d["arch"]), os=OS(d["os"]), - lcores=d.get("lcores", "1"), - use_first_core=d.get("use_first_core", False), + lcores=lcores, + use_first_core=use_first_core, hugepages=hugepage_config, ports=[PortConfig.from_dict(d["name"], port) for port in d["ports"]], memory_channels=d.get("memory_channels", 1), diff --git a/dts/framework/config/conf_yaml_schema.json b/dts/framework/config/conf_yaml_schema.json index 3f7bc2acae..01a6afdc72 100644 --- a/dts/framework/config/conf_yaml_schema.json +++ b/dts/framework/config/conf_yaml_schema.json @@ -163,13 +163,9 @@ }, "lcores": { "type": "string", - "pattern": "^(([0-9]+|([0-9]+-[0-9]+))(,([0-9]+|([0-9]+-[0-9]+)))*)?$", + "pattern": "^(([0-9]+|([0-9]+-[0-9]+))(,([0-9]+|([0-9]+-[0-9]+)))*)?$|any", "description": "Optional comma-separated list of logical cores to use, e.g.: 1,2,3,4,5,18-22. Defaults to 1. An empty string means use all lcores." }, - "use_first_core": { - "type": "boolean", - "description": "Indicate whether DPDK should use the first physical core. It won't be used by default." - }, "memory_channels": { "type": "integer", "description": "How many memory channels to use. Optional, defaults to 1." diff --git a/dts/framework/testbed_model/node.py b/dts/framework/testbed_model/node.py index 12a40170ac..9b3f01f1e9 100644 --- a/dts/framework/testbed_model/node.py +++ b/dts/framework/testbed_model/node.py @@ -86,6 +86,15 @@ def __init__(self, node_config: NodeConfiguration): self.lcores, LogicalCoreList(self.config.lcores) ).filter() + if LogicalCore(lcore=0, core=0, socket=0, node=0) in self.lcores: + self._logger.info( + """ + WARNING: First core being used; + using the first core is considered risky and should only + be done by advanced users. + """ + ) + self._other_sessions = [] self._init_ports() From patchwork Fri Jul 5 18:32:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Pratte X-Patchwork-Id: 142166 X-Patchwork-Delegate: juraj.linkes@pantheon.tech Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A8EF14559C; Fri, 5 Jul 2024 20:32:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91ECE43254; Fri, 5 Jul 2024 20:32:29 +0200 (CEST) Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) by mails.dpdk.org (Postfix) with ESMTP id 181AD410F2 for ; Fri, 5 Jul 2024 20:32:28 +0200 (CEST) Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-25e3d71030cso201891fac.1 for ; Fri, 05 Jul 2024 11:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1720204347; x=1720809147; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DsoaH7kG4dE/zBk0Lsap5nVty7tsDzNN9sha5Uw4Ckw=; b=WsrX2zaH82hUaeltHbF1ZLp3e2UjKQ0c7qyX78R8yODIqRaycDW2En7Wy15YoFYcl6 Sr+tsVM7zCwD3Do2OHPfl6vLIFBJ/HeGJu3yb5Z58qWChHP2db+677nHiL7U7aXujfMn S9akyuiOVrMXrsPd19ogjxTL4XTeG6AOtvD5Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720204347; x=1720809147; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DsoaH7kG4dE/zBk0Lsap5nVty7tsDzNN9sha5Uw4Ckw=; b=YIh8QnNyYKjCU/K6ltStzb8rb2j9dh0TZcmXkLzM6F1R8eG0IXD3GnSW3x8ZjZBf9d BBO9vH/cO+nnfQO7CPLfxM6j0fyD870qn0VH82uRRD40jyxf4pdwJirMBJUvFVCsqnYq uvt2MiOt97YQo3K7B3NpO10SoxfnP6Ub5x9JaRm0tZTlHakfmJvO4qNvmWmcivFo9TNP qHbrcN7mmtaFxy+lnD2jSoBXT2ZoMJLfKHwcY8kkU0p2CUo4KruLAhBOQ6zXtuufbQsM Xt9ckRYv1kkZnQmpxSqB8VjKLmGY4GGw0vjaithYhjVogN9KyXBhciJCi3WsvNou5n6+ dDSw== X-Gm-Message-State: AOJu0Yzvdd1sptro4aedfDS2WDdMK+4nPdVmMY14rzzbuNI9eNXZnu2q TQWZwhvGFD61rHRZHAgnvVuJ1otdL8czFpDJPqB3lksSwUZURRdkW9xVWtjUjao= X-Google-Smtp-Source: AGHT+IE3iJufihhwyqOfpMLGETqIVriMtmiB7cBzi5RSoFFJNUdaGh3N3G+LiYs/boXkLSY7URzkTA== X-Received: by 2002:a05:6871:24d9:b0:254:affe:5a08 with SMTP id 586e51a60fabf-25e2ba1b287mr5502028fac.2.1720204347222; Fri, 05 Jul 2024 11:32:27 -0700 (PDT) Received: from localhost.unh.edu ([2606:4100:3880:1257::1003]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b5fe762c09sm2649476d6.97.2024.07.05.11.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 11:32:26 -0700 (PDT) From: Nicholas Pratte To: dmarx@iol.unh.edu, paul.szczepanek@arm.com, juraj.linkes@pantheon.tech, yoan.picchi@foss.arm.com, jspewock@iol.unh.edu, luca.vizzarro@arm.com, probb@iol.unh.edu, Honnappa.Nagarahalli@arm.com Cc: dev@dpdk.org, Nicholas Pratte Subject: [PATCH v2 3/6] dts: Self-Discovering Architecture Change Date: Fri, 5 Jul 2024 14:32:15 -0400 Message-ID: <20240705183215.30998-1-npratte@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240705171341.23894-2-npratte@iol.unh.edu> References: <20240705171341.23894-2-npratte@iol.unh.edu> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The 'arch' attribute in the conf.yaml is unnecessary, as this can be readily discovered within the constructor of any given node. Since OS is determined within user configuration, finding system arch can be done both reliably and easily within the framework. For Linux/Posix systems, the 'uname' command is used to determine system architecture. I believe that this is posix-standard and utilizes a standardized output. Bugzilla ID: 1360 Signed-off-by: Nicholas Pratte --- dts/conf.yaml | 2 -- dts/framework/config/__init__.py | 4 ---- dts/framework/config/conf_yaml_schema.json | 12 ------------ dts/framework/config/types.py | 2 -- dts/framework/testbed_model/node.py | 4 +++- dts/framework/testbed_model/os_session.py | 8 ++++++++ dts/framework/testbed_model/posix_session.py | 6 ++++++ 7 files changed, 17 insertions(+), 21 deletions(-) diff --git a/dts/conf.yaml b/dts/conf.yaml index 53192e0761..7ca4c05b55 100644 --- a/dts/conf.yaml +++ b/dts/conf.yaml @@ -27,7 +27,6 @@ nodes: - name: "SUT 1" hostname: sut1.change.me.localhost user: dtsuser - arch: x86_64 os: linux lcores: "" # use all available logical cores (Skips first core) memory_channels: 4 # tells DPDK to use 4 memory channels @@ -52,7 +51,6 @@ nodes: - name: "TG 1" hostname: tg1.change.me.localhost user: dtsuser - arch: x86_64 os: linux ports: # sets up the physical link between "TG 1"@000:00:08.0 and "SUT 1"@0000:00:08.0 diff --git a/dts/framework/config/__init__.py b/dts/framework/config/__init__.py index 4c05373ef3..662b3070a1 100644 --- a/dts/framework/config/__init__.py +++ b/dts/framework/config/__init__.py @@ -208,7 +208,6 @@ class NodeConfiguration: the :class:`~framework.testbed_model.node.Node`. password: The password of the user. The use of passwords is heavily discouraged. Please use keys instead. - arch: The architecture of the :class:`~framework.testbed_model.node.Node`. os: The operating system of the :class:`~framework.testbed_model.node.Node`. lcores: A comma delimited list of logical cores to use when running DPDK. use_first_core: If :data:`True`, the first logical core won't be used. @@ -220,7 +219,6 @@ class NodeConfiguration: hostname: str user: str password: str | None - arch: Architecture os: OS lcores: str use_first_core: bool @@ -257,7 +255,6 @@ def from_dict( hostname=d["hostname"], user=d["user"], password=d.get("password"), - arch=Architecture(d["arch"]), os=OS(d["os"]), lcores=lcores, use_first_core=use_first_core, @@ -271,7 +268,6 @@ def from_dict( hostname=d["hostname"], user=d["user"], password=d.get("password"), - arch=Architecture(d["arch"]), os=OS(d["os"]), lcores=lcores, use_first_core=use_first_core, diff --git a/dts/framework/config/conf_yaml_schema.json b/dts/framework/config/conf_yaml_schema.json index 01a6afdc72..e65ea45058 100644 --- a/dts/framework/config/conf_yaml_schema.json +++ b/dts/framework/config/conf_yaml_schema.json @@ -6,14 +6,6 @@ "type": "string", "description": "A unique identifier for a node" }, - "ARCH": { - "type": "string", - "enum": [ - "x86_64", - "arm64", - "ppc64le" - ] - }, "OS": { "type": "string", "enum": [ @@ -155,9 +147,6 @@ "type": "string", "description": "The password to use on this node. Use only as a last resort. SSH keys are STRONGLY preferred." }, - "arch": { - "$ref": "#/definitions/ARCH" - }, "os": { "$ref": "#/definitions/OS" }, @@ -233,7 +222,6 @@ "name", "hostname", "user", - "arch", "os" ] }, diff --git a/dts/framework/config/types.py b/dts/framework/config/types.py index 2f75724c5e..9934fef503 100644 --- a/dts/framework/config/types.py +++ b/dts/framework/config/types.py @@ -56,8 +56,6 @@ class NodeConfigDict(TypedDict): #: password: str #: - arch: str - #: os: str #: lcores: str diff --git a/dts/framework/testbed_model/node.py b/dts/framework/testbed_model/node.py index 9b3f01f1e9..09399f4823 100644 --- a/dts/framework/testbed_model/node.py +++ b/dts/framework/testbed_model/node.py @@ -17,7 +17,7 @@ from ipaddress import IPv4Interface, IPv6Interface from typing import Any, Callable, Union -from framework.config import OS, NodeConfiguration, TestRunConfiguration +from framework.config import OS, Architecture, NodeConfiguration, TestRunConfiguration from framework.exception import ConfigurationError from framework.logger import DTSLogger, get_dts_logger from framework.settings import SETTINGS @@ -55,6 +55,7 @@ class Node(ABC): main_session: OSSession config: NodeConfiguration name: str + arch: Architecture lcores: list[LogicalCore] ports: list[Port] _logger: DTSLogger @@ -77,6 +78,7 @@ def __init__(self, node_config: NodeConfiguration): self.name = node_config.name self._logger = get_dts_logger(self.name) self.main_session = create_session(self.config, self.name, self._logger) + self.arch = Architecture(self.main_session.get_arch_info()) self._logger.info(f"Connected to node: {self.name}") diff --git a/dts/framework/testbed_model/os_session.py b/dts/framework/testbed_model/os_session.py index 79f56b289b..02277eee1f 100644 --- a/dts/framework/testbed_model/os_session.py +++ b/dts/framework/testbed_model/os_session.py @@ -342,6 +342,14 @@ def get_node_info(self) -> NodeInfo: Node information. """ + @abstractmethod + def get_arch_info(self) -> str: + """Discover CPU architecture of the remote host. + + Returns: + Remote host CPU architecture. + """ + @abstractmethod def update_ports(self, ports: list[Port]) -> None: """Get additional information about ports from the operating system and update them. diff --git a/dts/framework/testbed_model/posix_session.py b/dts/framework/testbed_model/posix_session.py index d279bb8b53..91afca61ea 100644 --- a/dts/framework/testbed_model/posix_session.py +++ b/dts/framework/testbed_model/posix_session.py @@ -295,3 +295,9 @@ def get_node_info(self) -> NodeInfo: ).stdout.split("\n") kernel_version = self.send_command("uname -r", SETTINGS.timeout).stdout return NodeInfo(os_release_info[0].strip(), os_release_info[1].strip(), kernel_version) + + def get_arch_info(self) -> str: + """Overrides :meth'~.os_session.OSSession.get_arch_info'.""" + # return str(self.send_command('arch')).stdout + + return str(self.send_command("uname -m").stdout.removesuffix("\n")) From patchwork Fri Jul 5 18:32:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Pratte X-Patchwork-Id: 142167 X-Patchwork-Delegate: juraj.linkes@pantheon.tech Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8BF324559C; Fri, 5 Jul 2024 20:32:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77356410FD; Fri, 5 Jul 2024 20:32:48 +0200 (CEST) Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) by mails.dpdk.org (Postfix) with ESMTP id 4CB41410F2 for ; Fri, 5 Jul 2024 20:32:47 +0200 (CEST) Received: by mail-qv1-f45.google.com with SMTP id 6a1803df08f44-6b5e6b23577so2508356d6.3 for ; Fri, 05 Jul 2024 11:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1720204366; x=1720809166; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oODAuiVQecsgeP3rA3WM0BXIV13zpPlKhISisvICxl4=; b=Ox+mtQmZ5sYI9Kjm5VqZbYEV3VgeR0qeZoAQHn//ws0l7bxFusIhyqLtMC/XfO4Edi Lw8QFJD3KuRIiBoww1+fIh1ntt1lsa57+joKACOIFa75neWBKvDgJB9WPUSSLItI58aF bYHduWOKSx5be5jbjUOYq6NVxtKHpKldZ73AM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720204366; x=1720809166; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oODAuiVQecsgeP3rA3WM0BXIV13zpPlKhISisvICxl4=; b=bXj3PUSFTEhbuIvUjFRxwXEFIoJgKz3WXWtgGxKPaO/X9dM5bCH1IOX/UN6FqI/KY2 Y6ek7bCizK4joMFTEJ2iurk/a+X26n3uU5U0gwG+hvpgBmMLIGEjDJ9zEoyV3H+/0x2B ba2jnxBalo6LPWXcXWeKsTMzvF7eroFZHp8ZM9gcpYLG3U1GqO2fijrAncfmJGQxJZLr WFA7X+Tq+VNg4qC4eRYflgQHSMu+tick3FOdkJOf3oIyvB91Z9jJs2pU2eIsuum3pmc4 25K/mCHvIEHN/hgy8Rc2NrmmtxM1iy7Q6cSdE0Yn+PY9MnReoefz8aEdNEtiWPSzpHch 2F5Q== X-Gm-Message-State: AOJu0YzORQe+fbWqj2TQPX4gBec4Rep+NyEvfGeLCcWDQ6H29OvhM2mM M1aVp0FQTI2tFEyNgmkxXy6AkO/B7lRGCLI9cN5wShZEqY8kbuBLuaYs0RGQAmA= X-Google-Smtp-Source: AGHT+IHwHzMRyDNjDCHygtUdC8eCIE4bq38M20V55mVDBk2BRFTUQqgAkvhKSuyKCTRfke1Oz0ogmA== X-Received: by 2002:a05:6214:19ca:b0:6b2:b621:559c with SMTP id 6a1803df08f44-6b5ed22409amr56825376d6.4.1720204366589; Fri, 05 Jul 2024 11:32:46 -0700 (PDT) Received: from localhost.unh.edu ([2606:4100:3880:1257::1003]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b5eb6309fcsm18469286d6.133.2024.07.05.11.32.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 11:32:45 -0700 (PDT) From: Nicholas Pratte To: dmarx@iol.unh.edu, paul.szczepanek@arm.com, juraj.linkes@pantheon.tech, yoan.picchi@foss.arm.com, jspewock@iol.unh.edu, luca.vizzarro@arm.com, probb@iol.unh.edu, Honnappa.Nagarahalli@arm.com Cc: dev@dpdk.org, Nicholas Pratte Subject: [PATCH v2 4/6] dts: Rework DPDK Attributes In SUT Node Config Date: Fri, 5 Jul 2024 14:32:35 -0400 Message-ID: <20240705183234.31333-2-npratte@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240705171341.23894-2-npratte@iol.unh.edu> References: <20240705171341.23894-2-npratte@iol.unh.edu> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Rework 'lcores' and 'memory_channels' into a new 'dpdk_config' subsection in an effort to make these attributes SUT specific; the traffic generator, more often than not, does not need this information. Ideally, if such information is needed, then it will be listed in the 'traffic_generator' component in TG Node configuration. Such logic is not introduced in this patch, but the framework can be rewritten to do so without any implications of extreme effort. To make this work, use_first_core has been removed from the framework entirely in favor of doing this within the LogicalCoreListFilter object. Since use_first_core was only ever activated when logical core 0 was explicitly defined, core 0 can be removed from the list of total logical cores assuming that it was not listed within filter_specifier. This patch also removes 'vdevs' from 'system_under_test_node' and moves it into 'executions.' Bugzilla ID: 1360 Signed-off-by: Nicholas Pratte --- dts/conf.yaml | 20 ++++----- dts/framework/config/__init__.py | 45 +++++++++++-------- dts/framework/config/conf_yaml_schema.json | 47 ++++++++++---------- dts/framework/config/types.py | 21 ++++++--- dts/framework/testbed_model/cpu.py | 6 ++- dts/framework/testbed_model/linux_session.py | 5 +-- dts/framework/testbed_model/node.py | 26 +---------- dts/framework/testbed_model/os_session.py | 2 +- dts/framework/testbed_model/sut_node.py | 12 +++++ 9 files changed, 95 insertions(+), 89 deletions(-) diff --git a/dts/conf.yaml b/dts/conf.yaml index 7ca4c05b55..bb1fbc86e3 100644 --- a/dts/conf.yaml +++ b/dts/conf.yaml @@ -14,12 +14,11 @@ test_runs: test_suites: # the following test suites will be run in their entirety - hello_world - os_udp + vdevs: # optional; if removed, vdevs won't be used in the execution + - "crypto_openssl" # The machine running the DPDK test executable - system_under_test_node: - node_name: "SUT 1" - vdevs: # optional; if removed, vdevs won't be used in the test run - - "crypto_openssl" - # Traffic generator node to use for this test run + system_under_test_node: "SUT 1" + # Traffic generator node to use for this execution environment traffic_generator_node: "TG 1" nodes: # Define a system under test node, having two network ports physically @@ -28,11 +27,6 @@ nodes: hostname: sut1.change.me.localhost user: dtsuser os: linux - lcores: "" # use all available logical cores (Skips first core) - memory_channels: 4 # tells DPDK to use 4 memory channels - hugepages_2mb: # optional; if removed, will use system hugepage configuration - number_of: 256 - force_first_numa: false ports: # sets up the physical link between "SUT 1"@000:00:08.0 and "TG 1"@0000:00:08.0 - pci: "0000:00:08.0" @@ -46,6 +40,12 @@ nodes: os_driver: i40e peer_node: "TG 1" peer_pci: "0000:00:08.1" + hugepages_2mb: # optional; if removed, will use system hugepage configuration + number_of: 256 + force_first_numa: false + dpdk_config: + lcores: "" # use all available logical cores (Skips first core) + memory_channels: 4 # tells DPDK to use 4 memory channels # Define a Scapy traffic generator node, having two network ports # physically connected to the corresponding ports in SUT 1 (the peer node). - name: "TG 1" diff --git a/dts/framework/config/__init__.py b/dts/framework/config/__init__.py index 662b3070a1..ed1c979fb6 100644 --- a/dts/framework/config/__init__.py +++ b/dts/framework/config/__init__.py @@ -209,8 +209,6 @@ class NodeConfiguration: password: The password of the user. The use of passwords is heavily discouraged. Please use keys instead. os: The operating system of the :class:`~framework.testbed_model.node.Node`. - lcores: A comma delimited list of logical cores to use when running DPDK. - use_first_core: If :data:`True`, the first logical core won't be used. hugepages: An optional hugepage configuration. ports: The ports that can be used in testing. """ @@ -220,8 +218,6 @@ class NodeConfiguration: user: str password: str | None os: OS - lcores: str - use_first_core: bool hugepages: HugepageConfiguration | None ports: list[PortConfig] @@ -244,9 +240,6 @@ def from_dict( hugepage_config_dict["force_first_numa"] = False hugepage_config = HugepageConfiguration(**hugepage_config_dict) - lcores = "1" if "lcores" not in d else d["lcores"] if "any" not in d["lcores"] else "" - use_first_core = "0" in lcores - # The calls here contain duplicated code which is here because Mypy doesn't # properly support dictionary unpacking with TypedDicts if "traffic_generator" in d: @@ -256,36 +249,54 @@ def from_dict( user=d["user"], password=d.get("password"), os=OS(d["os"]), - lcores=lcores, - use_first_core=use_first_core, hugepages=hugepage_config, ports=[PortConfig.from_dict(d["name"], port) for port in d["ports"]], traffic_generator=TrafficGeneratorConfig.from_dict(d["traffic_generator"]), ) else: + dpdk_config = d["dpdk_config"] + dpdk_config["lcores"] = ( + "1" + if "lcores" not in dpdk_config + else dpdk_config["lcores"] + if "any" not in dpdk_config["lcores"] + else "" + ) + dpdk_config["memory_channels"] = dpdk_config.get("memory_channels", 1) return SutNodeConfiguration( name=d["name"], hostname=d["hostname"], user=d["user"], password=d.get("password"), os=OS(d["os"]), - lcores=lcores, - use_first_core=use_first_core, + dpdk_config=DPDKConfig(**dpdk_config), hugepages=hugepage_config, ports=[PortConfig.from_dict(d["name"], port) for port in d["ports"]], - memory_channels=d.get("memory_channels", 1), ) +@dataclass(slots=True, frozen=True) +class DPDKConfig: + """EAL parameters for executing and running DPDK. + + Attributes: + lcores: Logical cores to be used for DPDK execution. + memory_channels: Memory channels to be used for DPDK execution. + """ + + lcores: str + memory_channels: int + + @dataclass(slots=True, frozen=True) class SutNodeConfiguration(NodeConfiguration): """:class:`~framework.testbed_model.sut_node.SutNode` specific configuration. Attributes: - memory_channels: The number of memory channels to use when running DPDK. + dpdk_config: DPDK configuration attributes to be used during execution. """ - memory_channels: int + dpdk_config: DPDKConfig @dataclass(slots=True, frozen=True) @@ -450,7 +461,7 @@ def from_dict( map(BuildTargetConfiguration.from_dict, d["build_targets"]) ) test_suites: list[TestSuiteConfig] = list(map(TestSuiteConfig.from_dict, d["test_suites"])) - sut_name = d["system_under_test_node"]["node_name"] + sut_name = d["system_under_test_node"] skip_smoke_tests = d.get("skip_smoke_tests", False) assert sut_name in node_map, f"Unknown SUT {sut_name} in test run {d}" system_under_test_node = node_map[sut_name] @@ -465,9 +476,7 @@ def from_dict( traffic_generator_node, TGNodeConfiguration ), f"Invalid TG configuration {traffic_generator_node}" - vdevs = ( - d["system_under_test_node"]["vdevs"] if "vdevs" in d["system_under_test_node"] else [] - ) + vdevs = d["vdevs"] if "vdevs" in d else [] return cls( build_targets=build_targets, perf=d["perf"], diff --git a/dts/framework/config/conf_yaml_schema.json b/dts/framework/config/conf_yaml_schema.json index e65ea45058..b31f4d8dbe 100644 --- a/dts/framework/config/conf_yaml_schema.json +++ b/dts/framework/config/conf_yaml_schema.json @@ -150,14 +150,21 @@ "os": { "$ref": "#/definitions/OS" }, - "lcores": { - "type": "string", - "pattern": "^(([0-9]+|([0-9]+-[0-9]+))(,([0-9]+|([0-9]+-[0-9]+)))*)?$|any", - "description": "Optional comma-separated list of logical cores to use, e.g.: 1,2,3,4,5,18-22. Defaults to 1. An empty string means use all lcores." - }, - "memory_channels": { - "type": "integer", - "description": "How many memory channels to use. Optional, defaults to 1." + "dpdk_config": { + "type": "object", + "description": "EAL arguments for DPDK execution", + "properties": { + "lcores": { + "type": "string", + "pattern": "^(([0-9]+|([0-9]+-[0-9]+))(,([0-9]+|([0-9]+-[0-9]+)))*)?$|any", + "description": "Optional comma-separated list of logical cores to use, e.g.: 1,2,3,4,5,18-22. Defaults to 1. An empty string means use all lcores." + }, + "memory_channels": { + "type": "integer", + "description": "How many memory channels to use. Optional, defaults to 1." + } + }, + "minimum": 1 }, "hugepages_2mb": { "$ref": "#/definitions/hugepages_2mb" @@ -264,23 +271,15 @@ "description": "Optional field that allows you to skip smoke testing", "type": "boolean" }, + "vdevs": { + "description": "Optional list of names of vdevs to be used in execution", + "type": "array", + "items": { + "type": "string" + } + }, "system_under_test_node": { - "type":"object", - "properties": { - "node_name": { - "$ref": "#/definitions/node_name" - }, - "vdevs": { - "description": "Optional list of names of vdevs to be used in the test run", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "node_name" - ] + "$ref": "#/definitions/node_name" }, "traffic_generator_node": { "$ref": "#/definitions/node_name" diff --git a/dts/framework/config/types.py b/dts/framework/config/types.py index 9934fef503..004fc2b2d3 100644 --- a/dts/framework/config/types.py +++ b/dts/framework/config/types.py @@ -33,6 +33,15 @@ class TrafficGeneratorConfigDict(TypedDict): type: str +class DPDKConfigDict(TypedDict): + """Allowed keys and values.""" + + #: + memory_channels: int + #: + lcores: str + + class HugepageConfigurationDict(TypedDict): """Allowed keys and values.""" @@ -58,15 +67,11 @@ class NodeConfigDict(TypedDict): #: os: str #: - lcores: str - #: - use_first_core: bool - #: ports: list[PortConfigDict] #: - memory_channels: int - #: traffic_generator: TrafficGeneratorConfigDict + #: + dpdk_config: DPDKConfigDict class BuildTargetConfigDict(TypedDict): @@ -110,9 +115,11 @@ class TestRunConfigDict(TypedDict): #: test_suites: TestSuiteConfigDict #: - system_under_test_node: TestRunSUTConfigDict + system_under_test_node: str #: traffic_generator_node: str + #: + vdevs: list[str] class ConfigurationDict(TypedDict): diff --git a/dts/framework/testbed_model/cpu.py b/dts/framework/testbed_model/cpu.py index a50cf44c19..cc4ca40ad9 100644 --- a/dts/framework/testbed_model/cpu.py +++ b/dts/framework/testbed_model/cpu.py @@ -167,7 +167,6 @@ def __init__( # sorting by core is needed in case hyperthreading is enabled self._lcores_to_filter = sorted(lcore_list, key=lambda x: x.core, reverse=not ascending) - self.filter() @abstractmethod def filter(self) -> list[LogicalCore]: @@ -210,6 +209,8 @@ def filter(self) -> list[LogicalCore]: Returns: The filtered cores. """ + if 0 in self._lcores_to_filter: + self._lcores_to_filter = self._lcores_to_filter[1:] sockets_to_filter = self._filter_sockets(self._lcores_to_filter) filtered_lcores = [] for socket_to_filter in sockets_to_filter: @@ -328,6 +329,9 @@ def filter(self) -> list[LogicalCore]: Return: The filtered logical CPU cores. """ + if 0 not in self._filter_specifier.lcore_list: + self._lcores_to_filter = self._lcores_to_filter[1:] + if not len(self._filter_specifier.lcore_list): return self._lcores_to_filter diff --git a/dts/framework/testbed_model/linux_session.py b/dts/framework/testbed_model/linux_session.py index 99abc21353..347d01878c 100644 --- a/dts/framework/testbed_model/linux_session.py +++ b/dts/framework/testbed_model/linux_session.py @@ -68,15 +68,12 @@ class LinuxSession(PosixSession): def _get_privileged_command(command: str) -> str: return f"sudo -- sh -c '{command}'" - def get_remote_cpus(self, use_first_core: bool) -> list[LogicalCore]: + def get_remote_cpus(self) -> list[LogicalCore]: """Overrides :meth:`~.os_session.OSSession.get_remote_cpus`.""" cpu_info = self.send_command("lscpu -p=CPU,CORE,SOCKET,NODE|grep -v \\#").stdout lcores = [] for cpu_line in cpu_info.splitlines(): lcore, core, socket, node = map(int, cpu_line.split(",")) - if core == 0 and socket == 0 and not use_first_core: - self._logger.info("Not using the first physical core.") - continue lcores.append(LogicalCore(lcore, core, socket, node)) return lcores diff --git a/dts/framework/testbed_model/node.py b/dts/framework/testbed_model/node.py index 09399f4823..9630407247 100644 --- a/dts/framework/testbed_model/node.py +++ b/dts/framework/testbed_model/node.py @@ -22,13 +22,7 @@ from framework.logger import DTSLogger, get_dts_logger from framework.settings import SETTINGS -from .cpu import ( - LogicalCore, - LogicalCoreCount, - LogicalCoreList, - LogicalCoreListFilter, - lcore_filter, -) +from .cpu import LogicalCore, LogicalCoreCount, LogicalCoreList, lcore_filter from .linux_session import LinuxSession from .os_session import OSSession from .port import Port @@ -79,24 +73,8 @@ def __init__(self, node_config: NodeConfiguration): self._logger = get_dts_logger(self.name) self.main_session = create_session(self.config, self.name, self._logger) self.arch = Architecture(self.main_session.get_arch_info()) - self._logger.info(f"Connected to node: {self.name}") - self._get_remote_cpus() - # filter the node lcores according to the test run configuration - self.lcores = LogicalCoreListFilter( - self.lcores, LogicalCoreList(self.config.lcores) - ).filter() - - if LogicalCore(lcore=0, core=0, socket=0, node=0) in self.lcores: - self._logger.info( - """ - WARNING: First core being used; - using the first core is considered risky and should only - be done by advanced users. - """ - ) - self._other_sessions = [] self._init_ports() @@ -182,7 +160,7 @@ def filter_lcores( def _get_remote_cpus(self) -> None: """Scan CPUs in the remote OS and store a list of LogicalCores.""" self._logger.info("Getting CPU information.") - self.lcores = self.main_session.get_remote_cpus(self.config.use_first_core) + self.lcores = self.main_session.get_remote_cpus() def _setup_hugepages(self) -> None: """Setup hugepages on the node. diff --git a/dts/framework/testbed_model/os_session.py b/dts/framework/testbed_model/os_session.py index 02277eee1f..f217a40e7f 100644 --- a/dts/framework/testbed_model/os_session.py +++ b/dts/framework/testbed_model/os_session.py @@ -280,7 +280,7 @@ def get_dpdk_version(self, version_path: str | PurePath) -> str: """ @abstractmethod - def get_remote_cpus(self, use_first_core: bool) -> list[LogicalCore]: + def get_remote_cpus(self) -> list[LogicalCore]: r"""Get the list of :class:`~.cpu.LogicalCore`\s on the remote node. Args: diff --git a/dts/framework/testbed_model/sut_node.py b/dts/framework/testbed_model/sut_node.py index a4511157b7..178535b617 100644 --- a/dts/framework/testbed_model/sut_node.py +++ b/dts/framework/testbed_model/sut_node.py @@ -29,6 +29,7 @@ from framework.settings import SETTINGS from framework.utils import MesonArgs +from .cpu import LogicalCore, LogicalCoreList from .node import Node from .os_session import OSSession from .virtual_device import VirtualDevice @@ -75,6 +76,17 @@ def __init__(self, node_config: SutNodeConfiguration): node_config: The SUT node's test run configuration. """ super().__init__(node_config) + self.lcores = self.filter_lcores(LogicalCoreList(self.config.dpdk_config.lcores)) + if LogicalCore(lcore=0, core=0, socket=0, node=0) in self.lcores: + self._logger.info( + """ + WARNING: First core being used; + using the first core is considered risky and should only + be done by advanced users. + """ + ) + else: + self._logger.info("Not using first core") self.virtual_devices = [] self.dpdk_prefix_list = [] self._build_target_config = None From patchwork Fri Jul 5 18:33:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Pratte X-Patchwork-Id: 142168 X-Patchwork-Delegate: juraj.linkes@pantheon.tech Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 11F584559C; Fri, 5 Jul 2024 20:33:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0279A43283; Fri, 5 Jul 2024 20:33:13 +0200 (CEST) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by mails.dpdk.org (Postfix) with ESMTP id A572A43254 for ; Fri, 5 Jul 2024 20:33:11 +0200 (CEST) Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-79504120b7eso6846185a.1 for ; Fri, 05 Jul 2024 11:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1720204391; x=1720809191; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vdjUIA9jlPN9uHmFZnapa1ylQH8Y2+ogcYQultocLg0=; b=Uth8s5szCNAWtTIPdc3P8+2cJbyfLrtY8RlsJHmxZBTQkdMBNx2QbIfdqbc81Qo3B+ CYtKCkJc21lFdi+xqTK9TsmL8kvvNw2VzfPyIMMv4VgHSl9ogKrxbvZuQg7TEjPQNxUa gy9qoj+gT4kRL1NtNx2HDXh4GOCdwI0iybr44= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720204391; x=1720809191; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vdjUIA9jlPN9uHmFZnapa1ylQH8Y2+ogcYQultocLg0=; b=IVjbTSIgwCcPkPOrhmG6VqiJ7121rd4ujSnuj21VyxybHlHuKqhqt6QX8ygmVPtTOd UajQgWT+QTr6Wsg/KwmmEIZA/OJjiz/ksVGvZd5u8rIxOuARFhPOaQzsnG7oMAa8aEfr er5UoxBLXy9KhVfjuwzglyONQrM6/2vIwJxayQ1FY1Z5aQiQUoZQIVu2FZ8RRLsN6tCG DYEMDSoHqZraZnv+8nVxeoxIfDYFWuEAqJttFcaTwEolmCOy3Vp6FYhies8pUh3YwWam w4K9W10lXf4MxFHTpL0gqbNMuuNomvENXFSmlsKry7FRW2n2v4Av4FQMR+xg1FNZ93yO cRSg== X-Gm-Message-State: AOJu0YwoiGOlOCJVgZWQ/Y2IrL93Hvku/9k1jG+WOlzRZl1NCdAhPqvN QP2TIzDlg+3ZNvXUoDTPjMtXDEgOcJtTATFKylf3qeqc6kZ9XmDBDJAAViPn+dQ= X-Google-Smtp-Source: AGHT+IHkxERl+4cyYLfApqg1dRj33Yazv1WkQdE8h0YGcdYxXPAa9dAzbtAF2lMxbUEzcStjcHNnVg== X-Received: by 2002:ad4:594d:0:b0:6b5:e3ba:5256 with SMTP id 6a1803df08f44-6b5ed08c228mr55909526d6.3.1720204390915; Fri, 05 Jul 2024 11:33:10 -0700 (PDT) Received: from localhost.unh.edu ([2606:4100:3880:1257::1003]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b5d27a4b55sm37606326d6.106.2024.07.05.11.33.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 11:33:10 -0700 (PDT) From: Nicholas Pratte To: dmarx@iol.unh.edu, paul.szczepanek@arm.com, juraj.linkes@pantheon.tech, yoan.picchi@foss.arm.com, jspewock@iol.unh.edu, luca.vizzarro@arm.com, probb@iol.unh.edu, Honnappa.Nagarahalli@arm.com Cc: dev@dpdk.org, Nicholas Pratte Subject: [PATCH v2 5/6] dts: add conditional behavior for test suite Date: Fri, 5 Jul 2024 14:33:06 -0400 Message-ID: <20240705183306.31915-1-npratte@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240705171341.23894-2-npratte@iol.unh.edu> References: <20240705171341.23894-2-npratte@iol.unh.edu> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org There is some odd functionality/behavior in how the --test-suite parameters interacts in conjunction with the 'test_suites' attribute in the config file. If a user leaves an empty list underneath 'test_suites,' or if they negate the attribute entirely, even if said user adds test suites via the --test-suite parameter, a schema violation is thrown. This patch mitigates this, by removing the schema requirement if the user has indicated test suites within main.py parameters, allowing for the 'test_suites' attribute to be optional. Bugzilla ID: 1360 Signed-off-by: Nicholas Pratte --- dts/framework/config/__init__.py | 7 ++++++- dts/framework/runner.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dts/framework/config/__init__.py b/dts/framework/config/__init__.py index ed1c979fb6..82182b5c99 100644 --- a/dts/framework/config/__init__.py +++ b/dts/framework/config/__init__.py @@ -553,7 +553,7 @@ def from_dict(cls, d: ConfigurationDict) -> Self: return cls(test_runs=test_runs) -def load_config(config_file_path: Path) -> Configuration: +def load_config(config_file_path: Path, test_suites: list[TestSuiteConfig]) -> Configuration: """Load DTS test run configuration from a file. Load the YAML test run configuration file @@ -576,6 +576,11 @@ def load_config(config_file_path: Path) -> Configuration: with open(schema_path, "r") as f: schema = json.load(f) + if test_suites: + schema["properties"]["test_runs"]["items"]["required"].remove("test_suites") + for test_run in config_data["test_runs"]: + if not hasattr(test_run, "test_suites"): + test_run["test_suites"] = [] config = warlock.model_factory(schema, name="_Config")(config_data) config_obj: Configuration = Configuration.from_dict(dict(config)) # type: ignore[arg-type] return config_obj diff --git a/dts/framework/runner.py b/dts/framework/runner.py index 2a1019899a..edda5510af 100644 --- a/dts/framework/runner.py +++ b/dts/framework/runner.py @@ -85,7 +85,7 @@ class DTSRunner: def __init__(self): """Initialize the instance with configuration, logger, result and string constants.""" - self._configuration = load_config(SETTINGS.config_file_path) + self._configuration = load_config(SETTINGS.config_file_path, SETTINGS.test_suites) self._logger = get_dts_logger() if not os.path.exists(SETTINGS.output_dir): os.makedirs(SETTINGS.output_dir) From patchwork Fri Jul 5 18:33:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Pratte X-Patchwork-Id: 142169 X-Patchwork-Delegate: juraj.linkes@pantheon.tech Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 58D434559C; Fri, 5 Jul 2024 20:33:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 436E54325E; Fri, 5 Jul 2024 20:33:35 +0200 (CEST) Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) by mails.dpdk.org (Postfix) with ESMTP id 1FA28410FD for ; Fri, 5 Jul 2024 20:33:34 +0200 (CEST) Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-79d5ff2c4f2so4554385a.0 for ; Fri, 05 Jul 2024 11:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1720204413; x=1720809213; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wtf7OAoTgKEP0+bpw6Uu41Jvhsr2K6Wq0k8M1AlrZNM=; b=ejpQ4348RwLYVylx1xP1p/kkgDeYIIDSHJwaeQEa0n6fe50tLNbe4/ij7qJncxMfSt vTcYRQJ/eq5u0QTIKDsEXfLyMuR5kFw5Xz30Q1vfbvB6sW+XajrmFF/61NL5eTZ4ql/M mNfsPXHTPKn/vs8jNPDsgKRiJJgTZ7duoljSk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720204413; x=1720809213; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wtf7OAoTgKEP0+bpw6Uu41Jvhsr2K6Wq0k8M1AlrZNM=; b=gzFz5ev29W1RnTtk3nuRK550LSS3TiAO9xzUvw8dboWL8JUlyKlP9Nsgj5htEwLt+j S84KKOjjOoP9we/FN703jQKLknE+1tvJ0r0k02NQxf3S6RrL0ThhwsMm2ojlArUyWrep /O/s01dKgh2z2KqIuYxc1D6Y3w8Yxp5iFZCHqLNrvJQSOcExwQkDac7sITJ8Qoka2kfr /SpNlk3QR4m+QaUlx4B7F1UPRaDal4w1CXeJ4t8/1pjWyws8cNCNu9Qgi3s5duWwW90G AGFEDsg9gNUBkGGW9HUsttagdZ3MltTIMHQ5/tjoRHzoJXSzWNe4Ll5VPUif0pNnhXm7 YIcw== X-Gm-Message-State: AOJu0YwhwZlcUVXF01dqMZ2RQ0MfKKQmg//l/SYxHeMnvf5vlTKMSo/B S724qfMO1ZfgGdhUljIxc3LUwyM1O/agw99+p0Whmc3G+eyAtkPL84s7heDHFD8= X-Google-Smtp-Source: AGHT+IFnHvfQDLzRkxJaqVU+aQf7UifeWdyLYuipXsLtesRXmo2+ZpwChJgG1qCrxTkgQmSDug3mtw== X-Received: by 2002:a05:620a:2101:b0:79d:69b5:aaff with SMTP id af79cd13be357-79eee28ff06mr476777185a.6.1720204413475; Fri, 05 Jul 2024 11:33:33 -0700 (PDT) Received: from localhost.unh.edu ([2606:4100:3880:1257::1003]) by smtp.gmail.com with ESMTPSA id af79cd13be357-79d88a192f8sm579654385a.68.2024.07.05.11.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 11:33:32 -0700 (PDT) From: Nicholas Pratte To: dmarx@iol.unh.edu, paul.szczepanek@arm.com, juraj.linkes@pantheon.tech, yoan.picchi@foss.arm.com, jspewock@iol.unh.edu, luca.vizzarro@arm.com, probb@iol.unh.edu, Honnappa.Nagarahalli@arm.com Cc: dev@dpdk.org, Nicholas Pratte Subject: [PATCH v2 6/6] doc: dpdk documentation changes for new dts config Date: Fri, 5 Jul 2024 14:33:24 -0400 Message-ID: <20240705183325.32381-1-npratte@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240705171341.23894-2-npratte@iol.unh.edu> References: <20240705171341.23894-2-npratte@iol.unh.edu> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Adjusted DPDK documentation to reflect the changes made to the dts conf.yaml configuration file. Bugzilla ID: 1360 Signed-off-by: Nicholas Pratte --- doc/guides/tools/dts.rst | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/doc/guides/tools/dts.rst b/doc/guides/tools/dts.rst index 515b15e4d8..a64580e0de 100644 --- a/doc/guides/tools/dts.rst +++ b/doc/guides/tools/dts.rst @@ -437,14 +437,6 @@ _`Node name` *string* – A unique identifier for a node. **Examples**: ``SUT1``, ``TG1``. -_`ARCH` - *string* – The CPU architecture. - **Supported values**: ``x86_64``, ``arm64``, ``ppc64le``. - -_`CPU` - *string* – The CPU microarchitecture. Use ``native`` for x86. - **Supported values**: ``native``, ``armv8a``, ``dpaa2``, ``thunderx``, ``xgene1``. - _`OS` *string* – The operating system. **Supported values**: ``linux``. @@ -456,9 +448,6 @@ _`Build target` *mapping* – Build targets supported by DTS for building DPDK, described as: ==================== ================================================================= - ``arch`` See `ARCH`_ - ``os`` See `OS`_ - ``cpu`` See `CPU`_ ``compiler`` See `Compiler`_ ``compiler_wrapper`` *string* – Value prepended to the CC variable for the DPDK build. @@ -565,18 +554,15 @@ involved in the testing. These can be defined with the following mappings: | | | | | **NB**: Use only as last resort. SSH keys are **strongly** preferred. | +-----------------------+---------------------------------------------------------------------------------------+ - | ``arch`` | The architecture of this node. See `ARCH`_ for supported values. | - +-----------------------+---------------------------------------------------------------------------------------+ | ``os`` | The operating system of this node. See `OS`_ for supported values. | +-----------------------+---------------------------------------------------------------------------------------+ - | ``lcores`` | | (*optional*, defaults to 1) *string* – Comma-separated list of logical | - | | | cores to use. An empty string means use all lcores. | - | | | - | | **Example**: ``1,2,3,4,5,18-22`` | + | ``dpdk_config`` | Configuration relating to DPDK (to be specified on SUT Nodes) | +-----------------------+---------------------------------------------------------------------------------------+ - | ``use_first_core`` | (*optional*, defaults to ``false``) *boolean* | + | ``lcores`` | | (*optional*, defaults to 1 if not used) *string* – Comma-separated list of logical | + | | | cores to use. An empty string means use all lcores except core 0. core 0 is used | + | | | only when explicitly specified | | | | - | | Indicates whether DPDK should use only the first physical core or not. | + | | **Example**: ``1,2,3,4,5,18-22`` | +-----------------------+---------------------------------------------------------------------------------------+ | ``memory_channels`` | (*optional*, defaults to 1) *integer* | | | | @@ -617,4 +603,4 @@ And they both have two network ports which are physically connected to each othe .. literalinclude:: ../../../dts/conf.yaml :language: yaml - :start-at: test_runs: + :start-at: test_runs: \ No newline at end of file