|SUCCESS| net/mlx5: fix Tx completion index wrap
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Nov 17 10:59:45 CET 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/172950
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-17
**Info**
1. The struct reorder in `mlx5_tx.h` may add padding to a hot-path, cache-aligned structure.
```
uint16_t cqe_s; /* Number of CQ elements. */
+ uint32_t cq_ci; /* Consumer index for completion queue (doorbell takes low 24 bits). */
+ uint32_t cq_pi; /* Production index for completion queue. */
uint16_t cqe_m; /* Mask for CQ indices. */
```
The two new `uint32_t` fields sit between the `uint16_t` fields `cqe_s` and `cqe_m`. Depending on the offset of `cqe_s`, this can leave 2 bytes of padding before `cq_ci` and after `cqe_m`.
Keeping `cqe_s` and `cqe_m` adjacent, with the 32-bit indices after them, keeps the 16-bit fields packed. It also makes any layout change to `struct mlx5_txq_data` easier to check with pahole:
```c
uint16_t cqe_s; /* Number of CQ elements. */
uint16_t cqe_m; /* Mask for CQ indices. */
uint32_t cq_ci; /* Consumer index for completion queue. */
uint32_t cq_pi; /* Production index for completion queue. */
```
Review-Result: CLEAN
More information about the test-report
mailing list