|SUCCESS| crypto/ipsec_mb: fix cipher and auth length calculation
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Mon Nov 23 12:20:10 CET 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/173109
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-23
**Info**
1. The patch moves the `||` operators from line end to line start, which adds diff churn and differs from the surrounding DPDK style. DPDK code usually puts the operator at the end of the continued line. Keeping the original placement would also shrink the diff to the added algorithm lines:
```c
if (job->cipher_mode == IMB_CIPHER_ZUC_EEA3 ||
job->cipher_mode == IMB_CIPHER_SNOW3G_UEA2 ||
job->cipher_mode == IMB_CIPHER_KASUMI_UEA1
#if IMB_VERSION(3, 0, 0) <= IMB_VERSION_NUM
|| job->cipher_mode == IMB_CIPHER_SNOW5G_NEA4
...
```
2. The closing parenthesis is indented differently across the four conditions. The first cipher check uses `\t\t) {`, while the auth check in the same function and both checks in `post_process_mb_job()` use ` ) {`. One form should be used throughout.
3. The bit-to-byte length lists are now duplicated, and kept in sync by hand, in `aesni_mb_digest_appended_in_src()` and `post_process_mb_job()`. This patch had to make the identical change in both places. Factoring them into helpers would stop the two copies drifting apart again, for example:
- `static bool is_bit_len_cipher(IMB_CIPHER_MODE mode)`
- `static bool is_bit_len_auth(IMB_HASH_ALG alg)`
The duplication is pre-existing; the patch only extends it.
Review-Result: CLEAN
More information about the test-report
mailing list