|WARNING| [4/4] net/i40e: fix Rx desc write-back with interrupts disabled
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Thu Nov 26 14:49:10 CET 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/173206
_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-26
**Patch 4/4 (net/i40e: fix Rx desc write-back with interrupts disabled)**
**Error: zero-initialised node for skipped queues corrupts the cause list on first move.**
```c
pf->rxq_intr_nodes = calloc(nb_rxq, sizeof(*pf->rxq_intr_nodes));
...
if (rxq == NULL || !rxq->q_set)
continue;
i40e_rxq_intr_list_add(dev, q, sink);
```
Queues skipped here keep a calloc'd node of `{ .vec = 0, .prev = 0, .next = 0 }`. That is not a valid "not in any list" state.
If such a queue later reaches `i40e_rxq_intr_move()`, the check `pf->rxq_intr_nodes[qid].vec != vec` is true. `i40e_rxq_intr_list_del()` then treats queue 0 as the predecessor, because `node.prev == 0 != I40E_RXQ_INTR_NONE`. It then does two things:
- `i40e_rxq_intr_write_rqctl(hw, i40e_rxq_intr_hwq(dev, node.prev), node.vec, next_hwq)` rewrites queue 0's RQCTL. It points queue 0 at vector 0, with NEXTQ set to queue 0's own hw queue, which creates a self-loop in the hardware cause list.
- `nodes[0].next`/`nodes[0].prev` are overwritten.
This path is hit when a queue that was not set up at start is enabled or disabled, for example after runtime Rx queue setup.
Suggested fix: initialise every node to `vec = prev = next = I40E_RXQ_INTR_NONE`. In `i40e_rxq_intr_move()`, skip `list_del` when `vec == I40E_RXQ_INTR_NONE`, or reject the operation.
**Warning: unchecked `rte_intr_vec_list_index_get()` result truncated to `uint16_t`.**
```c
const uint16_t vec = rte_intr_vec_list_index_get(intr_handle, q);
I40E_WRITE_REG(hw, I40E_PFINT_LNKLSTN(vec - I40E_RX_VEC_START),
```
This is the same defect patch 2/4 fixes in the enable/disable callbac
More information about the test-report
mailing list