* [PATCH v2] dts: port speed capabilities test suite to next DTS
2026-02-25 18:26 [PATCH v1] dts: port speed capabilities test suite to next DTS Andrew Bailey
@ 2026-02-25 18:33 ` Andrew Bailey
2026-03-09 17:36 ` Patrick Robb
2026-03-09 17:57 ` [PATCH v4] " Andrew Bailey
` (4 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Andrew Bailey @ 2026-02-25 18:33 UTC (permalink / raw)
To: probb; +Cc: luca.vizzarro, dmarx, dev, Andrew Bailey
This commit ports the speed capabilities test suite from old DTS to next
DTS.
Bugzilla ID: 1494
Signed-off-by: Andrew Bailey <abailey@iol.unh.edu>
---
.../tests.TestSuite_speed_capabilities.rst | 8 +++
dts/configurations/tests_config.example.yaml | 4 ++
dts/tests/TestSuite_speed_capabilities.py | 54 +++++++++++++++++++
3 files changed, 66 insertions(+)
create mode 100644 doc/api/dts/tests.TestSuite_speed_capabilities.rst
create mode 100644 dts/tests/TestSuite_speed_capabilities.py
diff --git a/doc/api/dts/tests.TestSuite_speed_capabilities.rst b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
new file mode 100644
index 0000000000..de6dc42757
--- /dev/null
+++ b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
@@ -0,0 +1,8 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+
+speed_capabilities Test Suite
+=============================
+
+.. automodule:: tests.TestSuite_speed_capabilities
+ :members:
+ :show-inheritance:
diff --git a/dts/configurations/tests_config.example.yaml b/dts/configurations/tests_config.example.yaml
index 64fa630aa0..bdc4c49a1c 100644
--- a/dts/configurations/tests_config.example.yaml
+++ b/dts/configurations/tests_config.example.yaml
@@ -15,3 +15,7 @@ hello_world:
# num_descriptors: 1024
# expected_mpps: 1.0
# delta_tolerance: 0.05
+# port_speed_capabilities:
+# test_parameters:
+# 0 : 100 Gbps # set link speed according to your expected speed in Gbps
+# 1 : 100 Gbps
\ No newline at end of file
diff --git a/dts/tests/TestSuite_speed_capabilities.py b/dts/tests/TestSuite_speed_capabilities.py
new file mode 100644
index 0000000000..9ab488ab1b
--- /dev/null
+++ b/dts/tests/TestSuite_speed_capabilities.py
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2026 University of New Hampshire
+
+"""Speed capability test suite.
+
+This test suite ensures that testpmd recognizes the expected speed from a link in Gbps.
+"""
+
+from typing import Literal
+
+from api.capabilities import (
+ LinkTopology,
+ requires_link_topology,
+)
+from api.test import verify
+from api.testpmd import TestPmd
+from framework.test_suite import BaseConfig, TestSuite, func_test
+
+
+class Config(BaseConfig):
+ """Performance test metrics."""
+
+ test_parameters: dict[int, Literal["1 Gbps", "10 Gbps", "25 Gbps", "40 Gbps", "100 Gbps"]] = {
+ 0: "100 Gbps",
+ }
+
+
+@requires_link_topology(LinkTopology.ONE_LINK)
+class TestSpeedCapabilities(TestSuite):
+ """Speed capabilities test suite."""
+
+ config: Config
+
+ def set_up_suite(self):
+ """Set up the test suite."""
+ self.test_parameters = self.config.test_parameters
+
+ @func_test
+ def validate_port_speed(self) -> None:
+ """Validate expected port speed is also the observed port speed.
+
+ Steps:
+ * Show port info for each available port
+
+ Verify:
+ * The resulting link speeds are equal to the configured link speeds
+ """
+ with TestPmd() as testpmd:
+ for i, param in enumerate(self.test_parameters.items()):
+ link_speed = testpmd.show_port_info(i).link_speed
+ verify(
+ link_speed == param[1],
+ f"port {i} speed {link_speed} does not match configured '{param[1]}'",
+ )
--
2.50.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v2] dts: port speed capabilities test suite to next DTS
2026-02-25 18:33 ` [PATCH v2] " Andrew Bailey
@ 2026-03-09 17:36 ` Patrick Robb
0 siblings, 0 replies; 10+ messages in thread
From: Patrick Robb @ 2026-03-09 17:36 UTC (permalink / raw)
To: Andrew Bailey; +Cc: luca.vizzarro, dmarx, dev
On Wed, Feb 25, 2026 at 1:33 PM Andrew Bailey <abailey@iol.unh.edu> wrote:
>
> This commit ports the speed capabilities test suite from old DTS to next
> DTS.
>
> Bugzilla ID: 1494
>
> Signed-off-by: Andrew Bailey <abailey@iol.unh.edu>
> ---
> .../tests.TestSuite_speed_capabilities.rst | 8 +++
> dts/configurations/tests_config.example.yaml | 4 ++
> dts/tests/TestSuite_speed_capabilities.py | 54 +++++++++++++++++++
> 3 files changed, 66 insertions(+)
> create mode 100644 doc/api/dts/tests.TestSuite_speed_capabilities.rst
> create mode 100644 dts/tests/TestSuite_speed_capabilities.py
>
> diff --git a/doc/api/dts/tests.TestSuite_speed_capabilities.rst b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
> new file mode 100644
> index 0000000000..de6dc42757
> --- /dev/null
> +++ b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
> @@ -0,0 +1,8 @@
> +.. SPDX-License-Identifier: BSD-3-Clause
> +
> +speed_capabilities Test Suite
> +=============================
> +
> +.. automodule:: tests.TestSuite_speed_capabilities
> + :members:
> + :show-inheritance:
> diff --git a/dts/configurations/tests_config.example.yaml b/dts/configurations/tests_config.example.yaml
> index 64fa630aa0..bdc4c49a1c 100644
> --- a/dts/configurations/tests_config.example.yaml
> +++ b/dts/configurations/tests_config.example.yaml
> @@ -15,3 +15,7 @@ hello_world:
> # num_descriptors: 1024
> # expected_mpps: 1.0
> # delta_tolerance: 0.05
> +# port_speed_capabilities:
> +# test_parameters:
> +# 0 : 100 Gbps # set link speed according to your expected speed in Gbps
> +# 1 : 100 Gbps
Can you add a comment indicating that the keys are in reference to the
port number?
> \ No newline at end of file
> diff --git a/dts/tests/TestSuite_speed_capabilities.py b/dts/tests/TestSuite_speed_capabilities.py
> new file mode 100644
> index 0000000000..9ab488ab1b
> --- /dev/null
> +++ b/dts/tests/TestSuite_speed_capabilities.py
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright(c) 2026 University of New Hampshire
> +
> +"""Speed capability test suite.
> +
> +This test suite ensures that testpmd recognizes the expected speed from a link in Gbps.
> +"""
> +
> +from typing import Literal
> +
> +from api.capabilities import (
> + LinkTopology,
> + requires_link_topology,
> +)
> +from api.test import verify
> +from api.testpmd import TestPmd
> +from framework.test_suite import BaseConfig, TestSuite, func_test
> +
> +
> +class Config(BaseConfig):
> + """Performance test metrics."""
> +
> + test_parameters: dict[int, Literal["1 Gbps", "10 Gbps", "25 Gbps", "40 Gbps", "100 Gbps"]] = {
Add 200 Gbps, 400, 800, 1600
> + 0: "100 Gbps",
> + }
> +
> +
> +@requires_link_topology(LinkTopology.ONE_LINK)
> +class TestSpeedCapabilities(TestSuite):
> + """Speed capabilities test suite."""
> +
> + config: Config
> +
> + def set_up_suite(self):
> + """Set up the test suite."""
> + self.test_parameters = self.config.test_parameters
> +
> + @func_test
> + def validate_port_speed(self) -> None:
> + """Validate expected port speed is also the observed port speed.
> +
> + Steps:
> + * Show port info for each available port
> +
> + Verify:
> + * The resulting link speeds are equal to the configured link speeds
> + """
> + with TestPmd() as testpmd:
> + for i, param in enumerate(self.test_parameters.items()):
> + link_speed = testpmd.show_port_info(i).link_speed
> + verify(
> + link_speed == param[1],
> + f"port {i} speed {link_speed} does not match configured '{param[1]}'",
> + )
> --
> 2.50.1
>
Reviewed-by: Patrick Robb <probb@iol.unh.edu>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4] dts: port speed capabilities test suite to next DTS
2026-02-25 18:26 [PATCH v1] dts: port speed capabilities test suite to next DTS Andrew Bailey
2026-02-25 18:33 ` [PATCH v2] " Andrew Bailey
@ 2026-03-09 17:57 ` Andrew Bailey
2026-03-09 18:08 ` [PATCH v5] " Andrew Bailey
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Andrew Bailey @ 2026-03-09 17:57 UTC (permalink / raw)
To: probb; +Cc: luca.vizzarro, dev, dmarx, Andrew Bailey
This commit ports the speed capabilities test suite from old DTS to next
DTS.
Bugzilla ID: 1494
Signed-off-by: Andrew Bailey <abailey@iol.unh.edu>
---
.../tests.TestSuite_speed_capabilities.rst | 8 +++
dts/configurations/tests_config.example.yaml | 6 +-
dts/tests/TestSuite_speed_capabilities.py | 67 +++++++++++++++++++
3 files changed, 80 insertions(+), 1 deletion(-)
create mode 100644 doc/api/dts/tests.TestSuite_speed_capabilities.rst
create mode 100644 dts/tests/TestSuite_speed_capabilities.py
diff --git a/doc/api/dts/tests.TestSuite_speed_capabilities.rst b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
new file mode 100644
index 0000000000..de6dc42757
--- /dev/null
+++ b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
@@ -0,0 +1,8 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+
+speed_capabilities Test Suite
+=============================
+
+.. automodule:: tests.TestSuite_speed_capabilities
+ :members:
+ :show-inheritance:
diff --git a/dts/configurations/tests_config.example.yaml b/dts/configurations/tests_config.example.yaml
index 209d7dd393..82f0c312c4 100644
--- a/dts/configurations/tests_config.example.yaml
+++ b/dts/configurations/tests_config.example.yaml
@@ -29,4 +29,8 @@ hello_world:
# - buff_size: 64
# Gbps: 2.0 # Set gigabits per second according to your devices throughput for this given buffer size
# - buff_size: 512
-# Gbps: 20.0
\ No newline at end of file
+# Gbps: 20.0
+# port_speed_capabilities:
+# test_parameters:
+# 0 : 100 Gbps # Assign an expected link speed to a port ID in Gbps
+# 1 : 100 Gbps
\ No newline at end of file
diff --git a/dts/tests/TestSuite_speed_capabilities.py b/dts/tests/TestSuite_speed_capabilities.py
new file mode 100644
index 0000000000..5eeb4095b7
--- /dev/null
+++ b/dts/tests/TestSuite_speed_capabilities.py
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2026 University of New Hampshire
+
+"""Speed capability test suite.
+
+This test suite ensures that testpmd recognizes the expected speed from a link in Gbps.
+"""
+
+from typing import Literal
+
+from api.capabilities import (
+ LinkTopology,
+ requires_link_topology,
+)
+from api.test import verify
+from api.testpmd import TestPmd
+from framework.test_suite import BaseConfig, TestSuite, func_test
+
+
+class Config(BaseConfig):
+ """Performance test metrics."""
+
+ test_parameters: dict[
+ int,
+ Literal[
+ "1 Gbps",
+ "10 Gbps",
+ "25 Gbps",
+ "40 Gbps",
+ "100 Gbps",
+ "200 Gbps",
+ "400 Gbps",
+ "800 Gbps",
+ "1600 Gbps",
+ ],
+ ] = {
+ 0: "100 Gbps",
+ }
+
+
+@requires_link_topology(LinkTopology.ONE_LINK)
+class TestSpeedCapabilities(TestSuite):
+ """Speed capabilities test suite."""
+
+ config: Config
+
+ def set_up_suite(self):
+ """Set up the test suite."""
+ self.test_parameters = self.config.test_parameters
+
+ @func_test
+ def validate_port_speed(self) -> None:
+ """Validate expected port speed is also the observed port speed.
+
+ Steps:
+ * Show port info for each available port
+
+ Verify:
+ * The resulting link speeds are equal to the configured link speeds
+ """
+ with TestPmd() as testpmd:
+ for i, param in enumerate(self.test_parameters.items()):
+ link_speed = testpmd.show_port_info(i).link_speed
+ verify(
+ link_speed == param[1],
+ f"port {i} speed {link_speed} does not match configured '{param[1]}'",
+ )
--
2.50.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v5] dts: port speed capabilities test suite to next DTS
2026-02-25 18:26 [PATCH v1] dts: port speed capabilities test suite to next DTS Andrew Bailey
2026-02-25 18:33 ` [PATCH v2] " Andrew Bailey
2026-03-09 17:57 ` [PATCH v4] " Andrew Bailey
@ 2026-03-09 18:08 ` Andrew Bailey
2026-03-09 20:29 ` [PATCH v6] " Andrew Bailey
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Andrew Bailey @ 2026-03-09 18:08 UTC (permalink / raw)
To: probb; +Cc: dev, Andrew Bailey
This commit ports the speed capabilities test suite from old DTS to next
DTS.
Bugzilla ID: 1494
Signed-off-by: Andrew Bailey <abailey@iol.unh.edu>
---
.../tests.TestSuite_speed_capabilities.rst | 8 +++
dts/configurations/tests_config.example.yaml | 6 +-
dts/tests/TestSuite_speed_capabilities.py | 67 +++++++++++++++++++
3 files changed, 80 insertions(+), 1 deletion(-)
create mode 100644 doc/api/dts/tests.TestSuite_speed_capabilities.rst
create mode 100644 dts/tests/TestSuite_speed_capabilities.py
diff --git a/doc/api/dts/tests.TestSuite_speed_capabilities.rst b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
new file mode 100644
index 0000000000..de6dc42757
--- /dev/null
+++ b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
@@ -0,0 +1,8 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+
+speed_capabilities Test Suite
+=============================
+
+.. automodule:: tests.TestSuite_speed_capabilities
+ :members:
+ :show-inheritance:
diff --git a/dts/configurations/tests_config.example.yaml b/dts/configurations/tests_config.example.yaml
index 209d7dd393..a41e65f2b4 100644
--- a/dts/configurations/tests_config.example.yaml
+++ b/dts/configurations/tests_config.example.yaml
@@ -29,4 +29,8 @@ hello_world:
# - buff_size: 64
# Gbps: 2.0 # Set gigabits per second according to your devices throughput for this given buffer size
# - buff_size: 512
-# Gbps: 20.0
\ No newline at end of file
+# Gbps: 20.0
+# port_speed_capabilities:
+# test_parameters:
+# 0 : 100 Gbps # Assign an expected link speed to a port ID in Gbps
+# 1 : 100 Gbps
\ No newline at end of file
diff --git a/dts/tests/TestSuite_speed_capabilities.py b/dts/tests/TestSuite_speed_capabilities.py
new file mode 100644
index 0000000000..5eeb4095b7
--- /dev/null
+++ b/dts/tests/TestSuite_speed_capabilities.py
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2026 University of New Hampshire
+
+"""Speed capability test suite.
+
+This test suite ensures that testpmd recognizes the expected speed from a link in Gbps.
+"""
+
+from typing import Literal
+
+from api.capabilities import (
+ LinkTopology,
+ requires_link_topology,
+)
+from api.test import verify
+from api.testpmd import TestPmd
+from framework.test_suite import BaseConfig, TestSuite, func_test
+
+
+class Config(BaseConfig):
+ """Performance test metrics."""
+
+ test_parameters: dict[
+ int,
+ Literal[
+ "1 Gbps",
+ "10 Gbps",
+ "25 Gbps",
+ "40 Gbps",
+ "100 Gbps",
+ "200 Gbps",
+ "400 Gbps",
+ "800 Gbps",
+ "1600 Gbps",
+ ],
+ ] = {
+ 0: "100 Gbps",
+ }
+
+
+@requires_link_topology(LinkTopology.ONE_LINK)
+class TestSpeedCapabilities(TestSuite):
+ """Speed capabilities test suite."""
+
+ config: Config
+
+ def set_up_suite(self):
+ """Set up the test suite."""
+ self.test_parameters = self.config.test_parameters
+
+ @func_test
+ def validate_port_speed(self) -> None:
+ """Validate expected port speed is also the observed port speed.
+
+ Steps:
+ * Show port info for each available port
+
+ Verify:
+ * The resulting link speeds are equal to the configured link speeds
+ """
+ with TestPmd() as testpmd:
+ for i, param in enumerate(self.test_parameters.items()):
+ link_speed = testpmd.show_port_info(i).link_speed
+ verify(
+ link_speed == param[1],
+ f"port {i} speed {link_speed} does not match configured '{param[1]}'",
+ )
--
2.50.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v6] dts: port speed capabilities test suite to next DTS
2026-02-25 18:26 [PATCH v1] dts: port speed capabilities test suite to next DTS Andrew Bailey
` (2 preceding siblings ...)
2026-03-09 18:08 ` [PATCH v5] " Andrew Bailey
@ 2026-03-09 20:29 ` Andrew Bailey
2026-03-10 19:05 ` Patrick Robb
2026-03-12 16:48 ` [PATCH v7] " Andrew Bailey
2026-03-12 18:53 ` [PATCH v8] " Andrew Bailey
5 siblings, 1 reply; 10+ messages in thread
From: Andrew Bailey @ 2026-03-09 20:29 UTC (permalink / raw)
To: probb; +Cc: dev, dmarx, Andrew Bailey
This commit ports the speed capabilities test suite from old DTS to next
DTS.
Bugzilla ID: 1494
Signed-off-by: Andrew Bailey <abailey@iol.unh.edu>
---
.../tests.TestSuite_speed_capabilities.rst | 8 +++
dts/configurations/tests_config.example.yaml | 6 +-
dts/tests/TestSuite_speed_capabilities.py | 67 +++++++++++++++++++
3 files changed, 80 insertions(+), 1 deletion(-)
create mode 100644 doc/api/dts/tests.TestSuite_speed_capabilities.rst
create mode 100644 dts/tests/TestSuite_speed_capabilities.py
diff --git a/doc/api/dts/tests.TestSuite_speed_capabilities.rst b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
new file mode 100644
index 0000000000..de6dc42757
--- /dev/null
+++ b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
@@ -0,0 +1,8 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+
+speed_capabilities Test Suite
+=============================
+
+.. automodule:: tests.TestSuite_speed_capabilities
+ :members:
+ :show-inheritance:
diff --git a/dts/configurations/tests_config.example.yaml b/dts/configurations/tests_config.example.yaml
index 209d7dd393..a41e65f2b4 100644
--- a/dts/configurations/tests_config.example.yaml
+++ b/dts/configurations/tests_config.example.yaml
@@ -29,4 +29,8 @@ hello_world:
# - buff_size: 64
# Gbps: 2.0 # Set gigabits per second according to your devices throughput for this given buffer size
# - buff_size: 512
-# Gbps: 20.0
\ No newline at end of file
+# Gbps: 20.0
+# port_speed_capabilities:
+# test_parameters:
+# 0 : 100 Gbps # Assign an expected link speed to a port ID in Gbps
+# 1 : 100 Gbps
\ No newline at end of file
diff --git a/dts/tests/TestSuite_speed_capabilities.py b/dts/tests/TestSuite_speed_capabilities.py
new file mode 100644
index 0000000000..7b63a3ead1
--- /dev/null
+++ b/dts/tests/TestSuite_speed_capabilities.py
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2026 University of New Hampshire
+
+"""Speed capability test suite.
+
+This test suite ensures that testpmd recognizes the expected speed from a link in Gbps.
+"""
+
+from typing import Literal
+
+from api.capabilities import (
+ LinkTopology,
+ requires_link_topology,
+)
+from api.test import verify
+from api.testpmd import TestPmd
+from framework.test_suite import BaseConfig, TestSuite, func_test
+
+
+class Config(BaseConfig):
+ """Performance test metrics."""
+
+ test_parameters: dict[
+ int,
+ Literal[
+ "1 Gbps",
+ "10 Gbps",
+ "25 Gbps",
+ "40 Gbps",
+ "100 Gbps",
+ "200 Gbps",
+ "400 Gbps",
+ "800 Gbps",
+ "1600 Gbps",
+ ],
+ ] = {
+ 0: "100 Gbps",
+ }
+
+
+@requires_link_topology(LinkTopology.ONE_LINK)
+class TestSpeedCapabilities(TestSuite):
+ """Speed capabilities test suite."""
+
+ config: Config
+
+ def set_up_suite(self):
+ """Set up the test suite."""
+ self.test_parameters = self.config.test_parameters
+
+ @func_test
+ def validate_port_speed(self) -> None:
+ """Validate expected port speed is also the observed port speed.
+
+ Steps:
+ * Show port info for each available port
+
+ Verify:
+ * The resulting link speeds are equal to the configured link speeds
+ """
+ with TestPmd() as testpmd:
+ for k, v in self.test_parameters:
+ link_speed = testpmd.show_port_info(k).link_speed
+ verify(
+ link_speed == v,
+ f"port {k} speed {link_speed} does not match configured '{v}'",
+ )
--
2.50.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v6] dts: port speed capabilities test suite to next DTS
2026-03-09 20:29 ` [PATCH v6] " Andrew Bailey
@ 2026-03-10 19:05 ` Patrick Robb
0 siblings, 0 replies; 10+ messages in thread
From: Patrick Robb @ 2026-03-10 19:05 UTC (permalink / raw)
To: Andrew Bailey; +Cc: dev, dmarx
On Mon, Mar 9, 2026 at 4:29 PM Andrew Bailey <abailey@iol.unh.edu> wrote:
>
> +
> +@requires_link_topology(LinkTopology.ONE_LINK)
> +class TestSpeedCapabilities(TestSuite):
> + """Speed capabilities test suite."""
> +
> + config: Config
> +
> + def set_up_suite(self):
> + """Set up the test suite."""
> + self.test_parameters = self.config.test_parameters
> +
> + @func_test
> + def validate_port_speed(self) -> None:
> + """Validate expected port speed is also the observed port speed.
> +
> + Steps:
> + * Show port info for each available port
> +
> + Verify:
> + * The resulting link speeds are equal to the configured link speeds
> + """
> + with TestPmd() as testpmd:
> + for k, v in self.test_parameters:
Looks good except you do actually need self.test_parameters.items()
(contrary to what I said yesterday)...
> + link_speed = testpmd.show_port_info(k).link_speed
> + verify(
> + link_speed == v,
> + f"port {k} speed {link_speed} does not match configured '{v}'",
> + )
> --
> 2.50.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v7] dts: port speed capabilities test suite to next DTS
2026-02-25 18:26 [PATCH v1] dts: port speed capabilities test suite to next DTS Andrew Bailey
` (3 preceding siblings ...)
2026-03-09 20:29 ` [PATCH v6] " Andrew Bailey
@ 2026-03-12 16:48 ` Andrew Bailey
2026-03-12 18:53 ` [PATCH v8] " Andrew Bailey
5 siblings, 0 replies; 10+ messages in thread
From: Andrew Bailey @ 2026-03-12 16:48 UTC (permalink / raw)
To: probb; +Cc: luca.vizzarro, dev, dmarx, Andrew Bailey
This commit ports the speed capabilities test suite from old DTS to next
DTS.
Bugzilla ID: 1494
Signed-off-by: Andrew Bailey <abailey@iol.unh.edu>
---
.../tests.TestSuite_speed_capabilities.rst | 8 +++
dts/configurations/tests_config.example.yaml | 6 +-
dts/tests/TestSuite_speed_capabilities.py | 67 +++++++++++++++++++
3 files changed, 80 insertions(+), 1 deletion(-)
create mode 100644 doc/api/dts/tests.TestSuite_speed_capabilities.rst
create mode 100644 dts/tests/TestSuite_speed_capabilities.py
diff --git a/doc/api/dts/tests.TestSuite_speed_capabilities.rst b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
new file mode 100644
index 0000000000..de6dc42757
--- /dev/null
+++ b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
@@ -0,0 +1,8 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+
+speed_capabilities Test Suite
+=============================
+
+.. automodule:: tests.TestSuite_speed_capabilities
+ :members:
+ :show-inheritance:
diff --git a/dts/configurations/tests_config.example.yaml b/dts/configurations/tests_config.example.yaml
index 209d7dd393..a41e65f2b4 100644
--- a/dts/configurations/tests_config.example.yaml
+++ b/dts/configurations/tests_config.example.yaml
@@ -29,4 +29,8 @@ hello_world:
# - buff_size: 64
# Gbps: 2.0 # Set gigabits per second according to your devices throughput for this given buffer size
# - buff_size: 512
-# Gbps: 20.0
\ No newline at end of file
+# Gbps: 20.0
+# port_speed_capabilities:
+# test_parameters:
+# 0 : 100 Gbps # Assign an expected link speed to a port ID in Gbps
+# 1 : 100 Gbps
\ No newline at end of file
diff --git a/dts/tests/TestSuite_speed_capabilities.py b/dts/tests/TestSuite_speed_capabilities.py
new file mode 100644
index 0000000000..9cbd6f1ef7
--- /dev/null
+++ b/dts/tests/TestSuite_speed_capabilities.py
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2026 University of New Hampshire
+
+"""Speed capability test suite.
+
+This test suite ensures that testpmd recognizes the expected speed from a link in Gbps.
+"""
+
+from typing import Literal
+
+from api.capabilities import (
+ LinkTopology,
+ requires_link_topology,
+)
+from api.test import verify
+from api.testpmd import TestPmd
+from framework.test_suite import BaseConfig, TestSuite, func_test
+
+
+class Config(BaseConfig):
+ """Performance test metrics."""
+
+ test_parameters: dict[
+ int,
+ Literal[
+ "1 Gbps",
+ "10 Gbps",
+ "25 Gbps",
+ "40 Gbps",
+ "100 Gbps",
+ "200 Gbps",
+ "400 Gbps",
+ "800 Gbps",
+ "1600 Gbps",
+ ],
+ ] = {
+ 0: "100 Gbps",
+ }
+
+
+@requires_link_topology(LinkTopology.ONE_LINK)
+class TestSpeedCapabilities(TestSuite):
+ """Speed capabilities test suite."""
+
+ config: Config
+
+ def set_up_suite(self):
+ """Set up the test suite."""
+ self.test_parameters = self.config.test_parameters
+
+ @func_test
+ def validate_port_speed(self) -> None:
+ """Validate expected port speed is also the observed port speed.
+
+ Steps:
+ * Show port info for each available port
+
+ Verify:
+ * The resulting link speeds are equal to the configured link speeds
+ """
+ with TestPmd() as testpmd:
+ for k, v in self.test_parameters.items():
+ link_speed = testpmd.show_port_info(k).link_speed
+ verify(
+ link_speed == v,
+ f"port {k} speed {link_speed} does not match configured '{v}'",
+ )
--
2.50.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v8] dts: port speed capabilities test suite to next DTS
2026-02-25 18:26 [PATCH v1] dts: port speed capabilities test suite to next DTS Andrew Bailey
` (4 preceding siblings ...)
2026-03-12 16:48 ` [PATCH v7] " Andrew Bailey
@ 2026-03-12 18:53 ` Andrew Bailey
2026-04-10 14:32 ` Andrew Bailey
5 siblings, 1 reply; 10+ messages in thread
From: Andrew Bailey @ 2026-03-12 18:53 UTC (permalink / raw)
To: probb; +Cc: dmarx, luca.vizzarro, dev, Andrew Bailey
This commit ports the speed capabilities test suite from old DTS to next
DTS.
Bugzilla ID: 1494
Signed-off-by: Andrew Bailey <abailey@iol.unh.edu>
---
.../tests.TestSuite_speed_capabilities.rst | 8 +++
dts/configurations/tests_config.example.yaml | 6 +-
dts/tests/TestSuite_speed_capabilities.py | 67 +++++++++++++++++++
3 files changed, 80 insertions(+), 1 deletion(-)
create mode 100644 doc/api/dts/tests.TestSuite_speed_capabilities.rst
create mode 100644 dts/tests/TestSuite_speed_capabilities.py
diff --git a/doc/api/dts/tests.TestSuite_speed_capabilities.rst b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
new file mode 100644
index 0000000000..de6dc42757
--- /dev/null
+++ b/doc/api/dts/tests.TestSuite_speed_capabilities.rst
@@ -0,0 +1,8 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+
+speed_capabilities Test Suite
+=============================
+
+.. automodule:: tests.TestSuite_speed_capabilities
+ :members:
+ :show-inheritance:
diff --git a/dts/configurations/tests_config.example.yaml b/dts/configurations/tests_config.example.yaml
index 209d7dd393..a41e65f2b4 100644
--- a/dts/configurations/tests_config.example.yaml
+++ b/dts/configurations/tests_config.example.yaml
@@ -29,4 +29,8 @@ hello_world:
# - buff_size: 64
# Gbps: 2.0 # Set gigabits per second according to your devices throughput for this given buffer size
# - buff_size: 512
-# Gbps: 20.0
\ No newline at end of file
+# Gbps: 20.0
+# port_speed_capabilities:
+# test_parameters:
+# 0 : 100 Gbps # Assign an expected link speed to a port ID in Gbps
+# 1 : 100 Gbps
\ No newline at end of file
diff --git a/dts/tests/TestSuite_speed_capabilities.py b/dts/tests/TestSuite_speed_capabilities.py
new file mode 100644
index 0000000000..9cbd6f1ef7
--- /dev/null
+++ b/dts/tests/TestSuite_speed_capabilities.py
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2026 University of New Hampshire
+
+"""Speed capability test suite.
+
+This test suite ensures that testpmd recognizes the expected speed from a link in Gbps.
+"""
+
+from typing import Literal
+
+from api.capabilities import (
+ LinkTopology,
+ requires_link_topology,
+)
+from api.test import verify
+from api.testpmd import TestPmd
+from framework.test_suite import BaseConfig, TestSuite, func_test
+
+
+class Config(BaseConfig):
+ """Performance test metrics."""
+
+ test_parameters: dict[
+ int,
+ Literal[
+ "1 Gbps",
+ "10 Gbps",
+ "25 Gbps",
+ "40 Gbps",
+ "100 Gbps",
+ "200 Gbps",
+ "400 Gbps",
+ "800 Gbps",
+ "1600 Gbps",
+ ],
+ ] = {
+ 0: "100 Gbps",
+ }
+
+
+@requires_link_topology(LinkTopology.ONE_LINK)
+class TestSpeedCapabilities(TestSuite):
+ """Speed capabilities test suite."""
+
+ config: Config
+
+ def set_up_suite(self):
+ """Set up the test suite."""
+ self.test_parameters = self.config.test_parameters
+
+ @func_test
+ def validate_port_speed(self) -> None:
+ """Validate expected port speed is also the observed port speed.
+
+ Steps:
+ * Show port info for each available port
+
+ Verify:
+ * The resulting link speeds are equal to the configured link speeds
+ """
+ with TestPmd() as testpmd:
+ for k, v in self.test_parameters.items():
+ link_speed = testpmd.show_port_info(k).link_speed
+ verify(
+ link_speed == v,
+ f"port {k} speed {link_speed} does not match configured '{v}'",
+ )
--
2.50.1
^ permalink raw reply related [flat|nested] 10+ messages in thread