|SUCCESS| [v2,2/2] net/mlx5: add helper to check Rx CQE

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Mon Nov 30 12:38:56 CET 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/173410

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-30

**Patch 2/2: net/mlx5: add helper to check Rx CQE**

Info: the helper takes the CQ size in two different forms, which makes the signature misleading.

```c
mlx5_rxq_check_cqe(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
		   const uint16_t cqes_n, const uint32_t ci)
{
	return rxq->cqe_comp_layout ?
	       check_cqe_iteration(cqe, rxq->cqe_n, ci) :
	       check_cqe(cqe, cqes_n, ci);
}
```

- The `cqes_n` parameter is used only in the owner-bit branch.
- The enhanced-layout branch ignores it and reads `rxq->cqe_n` (the log2 size) from the queue instead.
- The Doxygen describes `cqes_n` only as "Size of completion queue", so a reader could assume it applies to both checks.

This is not a bug, since both callers pass `1 << rxq->cqe_n`-equivalent values as before. Consider either of these:

- State in the comment that `cqes_n` is used only for the owner-bit check.
- Derive both values from `rxq` inside the helper and drop the parameter.

`rxq` could also be `const struct mlx5_rxq_data *`.

Review-Result: CLEAN


More information about the test-report mailing list