|WARNING| [v2,5/5] dts: add Rx interrupt test suite
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Nov 17 23:25:21 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 a port that cannot do Rx interrupts fails silently.
```c
rte_eth_dev_rx_intr_ctl_q(fsm[sm_id]->rx_port, fsm[sm_id]->rx_queue,
RTE_EPOLL_PER_THREAD, op, NULL);
```
```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);
```
- If `rte_eth_dev_rx_intr_ctl_q()` fails, the queue's eventfd is never added to the per-thread epoll instance.
- Every idle iteration then blocks the full 10 ms in `rte_epoll_wait()` without any wakeup source. Forwarding degrades to 10 ms polling, and only an `RX-wakeups` count of 0 hints at it.
- Suggested fix: check the return in `rxq_interrupt_register()`. At least log the failing port and queue, for example with `fprintf(stderr, ...)` as testpmd does elsewhere. Optionally keep the lcore polling, without sleeping, when registration failed.
- Do the same for enable/disable in `rxq_interrupt_turn()`.
Info: `rx_wakeups` is a plain `uint64_t` shared across threads.
```c
fc->rx_wakeups++;
```
It is written by the forwarding lcore and read by the main thread in `fwd_stats_display()` while forwarding runs. This matches the existing non-atomic per-stream counters in testpmd, so it is consistent with current practice. A relaxed atomic would make the cross-thread read well-defined, for example `rte_atomic_fetch_add_explicit(..., rte_memory_order_relaxed)` on the writer side and a relaxed load on the reader side.
**Patch 2/5 (test/virtio_user: add unit test of Rx interrupts)**
Info: when an assertion fails inside the loop, the Rx queue interrupt stays registered in the per-thread epoll instance.
```c
ret = rte_eth_dev_rx_intr_ctl_q(port_id, 0, RTE_EPOLL_PER_THREAD, RTE_INTR_EVENT_ADD,
NULL);
```
`TEST_ASSERT` returns early, so the matching `RTE_INTR_EVENT_DEL` is skipped. The suite then closes the port with the fd still in the epoll set. The suite has a single case, so the impact is limited. Moving the DEL into a common exit path would keep later cases, if added, independent.
**Patch 5/5 (dts: add Rx interrupt test suite)**
Info: the per-queue check hardcodes port 0 as the ingress port.
```python
f"RX Port= 0/Queue= {queue}" in statistics,
```
This assumes the ingress port is testpmd port 0. If the topology maps the ingress port to another port ID, the test case is skipped rather than run. Deriving the port ID from the topology would avoid that.
Review-Result: WARNING
More information about the test-report
mailing list