|WARNING| [v2,5/5] dts: add Rx interrupt test suite

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Tue Nov 17 23:39:58 CET 2026


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

_AI Code Review_

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

**Patch 3/5: app/testpmd: add Rx queue interrupts option**

Warning: the return values of the Rx interrupt calls are ignored, so failures are silent.

```c
		if (on)
			rte_eth_dev_rx_intr_enable(fs->rx_port, fs->rx_queue);
		else
			rte_eth_dev_rx_intr_disable(fs->rx_port, fs->rx_queue);
```

```c
		rte_eth_dev_rx_intr_ctl_q(fsm[sm_id]->rx_port, fsm[sm_id]->rx_queue,
					  RTE_EPOLL_PER_THREAD, op, NULL);
```

- If a driver does not support Rx queue interrupts, or registering the queue fails, `rte_epoll_wait()` has nothing to wake it.
- Each idle lcore then sleeps the full 10 ms on every idle loop.
- `RX-wakeups` stays at 0, and nothing tells the user why. Since this option exists to test drivers' Rx interrupt support, that hides exactly what it should report.
- Fix: check the return values. At least log once per port/queue on failure, for example in `rxq_interrupt_register()`, which runs once per lcore start. Alternatively, fail the start when registration fails.

Info: `fc->rx_wakeups` is incremented by the forwarding lcore and read by the main thread without atomics.

```c
			rx_wakeups += fwd_lcores[lc_id]->rx_wakeups;
```

- The DTS suite in patch 5/5 polls `show fwd stats all` while forwarding runs, so this read is concurrent with `fc->rx_wakeups++`.
- This matches how other testpmd stream counters are handled, so the risk is a torn or stale read, not a crash.
- Using `rte_atomic_fetch_add_explicit()` / `rte_atomic_load_explicit()` with `rte_memory_order_relaxed` would make it well-defined.

Info: `rxq_interrupt` is a pure on/off flag declared as `uint8_t`.

```c
uint8_t rxq_interrupt;
```

`bool` would state the intent. `uint8_t` does match the neighbouring `lsc_interrupt`/`rmv_interrupt` flags, so this is optional.

**Patch 2/5: test/virtio_user: add unit test of Rx interrupts**

Info: the per-thread epoll registration can be left behind when the case fails.

```c
		TEST_ASSERT(ret == 1, "no Rx interrupt within %d ms", WAIT_MS);
```

- Any failing `TEST_ASSERT` inside the loop in `rx_intr_wakes()` returns before the `RTE_INTR_EVENT_DEL` call.
- The queue's interrupt then stays registered with the thread's epoll instance after the case fails.
- It is harmless for a single test case, but a cleanup label would keep later cases in the suite independent.

Review-Result: WARNING


More information about the test-report mailing list