|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:50:40 CET 2026


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

_AI Code Review_

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

**Patch 4/4: net/i40e: fix Rx desc write-back with interrupts disabled**

**Warning: vector lookup error truncated to `uint16_t` in `i40e_rxq_intr_sink_setup()`**

```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),
		I40E_PFINT_LNKLSTN_FIRSTQ_INDX_MASK);
```

Patch 2/4 fixes exactly this pattern in the enable and disable callbacks, but it is reintroduced here. If `rte_intr_vec_list_index_get()` fails, the negative error becomes a large vector number. The driver then writes to an unrelated `PFINT_LNKLSTN` register.

Suggested fix: keep the result in an `int` and, if it is negative, skip the queue or abort the sink setup (free the sink vector and the two arrays).

**Warning: zero-initialised list nodes look like valid list links**

```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 `{vec = 0, prev = 0, next = 0}`. If `i40e_dev_rx_queue_intr_enable()` is later called for such a queue, `i40e_rxq_intr_move()` sees `vec != msix_intr` and calls `i40e_rxq_intr_list_del()`. Because `prev == 0` is not `I40E_RXQ_INTR_NONE`, it then:

- rewrites the `QINT_RQCTL` of queue 0's hardware queue;
- sets `nodes[0].next = 0`.

This corrupts both the software list and the hardware cause chain of whatever vector queue 0 is on.

Suggested fix: initialise every node to `vec = prev = next = I40E_RXQ_INTR_NONE`. In `i40e_rxq_intr_move()`, skip the `list_del` when `vec == I40E_RXQ_INTR_NONE`, or reject the request.

Review-Result: WARNING


More information about the test-report mailing list