|WARNING| [v2] crypto: add RSA-specific capability parameters

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Wed Aug 19 09:50:20 CEST 2026


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

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-08-19

# DPDK Patch Review

## Summary
This patch adds RSA-specific capability reporting to the cryptodev API. The changes are mostly documentation and structure additions. I found no correctness bugs or resource leaks.

---

## Findings

### Errors
None.

---

### Warnings

#### 1. Missing `__rte_experimental` on new structure

**Issue:** The new `struct rte_crypto_rsa_capa` is added to a public API header without the `__rte_experimental` tag.

**Why it matters:** All new API additions must be marked experimental per DPDK policy. This allows API changes in future releases before committing to ABI stability.

**Fix:** Add `__rte_experimental` before the struct definition:

```c
/**
 * RSA transform capability parameters.
 * ...
 */
__rte_experimental
struct rte_crypto_rsa_capa {
    struct rte_crypto_param_range modlen;
    /* ... */
};
```

#### 2. Missing release notes update

**Issue:** This patch adds new API structures and fields (`rte_crypto_rsa_capa`, union member `rsa_capa`) but does not update the release notes.

**Why it matters:** API additions require documentation in the release notes so users know about new capabilities.

**Fix:** Add an entry to `doc/guides/rel_notes/release_26_08.rst` (or appropriate current release file) under "New Features":

```rst
* **Added RSA-specific capability reporting to cryptodev.**

  Added ``rte_crypto_rsa_capa`` structure to report RSA modulus length,
  padding schemes, and MGF1 hash algorithm support independently from
  primary hash algorithms.
```

---

### Info

#### 1. Documentation could clarify zero-value semantics more explicitly

**Observation:** The documentation states that zero values mean "PMD default applies" but doesn't explain what happens if an application queries capabilities and gets zeros.

**Suggestion:** Consider adding a note in the struct documentation explaining that applications should handle zero capability values (either by treating zero as "no support reported, contact PMD documentation" or by falling back to querying the old generic fields).

This is minor since v2 already improved the documentation significantly.

---

## Style Compliance

-  Struct member alignment and indentation correct
-  Doxygen comment style correct
-  No forbidden tokens
-  No trailing whitespace visible
-  Naming conventions followed (`rte_crypto_` prefix)

---

## Correctness Review

-  No memory allocation (no leak risk)
-  No error paths to trace
-  No use-after-free possible (structure definitions only)
-  No shared state or concurrency issues
-  No undefined behavior
-  No ABI break (union member addition is safe, union size not changed)

---

## Verdict

The patch is **functionally correct** but requires:
1. Adding `__rte_experimental` tag (Warning)
2. Release notes update (Warning)

These are process requirements rather than correctness bugs. After addressing these two items, the patch will be ready for merge.


More information about the test-report mailing list