|WARNING| [v5, 5/5] app/crypto-perf: fix PQC test vector output buffer handling

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Mon Nov 30 13:03:55 CET 2026


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

_AI Code Review_

warning: review has no Review-Result line, severity inferred from prose (response may be truncated)
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-30

**Patch 3/5: app/crypto-perf: add ML-DSA support**

Warning: unused `static const` arrays.

```c
static const uint8_t mldsa_65_seed[] = {
static const uint8_t mldsa_87_seed[] = {
```

Neither array is referenced by any test-data entry in this patch. In C, `-Wunused-variable` also enables `-Wunused-const-variable=1`, so this patch on its own warns, and fails a `-Werror` build.

Patch 4 then drops `static` to silence the warning. That only turns the arrays into unprefixed global symbols that nothing references. Either remove the seeds, or wire them into the test data where they are used.

**Patch 5/5: app/crypto-perf: fix PQC test vector output buffer handling**

Error: unrelated removal of the outbound mbuf reset in the IPsec path.

```c
-		if (options->is_outbound)
-			rte_pktmbuf_reset(sym_op->m_src);
```

This hunk in `cperf_set_ops_security_ipsec()` has nothing to do with PQC buffers and is not mentioned in the commit message. Without the reset, a reused outbound source mbuf keeps the state left by the previous IPsec operation, such as `data_off` and `nb_segs`. Only `pkt_len` is rewritten afterwards. This looks like a rebase artifact; restore the two lines.

Error: per-op output slots are indexed by the position in the burst, but the pool is sized by descriptor count.

```c
		t_vec->mldsa.sign.data = rte_malloc(NULL,
				(size_t)d->sign.length * options->nb_descriptors, 0);
...
			asym_op->mldsa.siggen.sign.data = test_vector->mldsa.sign.data +
					(i * test_vector->mldsa.sign.length);
```

`i` runs from 0 to `nb_ops - 1`, where `nb_ops` is the burst size. The pool holds `options->nb_descriptors` slots. If the burst size exceeds `--desc-nb`, the device writes past the allocation. The same applies to:
- `mlkem.cipher.data + (i * ...)` in the encap path.
- `mlkem.sk.data + (i * ...)` in both the encap and decap paths.

Fix options:
- Reject `burst_sz > nb_descriptors` for these op types.
- Size the pool by `max_burst_size`.

Warning: the slot scheme does not deliver the isolation the commit message claims ("so each in-flight op gets its own writable slice").
- Every burst restarts at slot 0, so ops still in flight from burst N share slots with burst N+1.
- `t_vec` is created once and shared by all worker lcores and queue pairs, so lcores also write into the same slots concurrently.

Output is never checked in a throughput test, so this does not corrupt results. Still, either correct the commit message, or index slots by a running per-queue-pair op counter modulo the pool size, with one pool per lcore.

Info: churn across patches 4 and 5.
- Patch 4 makes the test-data struct fields `const uint8_t *` and adds static bounce buffers in `cperf_ops.c`.
- Patch 5 reverts the const-ness and removes the bounce buffers.
- Patch 5 also strips `static` from many test-vector arrays (`mlkem_768_dk`,


More information about the test-report mailing list