From: Andrew Bailey <abailey@iol.unh.edu>
To: luca.vizzarro@arm.com, patrickrobb1997@gmail.com
Cc: dev@dpdk.org, lylavoie@iol.unh.edu, ahassick@iol.unh.edu,
knimoji@iol.unh.edu, Andrew Bailey <abailey@iol.unh.edu>
Subject: [PATCH v1 3/3] dts: add verify coverage for cryptodev testing
Date: Thu, 14 May 2026 13:25:53 -0400 [thread overview]
Message-ID: <20260514172553.191331-3-abailey@iol.unh.edu> (raw)
In-Reply-To: <20260514172553.191331-1-abailey@iol.unh.edu>
Currently, next-DTS only covers throughput testing through the
dpdk-test-crypto application. This series adds coverage for the verify
option to next DTS to allow functional testing for various algorithms of
crypto devices and virtual devices.
Signed-off-by: Andrew Bailey <abailey@iol.unh.edu>
---
dts/tests/TestSuite_cryptodev_verify.py | 160 ++++++++++++++++++++++++
tests.TestSuite_cryptodev_verify.rst | 8 ++
2 files changed, 168 insertions(+)
create mode 100644 dts/tests/TestSuite_cryptodev_verify.py
create mode 100644 tests.TestSuite_cryptodev_verify.rst
diff --git a/dts/tests/TestSuite_cryptodev_verify.py b/dts/tests/TestSuite_cryptodev_verify.py
new file mode 100644
index 0000000000..45014a4243
--- /dev/null
+++ b/dts/tests/TestSuite_cryptodev_verify.py
@@ -0,0 +1,160 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2026 University of New Hampshire
+
+"""DPDK cryptodev verify test suite.
+
+The main goal of this test suite is to utilize the verify mode of dpdk-test-crypto application
+to ensure functional correctness for various cryptographic operations supported by DPDK
+cryptodev-pmd.
+"""
+
+from api.capabilities import (
+ LinkTopology,
+ requires_link_topology,
+)
+from api.cryptodev import Cryptodev
+from api.cryptodev.config import (
+ AeadAlgName,
+ AuthenticationAlgorithm,
+ AuthenticationOpMode,
+ CipherAlgorithm,
+ DeviceType,
+ EncryptDecryptSwitch,
+ OperationType,
+ TestType,
+ get_device_from_str,
+)
+from api.cryptodev.types import (
+ CryptodevResults,
+)
+from api.test import verify
+from framework.context import get_ctx
+from framework.test_suite import TestSuite, crypto_test
+from framework.testbed_model.virtual_device import VirtualDevice
+
+TOTAL_OPS = 10_000_000
+AES_CBC_DATA = "test_aes_cbc.data"
+AES_GCM_DATA = "test_aes_gcm.data"
+
+
+@requires_link_topology(LinkTopology.NO_LINK)
+class TestCryptodevVerify(TestSuite):
+ """DPDK Crypto Device Testing Suite."""
+
+ def set_up_suite(self) -> None:
+ """Set up the test suite."""
+ self.device_type: DeviceType | None = get_device_from_str(
+ str(get_ctx().sut_node.crypto_device_type)
+ )
+
+ def _verify_output(
+ self,
+ results: list[CryptodevResults],
+ ) -> bool:
+ for result in results:
+ if (
+ getattr(result, "failed_enqueued") > 0
+ or getattr(result, "failed_dequeued") > 0
+ or getattr(result, "failed_ops") > 0
+ ):
+ return False
+ return True
+
+ @crypto_test
+ def aesni_mb_vdev(self) -> None:
+ """aesni_mb_vdev test.
+
+ Steps:
+ * Create a cryptodev instance with aesni_mb virtual device and provided buffer sizes.
+ Verify:
+ * The aes_cbc cipher and sha1_hmac authentication algorithms are working as expected
+ with the dpdk-test-crypto application.
+ """
+ app = Cryptodev(
+ vdevs=[VirtualDevice("crypto_aesni_mb0")],
+ ptest=TestType.verify,
+ test_file=AES_CBC_DATA,
+ test_name="sha1_hmac_buff_32",
+ devtype=DeviceType.crypto_aesni_mb,
+ optype=OperationType.cipher_then_auth,
+ cipher_algo=CipherAlgorithm.aes_cbc,
+ cipher_op=EncryptDecryptSwitch.encrypt,
+ cipher_key_sz=32,
+ cipher_iv_sz=16,
+ auth_algo=AuthenticationAlgorithm.sha1_hmac,
+ auth_op=AuthenticationOpMode.generate,
+ auth_key_sz=64,
+ digest_sz=12,
+ burst_sz=32,
+ buffer_sz=32,
+ total_ops=TOTAL_OPS,
+ )
+
+ verify(self._verify_output(app.run_app()), "Failed to verify test sha1_hmac_buff_32")
+
+ @crypto_test
+ def openssl_vdev(self) -> None:
+ """Openssl vdev test.
+
+ Steps:
+ * Create a cryptodev instance with openssl virtual device and provided buffer sizes.
+ Verify:
+ * The aes_cbc cipher and sha1_hmac authentication algorithms are working as expected
+ with the dpdk-test-crypto application.
+
+ Raises:
+ SkippedTestException: When configuration is not provided.
+ """
+ app = Cryptodev(
+ vdevs=[VirtualDevice("crypto_openssl0")],
+ ptest=TestType.verify,
+ test_file=AES_GCM_DATA,
+ test_name="aes_gcm_buff_32",
+ devtype=DeviceType.crypto_openssl,
+ optype=OperationType.aead,
+ aead_algo=AeadAlgName.aes_gcm,
+ aead_op=EncryptDecryptSwitch.encrypt,
+ aead_key_sz=16,
+ aead_aad_sz=16,
+ aead_iv_sz=12,
+ digest_sz=16,
+ burst_sz=32,
+ buffer_sz=32,
+ total_ops=TOTAL_OPS,
+ )
+
+ verify(self._verify_output(app.run_app()), "Failed to verify test aes_gcm_buff_32")
+
+ @crypto_test
+ def sha1_hmac_buff_32(self) -> None:
+ """aes_cbc test.
+
+ Steps:
+ * Create a cryptodev instance with provided device type and buffer sizes.
+ Verify:
+ * The aes_cbc cipher and sha1_hmac authentication algorithms are working as expected
+ with the dpdk-test-crypto application.
+
+ Raises:
+ SkippedTestException: When configuration is not provided.
+ """
+ app = Cryptodev(
+ ptest=TestType.verify,
+ test_file=AES_CBC_DATA,
+ test_name="sha1_hmac_buff_32",
+ devtype=self.device_type,
+ optype=OperationType.cipher_then_auth,
+ cipher_algo=CipherAlgorithm.aes_cbc,
+ cipher_op=EncryptDecryptSwitch.encrypt,
+ cipher_key_sz=32,
+ cipher_iv_sz=16,
+ auth_algo=AuthenticationAlgorithm.sha1_hmac,
+ auth_op=AuthenticationOpMode.generate,
+ auth_key_sz=64,
+ digest_sz=20,
+ burst_sz=32,
+ buffer_sz=32,
+ total_ops=TOTAL_OPS,
+ )
+
+ verify(self._verify_output(app.run_app()), "Failed to verify test sha1_hmac_buff_32")
diff --git a/tests.TestSuite_cryptodev_verify.rst b/tests.TestSuite_cryptodev_verify.rst
new file mode 100644
index 0000000000..d0a305a7d5
--- /dev/null
+++ b/tests.TestSuite_cryptodev_verify.rst
@@ -0,0 +1,8 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+
+cryptodev_verify Test Suite
+===========================
+
+.. automodule:: tests.TestSuite_cryptodev_verify
+ :members:
+ :show-inheritance:
--
2.50.1
prev parent reply other threads:[~2026-05-14 17:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 19:35 [RFC] dts: add verify coverage for cryptodev testing Andrew Bailey
2026-05-14 17:25 ` [PATCH v1 1/3] dts: add directory for test resources Andrew Bailey
2026-05-14 17:25 ` [PATCH v1 2/3] dts: fix cryptodev verify parsing Andrew Bailey
2026-05-14 17:25 ` Andrew Bailey [this message]
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=20260514172553.191331-3-abailey@iol.unh.edu \
--to=abailey@iol.unh.edu \
--cc=ahassick@iol.unh.edu \
--cc=dev@dpdk.org \
--cc=knimoji@iol.unh.edu \
--cc=luca.vizzarro@arm.com \
--cc=lylavoie@iol.unh.edu \
--cc=patrickrobb1997@gmail.com \
/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