|SUCCESS| crypto/ipsec_mb: fix cipher and auth length calculation
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Mon Nov 23 12:05:35 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 bit-length classification of cipher and auth algorithms is now duplicated in two places: `aesni_mb_digest_appended_in_src()` and `post_process_mb_job()`. This patch had to make the same fix twice, which shows how easily the copies can drift apart. Consider moving the checks into small static helpers in a follow-up, for example:
```c
static inline bool
aesni_mb_cipher_len_in_bits(IMB_CIPHER_MODE mode);
static inline bool
aesni_mb_auth_len_in_bits(IMB_HASH_ALG alg);
```
Both call sites could then use the helpers. The `#if IMB_VERSION(...)` blocks would also live in one place.
2. The rewritten conditions put `||` at the start of continuation lines:
```c
+ if (job->cipher_mode == IMB_CIPHER_ZUC_EEA3
+ || job->cipher_mode == IMB_CIPHER_SNOW3G_UEA2
```
The original code and the usual DPDK style put the operator at the end of the line. The closing ` ) {` is also indented with spaces rather than tabs. This was presumably done to make the `#if`/`#endif` insertion tidy, so it is only a minor style point.
Review-Result: CLEAN
More information about the test-report
mailing list