|WARNING| [v3,2/2] crypto/ipsec_mb: Add SHAKE support.

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Tue Oct 13 12:17:41 CEST 2026


Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/171125

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-13

# DPDK Patch Review

## ERRORS

None identified.

## WARNINGS

**Patch 1/2 (crypto/ipsec_mb: Add SHA3 support):**

1. **Inner/outer pad buffer size documentation mismatch** (line in `pmd_aesni_mb_priv.h`, struct `aesni_mb_session`)

The comment states the pad size is "144 bytes for SHA3-224" but SHA3-224 uses a 144-byte block size (rate), not pad size. HMAC pads are derived from the block size, but the comment should clarify this is the block size accommodation, not the literal pad requirement.

```c
/* Current comment: */
/* *< HMAC Authentication pads -
 * allocating space for the maximum pad
 * size supported which is 144 bytes for
 * SHA3-224
 */

/* Suggested: */
/* *< HMAC Authentication pads -
 * allocating space based on the maximum
 * block size supported which is 144 bytes
 * for SHA3-224
 */
```

The existing 128-byte allocation would be insufficient for SHA3-224's 144-byte block size, so increasing to 144 is correct. The comment wording should be precise about what dimension drives the size.

**Patch 2/2 (crypto/ipsec_mb: Add SHAKE support):**

2. **SHAKE digest size range may be too restrictive** (capability definitions in `pmd_aesni_mb_priv.h`)

SHAKE-128 and SHAKE-256 are extendable-output functions (XOFs) that can produce arbitrary-length output. The patch restricts digest_size.max to 64 bytes for both algorithms. While this may reflect a limitation in the Intel IPsec Multi-Buffer library (IMB), the restriction should be documented or verified against the library's actual capabilities. If IMB supports longer outputs, the 64-byte cap is artificially restrictive.

```c
/* Both SHAKE algorithms currently show: */
.digest_size = {
    .min = 1,
    .max = 64,  /* Is this an IMB limitation or arbitrary? */
    .increment = 1
},
```

Verify that `IMB_AUTH_SHAKE128` and `IMB_AUTH_SHAKE256` in Intel IPsec MB library v3.0.0+ actually limit output to 64 bytes, or if this should be increased (e.g., to 128 for SHAKE-128, 256 for SHAKE-256, or higher if the library supports it).

## INFO

None.

---

**Summary:**

Both patches correctly add SHA3 and SHAKE algorithm support to the AESNI_MB crypto PMD with appropriate version guards, capability structures, and documentation updates. The code follows DPDK style conventions, includes proper feature matrix updates, and adds release notes. The two warnings above are minor precision issues that should be addressed to ensure correctness and avoid artificial limitations.

Review-Result: WARNING


More information about the test-report mailing list