<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 13, 2026 at 11:27 AM Andrew Bailey <<a href="mailto:abailey@iol.unh.edu" target="_blank">abailey@iol.unh.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Currently, next DTS only has cryptodev testing coverage for throughput<br>
metrics. This patch adds a test suite to include latency testing for<br>
crypto devices.<br>
<br>
Signed-off-by: Andrew Bailey <<a href="mailto:abailey@iol.unh.edu" target="_blank">abailey@iol.unh.edu</a>><br>
---<br>
.../dts/tests.TestSuite_cryptodev_latency.rst | 8 +<br>
dts/tests/TestSuite_cryptodev_latency.py | 695 ++++++++++++++++++<br>
2 files changed, 703 insertions(+)<br>
create mode 100644 doc/api/dts/tests.TestSuite_cryptodev_latency.rst<br>
create mode 100644 dts/tests/TestSuite_cryptodev_latency.py<br>
<br><br>
+ @crypto_test<br>
+ def aesni_gcm_vdev(self) -> None:<br>
+ """aesni_gcm virtual device latency test.<br>
+<br>
+ Steps:<br>
+ * Create a cryptodev instance with provided device type and buffer sizes.<br>
+ Verify:<br>
+ * The latency is below or within delta of provided baseline.<br>
+<br>
+ Raises:<br>
+ SkippedTestException: When configuration is not provided.<br>
+ """<br>
+ if "aesni_gcm_vdev" not in self.latency_test_parameters:<br>
+ skip("test not configured")<br>
+ app = Cryptodev(<br>
+ ptest=TestType.latency,<br>
+ vdevs=[VirtualDevice("crypto_aesni_gcm0")],<br>
+ devtype=DeviceType.crypto_aesni_gcm,<br>
+ optype=OperationType.aead,<br>
+ aead_op=EncryptDecryptSwitch.encrypt,<br>
+ aead_key_sz=16,<br>
+ aead_iv_sz=12,<br>
+ aead_aad_sz=16,<br>
+ digest_sz=16,<br>
+ burst_sz=32,<br>
+ total_ops=TOTAL_OPS,<br>
+ buffer_sz=self.buffer_sizes["aesni_gcm_vdev"],<br>
+ )<br>
+ results = self._verify_latency(app.run_app(), "aesni_gcm_vdev")<br>
+ self._print_stats(results)<br>
+ for result in results:<br>
+ verify(result["passed"] == "PASS", "latency fell more than the delta tolerance")<br></blockquote><div><br></div><div>Why this one does not have "below baseline" in the string like other verify assertions in this suite?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+<br>
+ @crypto_test<br>
+ def aesni_mb_cipher_then_auth_vdev(self) -> None:<br>
+ """aesni_mb vdev cipher and auth latency test.<br>
+<br>
+ Steps:<br>
+ * Create a cryptodev instance with provided device type and buffer sizes.<br>
+ Verify:<br>
+ * The latency is below or within delta of provided baseline.<br>
+<br>
+ Raises:<br>
+ SkippedTestException: When configuration is not provided.<br>
+ """<br>
+ if "aesni_mb_cipher_then_auth_vdev" not in self.latency_test_parameters:<br>
+ skip("test not configured")<br>
+ app = Cryptodev(<br>
+ ptest=TestType.latency,<br>
+ vdevs=[VirtualDevice("crypto_aesni_mb0")],<br>
+ devtype=DeviceType.crypto_aesni_mb,<br>
+ optype=OperationType.cipher_then_auth,<br>
+ cipher_algo=CipherAlgorithm.aes_cbc,<br>
+ cipher_op=EncryptDecryptSwitch.encrypt,<br>
+ cipher_key_sz=16,<br>
+ auth_algo=AuthenticationAlgorithm.sha1_hmac,<br>
+ auth_op=AuthenticationOpMode.generate,<br>
+ auth_key_sz=64,<br>
+ digest_sz=12,<br>
+ burst_sz=32,<br>
+ total_ops=TOTAL_OPS,<br>
+ buffer_sz=self.buffer_sizes["aesni_mb_cipher_then_auth_vdev"],<br>
+ )<br>
+ results = self._verify_latency(app.run_app(), "aesni_mb_cipher_then_auth_vdev")<br>
+ self._print_stats(results)<br>
+ for result in results:<br>
+ verify(<br>
+ result["passed"] == "PASS",<br>
+ "latency fell more than the delta tolerance below baseline",<br>
+ )<br>
+<br>
+ @crypto_test<br>
+ def aesni_mb_vdev(self) -> None:<br>
+ """aesni_mb vdev latency test.<br>
+<br>
+ Steps:<br>
+ * Create a cryptodev instance with provided device type and buffer sizes.<br>
+ Verify:<br>
+ * The latency is below or within delta of provided baseline.<br>
+<br>
+ Raises:<br>
+ SkippedTestException: When configuration is not provided.<br>
+ """<br>
+ if "aesni_mb_vdev" not in self.latency_test_parameters:<br>
+ skip("test not configured")<br>
+ app = Cryptodev(<br>
+ ptest=TestType.latency,<br>
+ vdevs=[VirtualDevice("crypto_aesni_mb0")],<br>
+ devtype=DeviceType.crypto_aesni_mb,<br>
+ optype=OperationType.cipher_only,<br>
+ cipher_algo=CipherAlgorithm.aes_cbc,<br>
+ cipher_op=EncryptDecryptSwitch.encrypt,<br>
+ cipher_key_sz=16,<br>
+ cipher_iv_sz=16,<br>
+ burst_sz=32,<br>
+ total_ops=TOTAL_OPS,<br>
+ buffer_sz=self.buffer_sizes["aesni_mb_vdev"],<br>
+ )<br>
+ results = self._verify_latency(app.run_app(), "aesni_mb_vdev")<br>
+ self._print_stats(results)<br>
+ for result in results:<br>
+ verify(result["passed"] == "PASS", "Gbps fell below delta tolerance")<br>
+<br>
+ @crypto_test<br>
+ def kasumi_vdev(self) -> None:<br>
+ """Kasumi vdev latency test.<br>
+<br>
+ Steps:<br>
+ * Create a cryptodev instance with provided device type and buffer sizes.<br>
+ Verify:<br>
+ * The latency is below or within delta of provided baseline.<br>
+<br>
+ Raises:<br>
+ SkippedTestException: When configuration is not provided.<br>
+ """<br>
+ if "kasumi_vdev" not in self.latency_test_parameters:<br>
+ skip("test not configured")<br>
+ app = Cryptodev(<br>
+ ptest=TestType.latency,<br>
+ vdevs=[VirtualDevice("crypto_kasumi0")],<br>
+ devtype=DeviceType.crypto_kasumi,<br>
+ optype=OperationType.cipher_then_auth,<br>
+ cipher_algo=CipherAlgorithm.kasumi_f8,<br>
+ cipher_op=EncryptDecryptSwitch.encrypt,<br>
+ cipher_key_sz=16,<br>
+ cipher_iv_sz=8,<br>
+ auth_algo=AuthenticationAlgorithm.kasumi_f9,<br>
+ auth_op=AuthenticationOpMode.generate,<br>
+ auth_key_sz=16,<br>
+ digest_sz=4,<br>
+ burst_sz=32,<br>
+ total_ops=TOTAL_OPS,<br>
+ buffer_sz=self.buffer_sizes["kasumi_vdev"],<br>
+ )<br>
+ results = self._verify_latency(app.run_app(), "kasmui_vdev")<br>
+ self._print_stats(results)<br>
+ for result in results:<br>
+ verify(result["passed"] == "PASS", "Gbps fell below delta tolerance")<br></blockquote><div><br></div><div>Should this be latency instead of Gbps?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+<br>
+ @crypto_test<br>
+ def open_ssl_vdev(self) -> None:<br>
+ """open_ssl vdev latency test.<br>
+<br>
+ Steps:<br>
+ * Create a cryptodev instance with provided device type and buffer sizes.<br>
+ Verify:<br>
+ * The latency is below or within delta of provided baseline.<br>
+<br>
+ Raises:<br>
+ SkippedTestException: When configuration is not provided.<br>
+ """<br>
+ if "open_ssl_vdev" not in self.latency_test_parameters:<br>
+ skip("test not configured")<br>
+ app = Cryptodev(<br>
+ ptest=TestType.latency,<br>
+ vdevs=[VirtualDevice("crypto_openssl0")],<br>
+ devtype=DeviceType.crypto_openssl,<br>
+ optype=OperationType.aead,<br>
+ aead_algo=AeadAlgName.aes_gcm,<br>
+ aead_op=EncryptDecryptSwitch.encrypt,<br>
+ aead_key_sz=16,<br>
+ aead_iv_sz=16,<br>
+ aead_aad_sz=16,<br>
+ digest_sz=16,<br>
+ total_ops=TOTAL_OPS,<br>
+ buffer_sz=self.buffer_sizes["open_ssl_vdev"],<br>
+ )<br>
+ results = self._verify_latency(app.run_app(), "open_ssl_vdev")<br>
+ self._print_stats(results)<br>
+ for result in results:<br>
+ verify(result["passed"] == "PASS", "Gbps fell below delta tolerance")<br></blockquote><div>Same</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+<br>
+ @crypto_test<br>
+ def snow3g_vdev(self) -> None:<br>
+ """snow3g vdev latency test.<br>
+<br>
+ Steps:<br>
+ * Create a cryptodev instance with provided device type and buffer sizes.<br>
+ Verify:<br>
+ * The latency is below or within delta of provided baseline.<br>
+<br>
+ Raises:<br>
+ SkippedTestException: When configuration is not provided.<br>
+ """<br>
+ if "snow3g_vdev" not in self.latency_test_parameters:<br>
+ skip("test not configured")<br>
+ app = Cryptodev(<br>
+ ptest=TestType.latency,<br>
+ vdevs=[VirtualDevice("crypto_snow3g0")],<br>
+ devtype=DeviceType.crypto_snow3g,<br>
+ optype=OperationType.cipher_then_auth,<br>
+ cipher_algo=CipherAlgorithm.snow3g_uea2,<br>
+ cipher_op=EncryptDecryptSwitch.encrypt,<br>
+ cipher_key_sz=16,<br>
+ cipher_iv_sz=16,<br>
+ auth_algo=AuthenticationAlgorithm.snow3g_uia2,<br>
+ auth_op=AuthenticationOpMode.generate,<br>
+ auth_key_sz=16,<br>
+ auth_iv_sz=16,<br>
+ digest_sz=16,<br>
+ burst_sz=32,<br>
+ total_ops=TOTAL_OPS,<br>
+ buffer_sz=self.buffer_sizes["open_ssl_vdev"],<br>
+ )<br>
+ results = self._verify_latency(app.run_app(), "open_ssl_vdev")<br>
+ self._print_stats(results)<br>
+ for result in results:<br>
+ verify(result["passed"] == "PASS", "Gbps fell below delta tolerance")<br></blockquote><div>Same</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+<br>
+ @crypto_test<br>
+ def zuc_vdev(self) -> None:<br>
+ """Zuc vdev latency test.<br>
+<br>
+ Steps:<br>
+ * Create a cryptodev instance with provided device type and buffer sizes.<br>
+ Verify:<br>
+ * The latency is below or within delta of provided baseline.<br>
+<br>
+ Raises:<br>
+ SkippedTestException: When configuration is not provided.<br>
+ """<br>
+ if "zuc_vdev" not in self.latency_test_parameters:<br>
+ skip("test not configured")<br>
+ app = Cryptodev(<br>
+ ptest=TestType.latency,<br>
+ vdevs=[VirtualDevice("crypto_zuc0")],<br>
+ devtype=DeviceType.crypto_zuc,<br>
+ optype=OperationType.cipher_then_auth,<br>
+ cipher_algo=CipherAlgorithm.zuc_eea3,<br>
+ cipher_op=EncryptDecryptSwitch.encrypt,<br>
+ cipher_key_sz=16,<br>
+ cipher_iv_sz=16,<br>
+ auth_algo=AuthenticationAlgorithm.zuc_eia3,<br>
+ auth_op=AuthenticationOpMode.generate,<br>
+ auth_key_sz=16,<br>
+ auth_iv_sz=16,<br>
+ digest_sz=4,<br>
+ burst_sz=32,<br>
+ total_ops=TOTAL_OPS,<br>
+ buffer_sz=self.buffer_sizes["zuc_vdev"],<br>
+ )<br>
+ results = self._verify_latency(app.run_app(), "zuc_vdev")<br>
+ self._print_stats(results)<br>
+ for result in results:<br>
+ verify(result["passed"] == "PASS", "Gbps fell below delta tolerance")<br></blockquote><div><br></div><div>Same </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
-- <br>
2.50.1<br>
<br></blockquote><div><br></div><div>Make sure you also see the ai code review mention of kasumi and snow3g typo or misassignment <a href="https://mails.dpdk.org/archives/test-report/2026-May/990932.html">https://mails.dpdk.org/archives/test-report/2026-May/990932.html</a></div><div><br></div><div>The suggestions about safety when reading index 0 of a list are worth implementing too.</div><div><br></div><div>Reviewed-by: Patrick Robb <<a href="mailto:patrickrobb1997@gmail.com">patrickrobb1997@gmail.com</a>> </div></div></div>
</div>
</div>