|WARNING| [v3,2/2] dts: refactor cryptodev latency test suite
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Mon Oct 19 22:58:40 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/171718
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-19
# DPDK Patch Review
## Correctness Bugs
### Error: Incorrect latency verification logic
**File:** `dts/tests/TestSuite_cryptodev_latency.py`
**Line:** 274-278
```python
if getattr(result, "avg_cycles") > expected_cycles:
if self.delta_tolerance > measured_delta_cycles:
test_result = False
if getattr(result, "avg_time_us") > expected_time:
if self.delta_tolerance > measured_delta_time:
test_result = False
```
The delta comparison is inverted. For latency tests, when the measured value exceeds the baseline, the test should fail if the delta is **greater than** tolerance, not less than. The current logic sets `test_result = False` when the delta is **less than** the tolerance, which is backwards.
**Fix:**
```python
if getattr(result, "avg_cycles") > expected_cycles:
if self.delta_tolerance < measured_delta_cycles:
test_result = False
if getattr(result, "avg_time_us") > expected_time:
if self.delta_tolerance < measured_delta_time:
test_result = False
```
This matches the correct logic from the throughput test suite.
---
### Error: Wrong operation type in cipher_and_auth_tests
**File:** `dts/tests/TestSuite_cryptodev_throughput.py`
**Line:** 396
```python
optype=OperationType.aead,
```
In the `cipher_and_auth_tests()` method, the operation type is set to `aead`, but the test is configuring cipher and authentication algorithms separately. This should be `OperationType.cipher_then_auth`.
**Fix:**
```python
optype=OperationType.cipher_then_auth,
```
This error also appears in `dts/tests/TestSuite_cryptodev_latency.py` at line 513.
---
## Warnings
### Warning: Leftover debug print statement
**File:** `dts/tests/TestSuite_cryptodev_latency.py`
**Line:** 542
```python
print(str(combination))
```
Debug print statement should be removed or replaced with a proper logger call.
**Fix:**
```python
self._logger.debug(f"Processing combination: {combination}")
```
---
### Warning: Inconsistent error message in verification
**File:** `dts/tests/TestSuite_cryptodev_latency.py`
**Line:** 205-206
```python
verify(
result["passed"] == "PASS",
f"Gbps fell below delta tolerance for test {result['Test Name']}",
)
```
The error message mentions "Gbps" but this is a latency test suite that measures cycles and time, not throughput in Gbps.
**Fix:**
```python
verify(
result["passed"] == "PASS",
f"Latency exceeded delta tolerance for test {result['Test Name']}",
)
```
---
### Warning: Missing release notes
This is a significant refactoring that changes the test suite configuration format and makes previously hard-coded tests fully configurable. This should be documented in release notes under `doc/guides/rel_notes/release_XX_YY.rst` (where XX_YY is the current release).
---
### Warning: Test parameters use string algorithm names instead of enum values
**File:** `dts/tests/TestSuite_cryptodev_throughput.py`
**Line:** 61-62, 67, 72, etc.
```python
"cipher_algorithm": CipherAlgorithm.aes_cbc.name,
```
The configuration uses `.name` to convert enums to strings, then later converts them back using `CipherAlgorithm[combination["cipher_algorithm"]]`. This is fragile and error-prone if a typo occurs in manual configuration.
**Suggested approach:** Document clearly in the example config that the string values must exactly match the enum member names, or validate them during `set_up_suite()`.
---
## Review-Result: ERROR
More information about the test-report
mailing list