[PATCH v2 0/5] net/virtio: fix Rx interrupts with MSI-X
Isaac Boukris
iboukris at gmail.com
Tue Nov 17 22:59:56 CET 2026
Since 26.11-rc2, a virtio-net PCI device on vfio-pci cannot be
configured with Rx interrupts and an offload or RSS, and it cannot be
configured a second time. For example, l3fwd-power fails to start on
it.
Patch 1 is the fix, for 26.11 and stable. The other patches are its
tests and can wait for 27.03.
- Patch 2 is a unit test of Rx interrupts on a virtio-user port.
Without the check of the interrupt handle type in the fix, this
test fails ("EAL: Wrong intr vector number"). This is why the fix
has that check.
- Patch 3 adds a testpmd option, --rxq-interrupt. With it, idle
forwarding lcores sleep on the Rx queue interrupts, as l3fwd-power
does. It will need a line in the 27.03 release notes.
- Patches 4 and 5 add a DTS suite that uses this option. It has two
test cases. In the first, each packet sent to the port must wake
the lcore up, also after the port is configured a second time with
the same number of queues. The second does the same after the
number of queues changed, to two queues and back to one. With two
queues, both must receive packets. It is skipped if the port cannot
have two queues, or if the packets do not reach both.
Tested in a VM (QEMU 10.2, vhost-net):
- l3fwd-power in interrupt-only mode on a virtio-net PCI port. Without
patch 1 it fails as in the commit message. With it, each packet
wakes its lcore up.
- The DTS suite on a virtio-net PCI port. Without patch 1 both test
cases fail at the second configuration. With it, they pass. They
also pass on an emulated Intel 82576 port (igb driver). On a
virtio-net port with one queue pair, the second test case is
skipped.
- The unit test passes with and without patch 1.
The unit test logs "Some interrupt handle is leaking an event FD" when
it closes its port. This series does not cause it. main logs it for
any virtio-user port, with testpmd too, since commit 67813957d8
("interrupts: warn on leaked event FDs"), because virtio-user frees
its interrupt handle before it closes its call fds.
v2:
- Patch 1 keeps the eventfds when the number of Rx queues did not
change (David Marchand). It releases them only when the number
changed, and only then must an application register the Rx queue
interrupts again.
- Patches 2 to 5 are new.
Patches generated with AI assistance.
Isaac Boukris (5):
net/virtio: fix Rx interrupt setup with MSI-X
test/virtio_user: add unit test of Rx interrupts
app/testpmd: add Rx queue interrupts option
dts: support virtio PCI ports
dts: add Rx interrupt test suite
MAINTAINERS | 1 +
app/test-pmd/parameters.c | 8 +
app/test-pmd/testpmd.c | 86 +++++-
app/test-pmd/testpmd.h | 2 +
app/test/meson.build | 1 +
app/test/test_pmd_virtio_user.c | 296 +++++++++++++++++++
doc/api/dts/tests.TestSuite_rx_interrupt.rst | 8 +
doc/guides/testpmd_app_ug/run_app.rst | 7 +
drivers/net/virtio/virtio_ethdev.c | 18 +-
dts/api/params/types.py | 1 +
dts/api/testpmd/config.py | 2 +
dts/framework/testbed_model/linux_session.py | 9 +-
dts/tests/TestSuite_rx_interrupt.py | 122 ++++++++
13 files changed, 554 insertions(+), 7 deletions(-)
create mode 100644 app/test/test_pmd_virtio_user.c
create mode 100644 doc/api/dts/tests.TestSuite_rx_interrupt.rst
create mode 100644 dts/tests/TestSuite_rx_interrupt.py
--
2.56.1
More information about the dev
mailing list