From: Andrew Bailey <abailey@iol.unh.edu>
To: luca.vizzarro@arm.com, probb@iol.unh.edu, dev@dpdk.org
Cc: dmarx@iol.unh.edu, Andrew Bailey <abailey@iol.unh.edu>
Subject: [PATCH v2 4/5] dts: add crypto test decorator
Date: Tue, 10 Feb 2026 14:34:47 -0500 [thread overview]
Message-ID: <20260210193448.69423-5-abailey@iol.unh.edu> (raw)
In-Reply-To: <20260210193448.69423-1-abailey@iol.unh.edu>
Currently, a test case is decorated to signify whether to use Scapy or
TREX. This change allows test suites that do not use a traffic generator
to avoid the overhead of initializing either one.
Signed-off-by: Andrew Bailey <abailey@iol.unh.edu>
---
dts/configurations/test_run.example.yaml | 1 +
dts/framework/config/test_run.py | 3 +++
dts/framework/test_run.py | 2 +-
dts/framework/test_suite.py | 6 +++++
dts/tests/TestSuite_cryptodev_throughput.py | 30 +++++++++++----------
5 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/dts/configurations/test_run.example.yaml b/dts/configurations/test_run.example.yaml
index c8035fccf0..3eaffc2aa4 100644
--- a/dts/configurations/test_run.example.yaml
+++ b/dts/configurations/test_run.example.yaml
@@ -31,6 +31,7 @@ func_traffic_generator:
# config: "/opt/trex_config/trex_config.yaml" # Additional configuration files. (Leave blank if not required)
perf: false # disable performance testing
func: true # enable functional testing
+crypto: false # disable cryptographic testing
use_virtual_functions: false # use virtual functions (VFs) instead of physical functions
skip_smoke_tests: true # optional
# by removing the `test_suites` field, this test run will run every test suite available
diff --git a/dts/framework/config/test_run.py b/dts/framework/config/test_run.py
index 6c292a3675..39f2c7cdf6 100644
--- a/dts/framework/config/test_run.py
+++ b/dts/framework/config/test_run.py
@@ -481,6 +481,8 @@ class TestRunConfiguration(FrozenModel):
perf: bool
#: Whether to run functional tests.
func: bool
+ #: Whether to run cryptography tests.
+ crypto: bool
#: Whether to run the testing with virtual functions instead of physical functions
use_virtual_functions: bool
#: Whether to skip smoke tests.
@@ -522,6 +524,7 @@ def filter_tests(
for tt in t.test_cases
if (tt.test_type is TestCaseType.FUNCTIONAL and self.func)
or (tt.test_type is TestCaseType.PERFORMANCE and self.perf)
+ or (tt.test_type is TestCaseType.CRYPTO and self.crypto)
),
)
for t in test_suites
diff --git a/dts/framework/test_run.py b/dts/framework/test_run.py
index 36e6c5a44c..ada628c59e 100644
--- a/dts/framework/test_run.py
+++ b/dts/framework/test_run.py
@@ -349,7 +349,7 @@ def next(self) -> State | None:
if test_run.config.use_virtual_functions:
test_run.ctx.topology.instantiate_vf_ports()
- if test_run.ctx.sut_node.cryptodevs:
+ if test_run.ctx.sut_node.cryptodevs and test_run.config.crypto:
test_run.ctx.topology.instantiate_crypto_vf_ports()
test_run.ctx.topology.configure_cryptodevs("dpdk")
diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py
index 9c57e343ac..e86096cefe 100644
--- a/dts/framework/test_suite.py
+++ b/dts/framework/test_suite.py
@@ -174,6 +174,8 @@ def filter_test_cases(
perf_test_cases.add(test_case)
case TestCaseType.FUNCTIONAL:
func_test_cases.add(test_case)
+ case TestCaseType.CRYPTO:
+ pass
if test_case_sublist_copy:
raise ConfigurationError(
@@ -279,6 +281,8 @@ class TestCaseType(Enum):
FUNCTIONAL = auto()
#:
PERFORMANCE = auto()
+ #:
+ CRYPTO = auto()
class TestCase(TestProtocol, Protocol[TestSuiteMethodType]):
@@ -331,6 +335,8 @@ def _decorator(func: TestSuiteMethodType) -> type[TestCase]:
func_test: Callable = TestCase.make_decorator(TestCaseType.FUNCTIONAL)
#: The decorator for performance test cases.
perf_test: Callable = TestCase.make_decorator(TestCaseType.PERFORMANCE)
+#: The decorator for cryptography test cases.
+crypto_test: Callable = TestCase.make_decorator(TestCaseType.CRYPTO)
@dataclass
diff --git a/dts/tests/TestSuite_cryptodev_throughput.py b/dts/tests/TestSuite_cryptodev_throughput.py
index ef8fb026c2..10e3c7ff5e 100644
--- a/dts/tests/TestSuite_cryptodev_throughput.py
+++ b/dts/tests/TestSuite_cryptodev_throughput.py
@@ -32,7 +32,7 @@
from api.test import verify
from framework.context import get_ctx
from framework.exception import SkippedTestException
-from framework.test_suite import BaseConfig, TestSuite, func_test
+from framework.test_suite import BaseConfig, TestSuite, crypto_test
from framework.testbed_model.virtual_device import VirtualDevice
config_list: list[dict[str, int | float | str]] = [
@@ -142,7 +142,7 @@ def _verify_throughput(
result_list.append(result_dict)
return result_list
- @func_test
+ @crypto_test
def aes_cbc(self) -> None:
"""aes_cbc test.
@@ -172,6 +172,7 @@ def aes_cbc(self) -> None:
for result in results:
verify(result["passed"] == "PASS", "gbps fell below delta tolerance")
+ @crypto_test
def aes_cbc_sha1(self) -> None:
"""aes_cbc_sha1 test.
@@ -204,6 +205,7 @@ def aes_cbc_sha1(self) -> None:
for result in results:
verify(result["passed"] == "PASS", "gbps fell below delta tolerance")
+ @crypto_test
def aes_cbc_sha2(self) -> None:
"""aes_cbc_sha2 test.
@@ -237,7 +239,7 @@ def aes_cbc_sha2(self) -> None:
for result in results:
verify(result["passed"] == "PASS", "gbps fell below delta tolerance")
- @func_test
+ @crypto_test
def aes_cbc_sha2_digest_16(self) -> None:
"""aes_cbc_sha2_digest_16 test.
@@ -271,7 +273,7 @@ def aes_cbc_sha2_digest_16(self) -> None:
for result in results:
verify(result["passed"] == "PASS", "gbps fell below delta tolerance")
- @func_test
+ @crypto_test
def aead_aes_gcm(self) -> None:
"""aead_aes_gcm test.
@@ -303,7 +305,7 @@ def aead_aes_gcm(self) -> None:
for result in results:
verify(result["passed"] == "PASS", "gbps fell below delta tolerance")
- @func_test
+ @crypto_test
def aes_docsisbpi(self) -> None:
"""aes_docsiscpi test.
@@ -363,7 +365,7 @@ def aes_sha1(self) -> None:
for result in results:
verify(result["passed"] == "PASS", "gbps fell below delta tolerance")
- @func_test
+ @crypto_test
def snow3g_uea2_snow3g_uia2(self) -> None:
"""snow3g_uea2_snow3g_uia2 test.
@@ -398,7 +400,7 @@ def snow3g_uea2_snow3g_uia2(self) -> None:
for result in results:
verify(result["passed"] == "PASS", "gbps fell below delta tolerance")
- @func_test
+ @crypto_test
def zuc_eea3_zuc_eia3(self) -> None:
"""zuc_eea3_zuc_eia3 test.
@@ -433,7 +435,7 @@ def zuc_eea3_zuc_eia3(self) -> None:
for result in results:
verify(result["passed"] == "PASS", "gbps fell below delta tolerance")
- @func_test
+ @crypto_test
def kasumi_f8_kasumi_f9(self) -> None:
"""kasumi_f8 kasumi_f9 test.
@@ -469,7 +471,7 @@ def kasumi_f8_kasumi_f9(self) -> None:
# BEGIN VDEV TESTS
-
+ @crypto_test
def aesni_mb_vdev(self) -> None:
"""aesni_mb virtual device test.
@@ -505,7 +507,7 @@ def aesni_mb_vdev(self) -> None:
for result in results:
verify(result["passed"] == "PASS", "gbps fell below delta tolerance")
- @func_test
+ @crypto_test
def aesni_gcm_vdev(self):
"""aesni_gcm virtual device test.
@@ -541,7 +543,7 @@ def aesni_gcm_vdev(self):
for result in results:
verify(result["passed"] == "PASS", "gbps fell below delta tolerance")
- @func_test
+ @crypto_test
def kasumi_vdev(self) -> None:
"""Kasmumi virtual device test.
@@ -577,7 +579,7 @@ def kasumi_vdev(self) -> None:
for result in results:
verify(result["passed"] == "PASS", "gbps fell below delta tolerance")
- @func_test
+ @crypto_test
def snow3g_vdev(self) -> None:
"""snow3g virtual device test.
@@ -616,7 +618,7 @@ def snow3g_vdev(self) -> None:
f"Gbps and MOps were {result["gbps delta"]} below baseline",
)
- @func_test
+ @crypto_test
def zuc_vdev(self) -> None:
"""Zuc virtual device test.
@@ -652,7 +654,7 @@ def zuc_vdev(self) -> None:
for result in results:
verify(result["passed"] == "PASS", "gpbs fell below delta tolerance")
- @func_test
+ @crypto_test
def open_ssl_vdev(self) -> None:
"""open_ssl virtual device test.
--
2.50.1
next prev parent reply other threads:[~2026-02-10 19:35 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-10 19:34 [PATCH v2 0/5] dts: add cryptodev testing support Andrew Bailey
2026-02-10 19:34 ` [PATCH v2 1/5] dts: add find float method to text parser Andrew Bailey
2026-02-10 19:34 ` [PATCH v2 2/5] dts: add cryptodev package to DTS Andrew Bailey
2026-02-10 19:34 ` [PATCH v2 3/5] dts: add cryptodev throughput test suite Andrew Bailey
2026-02-10 19:34 ` Andrew Bailey [this message]
2026-02-10 19:34 ` [PATCH v2 5/5] dts: automate VFIO-PCI modprobe in node setup Andrew Bailey
2026-02-13 19:35 ` [PATCH v3 0/5] dts: add cryptodev testing support Andrew Bailey
2026-02-13 19:35 ` [PATCH v3 1/5] dts: add find float method to text parser Andrew Bailey
2026-02-25 21:05 ` Patrick Robb
2026-02-13 19:35 ` [PATCH v3 2/5] dts: add cryptodev package to DTS Andrew Bailey
2026-02-25 21:06 ` Patrick Robb
2026-02-26 19:13 ` Andrew Bailey
2026-02-27 16:15 ` Patrick Robb
2026-02-13 19:35 ` [PATCH v3 3/5] dts: add cryptodev throughput test suite Andrew Bailey
2026-02-27 18:24 ` Patrick Robb
2026-02-27 19:43 ` Andrew Bailey
2026-02-13 19:35 ` [PATCH v3 4/5] dts: add crypto test decorator Andrew Bailey
2026-02-27 18:28 ` Patrick Robb
2026-02-27 19:18 ` Andrew Bailey
2026-02-13 19:35 ` [PATCH v3 5/5] dts: automate VFIO-PCI modprobe in node setup Andrew Bailey
2026-02-27 18:33 ` Patrick Robb
2026-03-02 18:54 ` [PATCH v4 0/5] dts: add cryptodev testing support Andrew Bailey
2026-03-02 18:54 ` [PATCH v4 1/5] dts: add find float method to text parser Andrew Bailey
2026-03-02 18:54 ` [PATCH v4 2/5] dts: automate VFIO-PCI modprobe in node setup Andrew Bailey
2026-03-02 18:54 ` [PATCH v4 3/5] dts: add cryptodev package to DTS Andrew Bailey
2026-03-02 18:54 ` [PATCH v4 4/5] dts: add cryptodev throughput test suite Andrew Bailey
2026-03-05 19:26 ` Patrick Robb
2026-03-05 20:20 ` Patrick Robb
2026-03-02 18:54 ` [PATCH v4 5/5] dts: add crypto test decorator Andrew Bailey
2026-03-06 16:40 ` [PATCH v5 0/5] dts: add cryptodev testing support Andrew Bailey
2026-03-06 16:40 ` [PATCH v5 1/5] dts: add find float method to text parser Andrew Bailey
2026-03-06 16:40 ` [PATCH v5 2/5] dts: automate VFIO-PCI modprobe in node setup Andrew Bailey
2026-03-06 16:40 ` [PATCH v5 3/5] dts: add cryptodev package to DTS Andrew Bailey
2026-03-09 1:26 ` Patrick Robb
2026-03-06 16:40 ` [PATCH v5 4/5] dts: add cryptodev throughput test suite Andrew Bailey
2026-03-06 16:40 ` [PATCH v5 5/5] dts: add crypto test decorator Andrew Bailey
2026-03-12 18:08 ` Thomas Monjalon
2026-03-12 18:48 ` Andrew Bailey
2026-03-12 18:55 ` Thomas Monjalon
2026-03-12 19:54 ` Patrick Robb
2026-03-12 20:29 ` Thomas Monjalon
[not found] <20260122214424.322422-1-abailey@iol.unh.edu>
2026-02-10 18:06 ` [PATCH v2 0/5] *** dts: add cryptodev testing support *** Andrew Bailey
2026-02-10 18:06 ` [PATCH v2 4/5] dts: add crypto test decorator Andrew Bailey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260210193448.69423-5-abailey@iol.unh.edu \
--to=abailey@iol.unh.edu \
--cc=dev@dpdk.org \
--cc=dmarx@iol.unh.edu \
--cc=luca.vizzarro@arm.com \
--cc=probb@iol.unh.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox