|WARNING| crypto/cnxk: changes to align with zuc256 v2 auth
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Fri Oct 23 14:07:30 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/171907
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-23
# DPDK Patch Review
## Errors
None identified.
## Warnings
**Missing release notes:**
```c
drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c
```
This patch modifies the ZUC-256 authentication capability (maximum IV size) and changes PDCP IV handling for CN20K.
These are behavioral changes to a cryptographic PMD that affect applications using ZUC-256 authentication on CN20K hardware.
The release notes in `doc/guides/rel_notes/` should document:
- The alignment with ZUC-256 V2 authentication microcode
- The change in maximum IV size from 25 to 16 bytes for CN20K
- The PDCP IV length/offset changes
**Resource allocation pattern suggestion:**
```c
drivers/common/cnxk/roc_se.c:258
if (key_len == 32 && roc_model_is_cn20k()) {
memcpy(zuc_const, zuc_key256_v2, 16);
return;
}
```
The early return is correct.
However, consider whether `zuc_key256_v2` is defined and properly initialized -- the patch does not show its definition.
If this is a newly introduced constant, verify that it is declared/defined elsewhere in the tree
and that the 16-byte length matches the buffer size.
## Info
**PDCP IV configuration change:**
```c
drivers/crypto/cnxk/cnxk_cryptodev_ops.c:675-676
- sess->roc_se_ctx->pdcp_iv_len = 40;
sess->roc_se_ctx->pdcp_iv_offset = 16;
+ sess->roc_se_ctx->pdcp_iv_len = 32;
```
The IV length for CN20K is reduced from 40 to 32 bytes, and the offset remains 16.
This appears to be a deliberate alignment with the V2 microcode specification.
Verify that all code paths consuming `pdcp_iv_len` and `pdcp_iv_offset` handle these new values correctly,
particularly in descriptor building and buffer sizing logic elsewhere in the driver.
**IV size capability change:**
```c
drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c:2094-2097
if (roc_model_is_cn20k())
caps->sym.auth.iv_size.max = 16;
else
caps->sym.auth.iv_size.max = 25;
```
CN20K now reports a maximum IV size of 16 bytes for ZUC-256 authentication, while CN10K retains 25 bytes.
This is a runtime capability change that applications will observe.
Ensure that:
- Test cases cover ZUC-256 with IVs up to the maximum on both CN10K and CN20K
- The 16-byte limit on CN20K matches the hardware/microcode specification
- Applications using larger IVs will be rejected at session creation rather than failing silently
Review-Result: WARNING
More information about the test-report
mailing list