net/virtio: fix Rx interrupts with MSI-X
Subsystems (2)
cover net/virtio: fix Rx interrupts with MSI-X
Since 26.11-rc2, a virtio-net PCI device on vfio-pci cannot be configured with Rx interrupts and an offload or RSS, nor configured a second time: l3fwd-power fails to start on it. This patch fixes it; it is for 26.11 and stable.
Tested in a VM (QEMU 10.2, vhost-net):
- l3fwd-power in interrupt-only mode on a virtio-net PCI port. Without the patch it fails as in the commit message. With it, it starts and each packet wakes its lcore up.
- A port stopped, configured again and started: Rx interrupts still wake the lcore up (testpmd, with a patch that makes it sleep on them).
- Rx interrupts on a virtio-user port with a vhost-net backend, which the patch leaves alone: they work as before.
The legacy DTS has a test plan for this very case, vhost_virtio_pmd_interrupt (l3fwd-power in a VM, on a virtio-net device bound to vfio-pci); I did not run it. I will try to come up with a follow up test for the DTS in the main tree, adding an option for testpmd to sleep on Rx interrupts and a suite that uses it.
Patch generated with AI assistance.
Isaac Boukris (1):
net/virtio: fix Rx interrupt setup with MSI-X
drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)
Signature · 1 line
2.56.1
PATCH 1/1 net/virtio: fix Rx interrupt setup with MSI-X
With Rx interrupts enabled, configuring a port initializes the device, and a second time when an offload or RSS is requested. Each initialization enables the interrupt eventfds.
EAL now refuses to enable MSI-X eventfds twice, so such a configuration fails, and so does configuring a port a second time:
EAL: Interrupt eventfds are already enabled
virtio_configure_intr(): Fail to create eventfd
ETHDEV: Port0 dev_configure = -16
Before that EAL change, the previous eventfds were leaked.
Disable the interrupts and release the eventfds before enabling them again.
Do it for a VFIO MSI-X handle only, the type whose eventfds EAL creates. The other type that gets here is virtio-user's: its eventfds are the backend's call fds, set once when the device is created. Releasing them would reset their count, which nothing sets again, and registering an Rx queue's interrupt would then fail.
To reproduce, with a virtio-net PCI device bound to vfio-pci:
dpdk-l3fwd-power -l 0 -a 0000:0c:00.0 -- -p 1 --interrupt-only \
--parse-ptype --config="(0,0,0)"--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/virtio/virtio_ethdev.c +7 -0
@@ -1455,6 +1455,13 @@ virtio_configure_intr(struct rte_eth_dev *dev)return -ENOTSUP ; } +/* Reinitialization: release the previous eventfds first. */ +if (rte_intr_type_get (dev->intr_handle) ==RTE_INTR_HANDLE_VFIO_MSIX && +rte_intr_dp_is_en (dev->intr_handle)) { +virtio_intr_disable (dev); +rte_intr_efd_disable (dev->intr_handle); + } + ret =rte_intr_efd_enable (dev->intr_handle, dev->data->nb_rx_queues);if (ret <0 ) {PMD_INIT_LOG (ERR ,"Fail to create eventfd" );
Signature · 1 line
2.56.1
Re: [PATCH 1/1] net/virtio: fix Rx interrupt setup with MSI-X
Hello,
Quoted 25 lines · Isaac Boukris
With Rx interrupts enabled, configuring a port initializes the device, and a second time when an offload or RSS is requested. Each initialization enables the interrupt eventfds.
EAL now refuses to enable MSI-X eventfds twice, so such a configuration fails, and so does configuring a port a second time:
EAL: Interrupt eventfds are already enabled
virtio_configure_intr(): Fail to create eventfd
ETHDEV: Port0dev_configure= -16Before that EAL change, the previous eventfds were leaked.
Disable the interrupts and release the eventfds before enabling them again.
Do it for a VFIO MSI-X handle only, the type whose eventfds EAL creates. The other type that gets here is virtio-user's: its eventfds are the backend's call fds, set once when the device is created. Releasing them would reset their count, which nothing sets again, and registering an Rx queue's interrupt would then fail.
To reproduce, with a virtio-net PCI device bound to vfio-pci:
Quoted 7 lines
dpdk-l3fwd-power -l 0 -a 0000:0c:00.0 -- -p 1 --interrupt-only \ --parse-ptype --config="(0,0,0)"Fixes 3ba6b689893f ("eal/linux: fix eventfd leaks when enabling interrupts")Signed-off-by Isaac Boukris <[email protected]>
Thank you for the testing and report.
Quoted 9 lines
--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/virtio/virtio_ethdev.c +0
-0
drivers/net/virtio/virtio_ethdev.c virtio_configure_intr(struct rte_eth_dev *dev) · line 1460
Quoted 6 lines
drivers/net/virtio/virtio_ethdev.c +3
-0@@ -1455,6 +1455,13 @@ virtio_configure_intr(struct rte_eth_dev *dev)return -ENOTSUP ; } +/* Reinitialization: release the previous eventfds first. */ +if (rte_intr_type_get (dev->intr_handle) ==RTE_INTR_HANDLE_VFIO_MSIX && +rte_intr_dp_is_en (dev->intr_handle)) {
The rte_intr_cap_multiple() guard right before should enough (for the interrupt type check).
drivers/net/virtio/virtio_ethdev.c virtio_configure_intr(struct rte_eth_dev *dev) · line 1464
Quoted 4 lines
drivers/net/virtio/virtio_ethdev.c +4
-0+virtio_intr_disable (dev); +rte_intr_efd_disable (dev->intr_handle); + } +
Can the number of rxq change at this point?
I don't think it is the case.
If it can't, why do we need to release/set up new eventfds?
The fix could be a simple:
+ if (rte_intr_dp_is_en(dev->intr_handle)) {
drivers/net/virtio/virtio_ethdev.c virtio_configure_intr(struct rte_eth_dev *dev) · line 1467
Quoted 3 lines
drivers/net/virtio/virtio_ethdev.c +0
-0ret =rte_intr_efd_enable (dev->intr_handle, dev->data->nb_rx_queues);if (ret <0 ) {PMD_INIT_LOG (ERR ,"Fail to create eventfd" );
+ }
We could probably move the rte_intr_vec_list_alloc call under this check too, but iiuc, this helper does nothing when called multiple times.
Signature · 1 line
David Marchand
Re: [PATCH 1/1] net/virtio: fix Rx interrupt setup with MSI-X
Hi David,
Quoted 52 lines · David Marchand
Hello,
Quoted 25 lines · Isaac Boukris
With Rx interrupts enabled, configuring a port initializes the device, and a second time when an offload or RSS is requested. Each initialization enables the interrupt eventfds.
EAL now refuses to enable MSI-X eventfds twice, so such a configuration fails, and so does configuring a port a second time:
EAL: Interrupt eventfds are already enabled
virtio_configure_intr(): Fail to create eventfd
ETHDEV: Port0dev_configure= -16Before that EAL change, the previous eventfds were leaked.
Disable the interrupts and release the eventfds before enabling them again.
Do it for a VFIO MSI-X handle only, the type whose eventfds EAL creates. The other type that gets here is virtio-user's: its eventfds are the backend's call fds, set once when the device is created. Releasing them would reset their count, which nothing sets again, and registering an Rx queue's interrupt would then fail.
To reproduce, with a virtio-net PCI device bound to vfio-pci:
Quoted 7 lines
dpdk-l3fwd-power -l 0 -a 0000:0c:00.0 -- -p 1 --interrupt-only \ --parse-ptype --config="(0,0,0)"Fixes 3ba6b689893f ("eal/linux: fix eventfd leaks when enabling interrupts")Signed-off-by Isaac Boukris <[email protected]>Thank you for the testing and report.
Quoted 12 lines
--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/virtio/virtio_ethdev.c +0
-0@@ -1455,6 +1455,13 @@ virtio_configure_intr(struct rte_eth_dev *dev)return -ENOTSUP ; }
Quoted 6 lines
drivers/net/virtio/virtio_ethdev.c virtio_configure_intr(struct rte_eth_dev *dev) · line 1460
Quoted 3 lines
drivers/net/virtio/virtio_ethdev.c +3
-0+/* Reinitialization: release the previous eventfds first. */ +if (rte_intr_type_get (dev->intr_handle) ==RTE_INTR_HANDLE_VFIO_MSIX && +rte_intr_dp_is_en (dev->intr_handle)) {The
rte_intr_cap_multiple()guard right before should enough (for the interrupt type check).
Actually this check was added due to a real issue with virtio-user which also returns true for this guard.
Quoted 12 lines
drivers/net/virtio/virtio_ethdev.c virtio_configure_intr(struct rte_eth_dev *dev) · line 1464
Quoted 4 lines
drivers/net/virtio/virtio_ethdev.c +4
-0+virtio_intr_disable (dev); +rte_intr_efd_disable (dev->intr_handle); + } +Can the number of rxq change at this point?
I don't think it is the case.If it can't, why do we need to release/set up new eventfds?
The fix could be a simple:
Quoted 7 lines
+ if (
rte_intr_dp_is_en(dev->intr_handle)) {drivers/net/virtio/virtio_ethdev.c virtio_configure_intr(struct rte_eth_dev *dev) · line 1467
Quoted 3 lines
drivers/net/virtio/virtio_ethdev.c +0
-0ret =rte_intr_efd_enable (dev->intr_handle, dev->data->nb_rx_queues);if (ret <0 ) {PMD_INIT_LOG (ERR ,"Fail to create eventfd" );+ }
I think it could change if reconfigure is called multiple times, i'll try to test it but we could still limit iit to that case, which would make it even easier on the caller as it doesn't have to get the new efds if he didn't change rxq number (although for non-virtio drivers one probably still have to).
Quoted 8 lines
We could probably move the
rte_intr_vec_list_alloccall under this check too, but iiuc, this helper does nothing when called multiple times.--
David Marchand
Re: [PATCH 1/1] net/virtio: fix Rx interrupt setup with MSI-X
In reply to David MarchandHey David,
Between the feedback from the upstream bot and my own, the series has reached V4 and grown to 8 patches but they all centered around virtio-user and are relatively simple, and the dust seems to have settled down.
Cheers
v2 cover net/virtio: fix Rx interrupts with MSI-X
In reply to Isaac BoukrisSince 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
Signature · 1 line
2.56.1
PATCH v2 1/5 net/virtio: fix Rx interrupt setup with MSI-X
With Rx interrupts enabled, configuring a port initializes the device, and a second time when an offload or RSS is requested. Each initialization enables the interrupt eventfds.
EAL now refuses to enable MSI-X eventfds twice, so such a configuration fails, and so does configuring a port a second time:
EAL: Interrupt eventfds are already enabled
virtio_configure_intr(): Fail to create eventfd
ETHDEV: Port0 dev_configure = -16
Before that EAL change, the previous eventfds were leaked.
Enable the eventfds only when they are not enabled yet. There is one eventfd per Rx queue. So if the number of Rx queues changed, release the eventfds first, and new ones are created. The application must then register the Rx queue interrupts again.
Release them for a VFIO MSI-X handle only, the type whose eventfds EAL creates. The other type that gets here is the virtio-user one. Its eventfds are the backend's call fds, one per queue pair, set once when the device is created. Releasing them would reset their count, which nothing sets again, and registering an Rx queue's interrupt would then fail.
To reproduce, with a virtio-net PCI device bound to vfio-pci:
dpdk-l3fwd-power -l 0 -a 0000:0c:00.0 -- -p 1 --interrupt-only \
--parse-ptype --config="(0,0,0)"---
v2: keep the eventfds unless the number of Rx queues changed (David Marchand).
drivers/net/virtio/virtio_ethdev.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
drivers/net/virtio/virtio_ethdev.c +14 -4
@@ -1455,10 +1455,20 @@ virtio_configure_intr(struct rte_eth_dev *dev)return -ENOTSUP ; } - ret =rte_intr_efd_enable (dev->intr_handle, dev->data->nb_rx_queues); -if (ret <0 ) { -PMD_INIT_LOG (ERR ,"Fail to create eventfd" ); -return ret; +/* On reinitialization, release the eventfds if the number of Rx queues changed. */ +if (rte_intr_type_get (dev->intr_handle) ==RTE_INTR_HANDLE_VFIO_MSIX && +rte_intr_dp_is_en (dev->intr_handle) && +rte_intr_nb_efd_get (dev->intr_handle) != dev->data->nb_rx_queues) { +virtio_intr_disable (dev); +rte_intr_efd_disable (dev->intr_handle); + } + +if (!rte_intr_dp_is_en (dev->intr_handle)) { + ret =rte_intr_efd_enable (dev->intr_handle, dev->data->nb_rx_queues); +if (ret <0 ) { +PMD_INIT_LOG (ERR ,"Fail to create eventfd" ); +return ret; + } } ret = rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec",
Signature · 1 line
2.56.1
PATCH v2 2/5 test/virtio_user: add unit test of Rx interrupts
In reply to Isaac BoukrisAdd a test suite for the virtio PMD on a virtio-user port backed by vhost-net and a TAP interface, modeled on the test suite of the TAP PMD. It needs no VM and no PCI device. It is skipped where the port cannot be created (no root, no /dev/vhost-net).
The first case configures the port with Rx interrupts and an Rx offload. It enables the interrupt of the Rx queue, sends a frame from the kernel and sleeps on the interrupt. The frame must end the sleep. Then it does the same after a second configure.
The port has two queue pairs and the test configures one Rx queue, so the port has more interrupt eventfds than Rx queues. These eventfds are the backend's call fds, and the driver must not release them. If it does when it initializes the device again, the test fails.
DPDK_TEST=virtio_user_pmd_autotest ./build/app/dpdk-test --no-huge
--- MAINTAINERS | 1 + app/test/meson.build | 1 + app/test/test_pmd_virtio_user.c | 296 ++++++++++++++++++++++++++++++++ 3 files changed, 298 insertions(+) create mode 100644 app/test/test_pmd_virtio_user.c
MAINTAINERS +1 -0
@@ -1106,6 +1106,7 @@ T: git://dpdk.org/next/dpdk-next-virtio F: drivers/net/virtio/ F: doc/guides/nics/virtio.rst F: doc/guides/nics/features/virtio*.ini +F: app/test/test_pmd_virtio_user.c Wind River AVP M: Steven Webster <[email protected]>
app/test/meson.build +1 -0
@@ -155,6 +155,7 @@ source_file_deps = { 'test_pmd_ring.c': ['net_ring', 'ethdev', 'bus_vdev'], 'test_pmd_ring_perf.c': ['ethdev', 'net_ring', 'bus_vdev'], 'test_pmd_tap.c': ['ethdev', 'net_tap', 'bus_vdev'], + 'test_pmd_virtio_user.c': ['ethdev', 'net_virtio', 'bus_vdev'], 'test_pmu.c': ['pmu'], 'test_power.c': ['power', 'power_acpi', 'power_kvm_vm', 'power_intel_pstate', 'power_amd_pstate', 'power_cppc'],
app/test/test_pmd_virtio_user.c new file +296 -0
296 lines not on this page · raw message
Signature · 1 line
2.56.1
PATCH v2 3/5 app/testpmd: add Rx queue interrupts option
In reply to Isaac Boukristestpmd cannot test the Rx queue interrupts of a driver, because it never asks for them.
With --rxq-interrupt, the ports are configured with Rx queue interrupts, and a forwarding lcore whose Rx queues are all empty sleeps until a packet arrives on one of them, 10 ms at most, as l3fwd-power does. The forward statistics show the number of sleeps that an interrupt ended.
--- app/test-pmd/parameters.c | 8 +++ app/test-pmd/testpmd.c | 86 ++++++++++++++++++++++++++- app/test-pmd/testpmd.h | 2 + doc/guides/testpmd_app_ug/run_app.rst | 7 +++ 4 files changed, 101 insertions(+), 2 deletions(-)
app/test-pmd/parameters.c +8 -0
@@ -207,6 +207,8 @@ enum {TESTPMD_OPT_NO_LSC_INTERRUPT_NUM , #define TESTPMD_OPT_NO_RMV_INTERRUPT "no-rmv-interrupt"TESTPMD_OPT_NO_RMV_INTERRUPT_NUM , +#define TESTPMD_OPT_RXQ_INTERRUPT "rxq-interrupt" +TESTPMD_OPT_RXQ_INTERRUPT_NUM , #define TESTPMD_OPT_PRINT_EVENT "print-event"TESTPMD_OPT_PRINT_EVENT_NUM , #define TESTPMD_OPT_MASK_EVENT "mask-event"
@@ -357,6 +359,7 @@ static const struct option long_options[] = {NO_ARG (TESTPMD_OPT_DISABLE_DEVICE_START ),NO_ARG (TESTPMD_OPT_NO_LSC_INTERRUPT ),NO_ARG (TESTPMD_OPT_NO_RMV_INTERRUPT ), +NO_ARG (TESTPMD_OPT_RXQ_INTERRUPT ),REQUIRED_ARG (TESTPMD_OPT_PRINT_EVENT ),REQUIRED_ARG (TESTPMD_OPT_MASK_EVENT ), REQUIRED_ARG(TESTPMD_OPT_TX_OFFLOADS),
@@ -515,6 +518,8 @@ usage(char* progname)printf (" --disable-device-start: do not automatically start port\n" );printf (" --no-lsc-interrupt: disable link status change interrupt.\n" );printf (" --no-rmv-interrupt: disable device removal interrupt.\n" ); +printf (" --rxq-interrupt: enable Rx queue interrupts, " +"idle forwarding lcores sleep.\n" );#ifdef RTE_LIB_BITRATESTATS printf (" --bitrate-stats=N: set the logical core N to perform " "bit-rate calculation.\n" );
@@ -1638,6 +1643,9 @@ launch_args_parse(int argc, char** argv)case TESTPMD_OPT_NO_RMV_INTERRUPT_NUM : rmv_interrupt =0 ;break ; +case TESTPMD_OPT_RXQ_INTERRUPT_NUM : + rxq_interrupt =1 ; +break ;case TESTPMD_OPT_FLOW_ISOLATE_ALL_NUM : flow_isolate_all =1 ;break ;
app/test-pmd/testpmd.c +84 -2
158 lines not on this page · raw message
app/test-pmd/testpmd.h +2 -0
@@ -405,6 +405,7 @@ struct fwd_lcore {lcoreid_t cpuid_idx;/**< index of logical core in CPU id table */ volatile char stopped;/**< stop forwarding when set */ uint64_t total_cycles;/**< used with --record-core-cycles */ +uint64_t rx_wakeups;/**< used with --rxq-interrupt */ };/*
@@ -541,6 +542,7 @@ extern uint8_t no_device_start; /**<set by "--disable-device-start" parameter */extern volatile int test_done;/* stop packet forwarding when set to 1. */ extern uint8_t lsc_interrupt;/**< disabled by "--no-lsc-interrupt" parameter */ extern uint8_t rmv_interrupt;/**< disabled by "--no-rmv-interrupt" parameter */ +extern uint8_t rxq_interrupt;/**< enabled by "--rxq-interrupt" parameter */ extern uint32_t event_print_mask;/**< set by "--print-event xxxx" and "--mask-event xxxx parameters */ extern bool setup_on_probe_event;/**< disabled by port setup-on iterator */
doc/guides/testpmd_app_ug/run_app.rst +7 -0
@@ -462,6 +462,13 @@ The command line options are: Disable RMV interrupts for all ports, even those supporting it. +* ``--rxq-interrupt`` + + Enable Rx queue interrupts for all ports. + A forwarding lcore whose Rx queues are all empty sleeps + until a packet arrives on one of them, 10 ms at most. + The forward statistics show the number of sleeps that an interrupt ended (``RX-wakeups``). + * ``--bitrate-stats=N`` Set the logical core N to perform bitrate calculation.
Signature · 1 line
2.56.1
PATCH v2 4/5 dts: support virtio PCI ports
In reply to Isaac BoukrisDTS reads the logical name and the MAC address of a port from the lshw entry of its PCI device. A virtio device has none there, because lshw lists its network interface as a device of its own, on the virtio bus, right after the PCI device. The test run setup then fails:
Could not gather a valid MAC address and/or logical name for port port-0 in node SUT 1.
Copy to the entry of the PCI device what it lacks from the entry of its interface.
--- dts/framework/testbed_model/linux_session.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
dts/framework/testbed_model/linux_session.py +8 -1
@@ -438,7 +438,14 @@ def get_pci_addr_of_vfs(self, pf_port: Port) -> list[str]: @cached_property def _lshw_net_info(self) -> list[LshwOutput]: output = self.send_command("lshw -quiet -json -C network", verify=True) - return json.loads(output.stdout) + ports = json.loads(output.stdout) + # The network interface of a virtio device is an entry of its own, on the virtio bus, + # right after the entry of the PCI device. Copy from it what the PCI entry lacks. + for device, interface in zip(ports, ports[1:]): + if "logicalname" not in device and interface.get("businfo", "").startswith("virtio@"): + configuration = interface.get("configuration", {}) | device.get("configuration", {}) + device.update(interface | device | {"configuration": configuration}) + return ports def refresh_lshw(self) -> None: """Force refresh of cached lshw network info."""
Signature · 1 line
2.56.1
PATCH v2 5/5 dts: add Rx interrupt test suite
In reply to Isaac BoukrisTest that packets received on a port wake up a testpmd lcore that sleeps on the Rx queues' interrupts (testpmd's --rxq-interrupt).
The first test case also tests it after the ports are configured a second time, with the same number of queues.
The second test case tests it after the number of queues changed. It configures the ports with two queues, then with one queue. The packets differ in their source address, to spread over the queues, and with two queues both must receive packets. The test case is skipped if a port cannot have two queues, or if the packets do not reach both queues.
The test cases run on the ingress port of the test run, so they test the driver of that port. For the virtio PCI driver, the SUT is a VM and its port a virtio-net device.
--- doc/api/dts/tests.TestSuite_rx_interrupt.rst | 8 ++ dts/api/params/types.py | 1 + dts/api/testpmd/config.py | 2 + dts/tests/TestSuite_rx_interrupt.py | 122 +++++++++++++++++++ 4 files changed, 133 insertions(+) create mode 100644 doc/api/dts/tests.TestSuite_rx_interrupt.rst create mode 100644 dts/tests/TestSuite_rx_interrupt.py
doc/api/dts/tests.TestSuite_rx_interrupt.rst new file +8 -0
@@ -0,0 +1,8 @@ +.. SPDX-License-Identifier: BSD-3-Clause + +rx_interrupt Test Suite +======================= + +.. automodule:: tests.TestSuite_rx_interrupt + :members: + :show-inheritance:
dts/api/params/types.py +1 -0
@@ -190,6 +190,7 @@ class TestPmdParamsDict(EalParamsDict, total=False): disable_device_start: Switch no_lsc_interrupt: Switch no_rmv_interrupt: Switch + rxq_interrupt: Switch bitrate_stats: int | None latencystats: int | None print_events: list[Event] | None
dts/api/testpmd/config.py +2 -0
@@ -491,6 +491,7 @@ class TestPmdParams(EalParams): for the first time. no_lsc_interrupt: Disable LSC interrupts for all ports, even those supporting it. no_rmv_interrupt: Disable RMV interrupts for all ports, even those supporting it. + rxq_interrupt: Enable Rx queue interrupts for all ports. Idle forwarding lcores sleep. bitrate_stats: Set the logical core N to perform bitrate calculation. latencystats: Set the logical core N to perform latency and jitter calculations. print_events: Enable printing the occurrence of the designated events.
@@ -596,6 +597,7 @@ class TestPmdParams(EalParams): disable_device_start: Switch = None no_lsc_interrupt: Switch = None no_rmv_interrupt: Switch = None + rxq_interrupt: Switch = None bitrate_stats: int | None = None latencystats: int | None = None print_events: list[Event] | None = field(
dts/tests/TestSuite_rx_interrupt.py new file +122 -0
122 lines not on this page · raw message
Signature · 1 line
2.56.1
v3 cover net/virtio: fix Rx interrupts with MSI-X
In reply to Isaac BoukrisSince 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 can wait for 27.03.
- Patch 2 fixes a packet loss on virtio-user ports with vhost-net. The unit test of v2 found it. When the application uses fewer Rx queues than the port has queue pairs, the kernel still sends flows to the TAP queues of the unused queue pairs, and they are lost. The driver detached these queues before 21.11.
- Patch 3 is a unit test of it, on a virtio-user port with two queue pairs and one Rx queue.
- Patch 4 adds a unit test of Rx interrupts on that port. Without the check of the interrupt handle type in patch 1, this test fails ("EAL: Wrong intr vector number"). This is why patch 1 has that check.
- Patch 5 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 6 and 7 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.
- testpmd, receiving, on a virtio-user port with two queue pairs, while the kernel sends 64 UDP flows on the TAP interface. With one Rx queue, 22 flows arrive without patch 2, and all 64 with it. With two Rx queues, all arrive with and without it. A port of the TAP driver, and a virtio-net PCI port of QEMU with four queue pairs, receive all 64 on one Rx queue.
- The unit tests pass. Without patch 2, the first one fails. Without the handle type check of patch 1, the second one fails.
The unit tests log "Some interrupt handle is leaking an event FD" when they close their 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.
v3:
- Patches 2 and 3 are new. In v2, the unit test of Rx interrupts failed on about half of the CI hosts, because the kernel sent its frame to the TAP queue of the unused queue pair. Patch 2 fixes that in the driver.
- Patch 4 is that unit test, on top of patch 3. Its frame is now an IPv4 one.
- Patch 5: testpmd logs an error when the interrupt of an Rx queue cannot be registered (AI review).
- Patches 1, 6 and 7 are unchanged.
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.
- The unit test, the testpmd option and the DTS suite are new.
Patches generated with AI assistance.
Isaac Boukris (7):
net/virtio: fix Rx interrupt setup with MSI-X net/virtio-user: fix packet loss with unused queue pairs test/virtio_user: add unit test of unused queue pairs 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 | 93 ++++- app/test-pmd/testpmd.h | 2 + app/test/meson.build | 1 + app/test/test_pmd_virtio_user.c | 339 ++++++++++++++++++ doc/api/dts/tests.TestSuite_rx_interrupt.rst | 8 + doc/guides/testpmd_app_ug/run_app.rst | 8 + drivers/net/virtio/virtio_ethdev.c | 18 +- drivers/net/virtio/virtio_user/vhost_kernel.c | 12 + .../net/virtio/virtio_user/vhost_kernel_tap.c | 14 + .../net/virtio/virtio_user/vhost_kernel_tap.h | 4 + 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 +++++++ 16 files changed, 635 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
Signature · 1 line
2.56.1
PATCH v3 1/7 net/virtio: fix Rx interrupt setup with MSI-X
With Rx interrupts enabled, configuring a port initializes the device, and a second time when an offload or RSS is requested. Each initialization enables the interrupt eventfds.
EAL now refuses to enable MSI-X eventfds twice, so such a configuration fails, and so does configuring a port a second time:
EAL: Interrupt eventfds are already enabled
virtio_configure_intr(): Fail to create eventfd
ETHDEV: Port0 dev_configure = -16
Before that EAL change, the previous eventfds were leaked.
Enable the eventfds only when they are not enabled yet. There is one eventfd per Rx queue. So if the number of Rx queues changed, release the eventfds first, and new ones are created. The application must then register the Rx queue interrupts again.
Release them for a VFIO MSI-X handle only, the type whose eventfds EAL creates. The other type that gets here is the virtio-user one. Its eventfds are the backend's call fds, one per queue pair, set once when the device is created. Releasing them would reset their count, which nothing sets again, and registering an Rx queue's interrupt would then fail.
To reproduce, with a virtio-net PCI device bound to vfio-pci:
dpdk-l3fwd-power -l 0 -a 0000:0c:00.0 -- -p 1 --interrupt-only \
--parse-ptype --config="(0,0,0)"---
v2: keep the eventfds unless the number of Rx queues changed (David Marchand).
drivers/net/virtio/virtio_ethdev.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
drivers/net/virtio/virtio_ethdev.c +14 -4
@@ -1455,10 +1455,20 @@ virtio_configure_intr(struct rte_eth_dev *dev)return -ENOTSUP ; } - ret =rte_intr_efd_enable (dev->intr_handle, dev->data->nb_rx_queues); -if (ret <0 ) { -PMD_INIT_LOG (ERR ,"Fail to create eventfd" ); -return ret; +/* On reinitialization, release the eventfds if the number of Rx queues changed. */ +if (rte_intr_type_get (dev->intr_handle) ==RTE_INTR_HANDLE_VFIO_MSIX && +rte_intr_dp_is_en (dev->intr_handle) && +rte_intr_nb_efd_get (dev->intr_handle) != dev->data->nb_rx_queues) { +virtio_intr_disable (dev); +rte_intr_efd_disable (dev->intr_handle); + } + +if (!rte_intr_dp_is_en (dev->intr_handle)) { + ret =rte_intr_efd_enable (dev->intr_handle, dev->data->nb_rx_queues); +if (ret <0 ) { +PMD_INIT_LOG (ERR ,"Fail to create eventfd" ); +return ret; + } } ret = rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec",
Signature · 1 line
2.56.1
PATCH v3 2/7 net/virtio-user: fix packet loss with unused queue pairs
In reply to Isaac BoukrisA virtio-user port on vhost-net loses received packets when the application configures fewer Rx queues than the port has queue pairs (the queues devarg). For example, with queues=2 and one Rx queue, testpmd receives 22 of 64 flows that the kernel sends on the TAP interface.
The TAP interface has one queue per queue pair, and the kernel picks the queue of a packet by a hash of its flow. The driver unsets the vhost backend of a disabled queue pair, but the TAP queue stays attached. So the kernel still sends flows to it, and nothing reads them.
The driver used to detach such a queue with TUNSETQUEUE. The commit below removed that when it moved the opening of the TAP queues to the initialization.
Detach the TAP queue of a queue pair when it is disabled, and attach it when it is enabled. The queues after the first one are detached when they are opened, because a queue pair is disabled until the driver enables it. The first queue is never detached, because the interface needs a queue.
A queue pair is also disabled for a moment when the memory table changes. Its TAP queue is then detached and attached again.
---
v3: new patch.
drivers/net/virtio/virtio_user/vhost_kernel.c | 12 ++++++++++++ drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 14 ++++++++++++++ drivers/net/virtio/virtio_user/vhost_kernel_tap.h | 4 ++++ 3 files changed, 30 insertions(+)
drivers/net/virtio/virtio_user/vhost_kernel.c +12 -0
@@ -455,6 +455,9 @@ vhost_kernel_setup(struct virtio_user_dev *dev) data->tapfds[i] =vhost_tap_open (dev->ifname, r_flags, true);if (data->tapfds[i] <0 ) goto err_tapfds; +/* The queue stays detached until its queue pair is enabled. */ +if (vhost_tap_set_queue (data->tapfds[i], false) <0 ) + goto err_tapfds; } dev->backend_data = data;
@@ -546,6 +549,12 @@ vhost_kernel_enable_queue_pair(struct virtio_user_dev *dev,PMD_DRV_LOG (ERR ,"fail to set backend for vhost kernel" );return -1 ; } +/* +* Detach the queue, so that the kernel sends its packets to the +* other queues. The interface keeps its first queue. +*/ +if (pair_idx >0 &&vhost_tap_set_queue (tapfd, false) <0 ) +return -1 ; dev->qp_enabled[pair_idx] = false;return 0 ; }
@@ -561,6 +570,9 @@ vhost_kernel_enable_queue_pair(struct virtio_user_dev *dev, vhost_tap_set_mac(data->tapfds[pair_idx], dev->mac_addr) < 0)return -1 ; +if (pair_idx >0 &&vhost_tap_set_queue (tapfd, true) <0 ) +return -1 ; +if (vhost_kernel_tap_setup (tapfd, hdr_size, dev->features) <0 ) {PMD_DRV_LOG (ERR ,"fail to setup tap for vhost kernel" );return -1 ;
drivers/net/virtio/virtio_user/vhost_kernel_tap.c +14 -0
@@ -126,6 +126,20 @@ vhost_tap_set_mac(int tapfd, uint8_t *mac)return 0 ; } +int +vhost_tap_set_queue (int tapfd,bool attach) +{ +struct ifreq ifr; + +memset (&ifr,0 ,sizeof (ifr)); + ifr.ifr_flags = attach ?IFF_ATTACH_QUEUE :IFF_DETACH_QUEUE ; +if (ioctl (tapfd,TUNSETQUEUE , (void *)&ifr) ==-1 ) { +PMD_DRV_LOG (ERR ,"TUNSETQUEUE failed: %s" ,strerror (errno)); +return -1 ; + } +return 0 ; +} +static int vhost_kernel_tap_set_offload (int fd,uint64_t features) {
drivers/net/virtio/virtio_user/vhost_kernel_tap.h +4 -0
@@ -16,12 +16,15 @@#define TUNSETSNDBUF _IOW('T', 212, int)#define TUNGETVNETHDRSZ _IOR('T', 215, int)#define TUNSETVNETHDRSZ _IOW('T', 216, int) +#define TUNSETQUEUE _IOW('T', 217, int)/* TUNSETIFF ifr flags */ #define IFF_TAP 0x0002#define IFF_NO_PI 0x1000#define IFF_VNET_HDR 0x4000#define IFF_MULTI_QUEUE 0x0100 +#define IFF_ATTACH_QUEUE 0x0200 +#define IFF_DETACH_QUEUE 0x0400#define IFF_NAPI 0x0010/* Features for GSO (TUNSETOFFLOAD). */
@@ -41,5 +44,6 @@ int vhost_tap_open(const char *ifname, unsigned int r_flags, bool multi_queue);int vhost_tap_get_name (int tapfd,char **ifname);int vhost_tap_get_flags (int tapfd,unsigned int *tap_flags);int vhost_tap_set_mac (int tapfd,uint8_t *mac); +int vhost_tap_set_queue (int tapfd,bool attach);#endif
Signature · 1 line
2.56.1
PATCH v3 3/7 test/virtio_user: add unit test of unused queue pairs
In reply to Isaac BoukrisAdd a test suite for the virtio PMD on a virtio-user port backed by vhost-net and a TAP interface, modeled on the test suite of the TAP PMD. It needs no VM and no PCI device. It is skipped where the port cannot be created (no root, no /dev/vhost-net).
The port has two queue pairs and the test configures one Rx queue. The first case sends frames of 16 flows from the kernel, through a packet socket on the TAP interface. All of them must arrive on the Rx queue. Without the fix of the unused queue pairs, the kernel sends about half of the flows to the TAP queue of the second queue pair, and they are lost.
DPDK_TEST=virtio_user_pmd_autotest ./build/app/dpdk-test --no-huge
---
v3: new patch. It has the test suite and the kernel socket that patch 2 of v2 added.
MAINTAINERS | 1 + app/test/meson.build | 1 + app/test/test_pmd_virtio_user.c | 266 ++++++++++++++++++++++++++++++++ 3 files changed, 268 insertions(+) create mode 100644 app/test/test_pmd_virtio_user.c
MAINTAINERS +1 -0
@@ -1106,6 +1106,7 @@ T: git://dpdk.org/next/dpdk-next-virtio F: drivers/net/virtio/ F: doc/guides/nics/virtio.rst F: doc/guides/nics/features/virtio*.ini +F: app/test/test_pmd_virtio_user.c Wind River AVP M: Steven Webster <[email protected]>
app/test/meson.build +1 -0
@@ -155,6 +155,7 @@ source_file_deps = { 'test_pmd_ring.c': ['net_ring', 'ethdev', 'bus_vdev'], 'test_pmd_ring_perf.c': ['ethdev', 'net_ring', 'bus_vdev'], 'test_pmd_tap.c': ['ethdev', 'net_tap', 'bus_vdev'], + 'test_pmd_virtio_user.c': ['ethdev', 'net_virtio', 'bus_vdev'], 'test_pmu.c': ['pmu'], 'test_power.c': ['power', 'power_acpi', 'power_kvm_vm', 'power_intel_pstate', 'power_amd_pstate', 'power_cppc'],
app/test/test_pmd_virtio_user.c new file +266 -0
266 lines not on this page · raw message
Signature · 1 line
2.56.1
PATCH v3 4/7 test/virtio_user: add unit test of Rx interrupts
In reply to Isaac BoukrisAdd a case that configures the port with Rx interrupts and an Rx offload. It enables the interrupt of the Rx queue, sends a frame from the kernel and sleeps on the interrupt. The frame must end the sleep. Then it does the same after a second configure.
The port has two queue pairs and the test configures one Rx queue, so the port has more interrupt eventfds than Rx queues. These eventfds are the backend's call fds, and the driver must not release them. If it does when it initializes the device again, the test fails.
---
v3: on top of the previous patch. The test frame is now an IPv4 one.
app/test/test_pmd_virtio_user.c | 73 +++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+)
app/test/test_pmd_virtio_user.c +73 -0
@@ -34,6 +34,7 @@ test_pmd_virtio_user(void)#include <rte_bus_vdev.h> #include <rte_cycles.h> +#include <rte_epoll.h> #include <rte_ethdev.h> #include <rte_ether.h> #include <rte_ip.h>
@@ -173,6 +174,77 @@ test_virtio_user_rx_flows(void)return TEST_SUCCESS ; } +/* Sleep on the Rx queue's interrupt. A frame from the kernel must end the sleep. */ +static int +rx_intr_wakes (void ) +{ +uint64_t deadline =rte_get_timer_cycles () +rte_get_timer_hz () *WAIT_MS /1000 ; +struct rte_epoll_event event; +bool found; +int ret; + + ret =rte_eth_dev_rx_intr_ctl_q (port_id,0 ,RTE_EPOLL_PER_THREAD ,RTE_INTR_EVENT_ADD , +NULL ); +TEST_ASSERT_SUCCESS (ret,"no interrupt for the Rx queue: %s" ,rte_strerror (-ret)); + +do { +/* +* Enable the interrupt before the kernel sends. A frame that +* arrives from now on raises it, also before the sleep below. +*/ + ret =rte_eth_dev_rx_intr_enable (port_id,0 ); +TEST_ASSERT_SUCCESS (ret,"Rx interrupt enable failed: %s" ,rte_strerror (-ret)); +/* Drop the frames that the kernel sent earlier, and their event. */ +port_receive (); +rte_epoll_wait (RTE_EPOLL_PER_THREAD , &event,1 ,0 ); + +TEST_ASSERT_SUCCESS (kernel_send (0 ),"kernel send failed" ); + ret =rte_epoll_wait (RTE_EPOLL_PER_THREAD , &event,1 ,WAIT_MS ); +TEST_ASSERT (ret ==1 ,"no Rx interrupt within %d ms" ,WAIT_MS ); + ret =rte_eth_dev_rx_intr_disable (port_id,0 ); +TEST_ASSERT_SUCCESS (ret,"Rx interrupt disable failed: %s" ,rte_strerror (-ret)); +/* If another frame of the kernel raised the interrupt, send again. */ + found =port_receive () !=0 ; + }while (!found &&rte_get_timer_cycles () < deadline); +TEST_ASSERT (found,"frame from the kernel not received" ); + + ret =rte_eth_dev_rx_intr_ctl_q (port_id,0 ,RTE_EPOLL_PER_THREAD ,RTE_INTR_EVENT_DEL , +NULL ); +TEST_ASSERT_SUCCESS (ret,"Rx interrupt removal failed: %s" ,rte_strerror (-ret)); + +return TEST_SUCCESS ; +} + +/* +* Rx interrupts with an offload, which makes configure initialize the device +* twice. Then a second configure. The port has more interrupt eventfds than +* Rx queues. They belong to the backend, so the driver must not release them +* when it initializes the device again. +*/ +static int +test_virtio_user_rx_intr (void ) +{ +struct rte_eth_conf conf = { + .intr_conf.rxq =1 , + .rxmode.offloads =RTE_ETH_RX_OFFLOAD_UDP_CKSUM |RTE_ETH_RX_OFFLOAD_TCP_CKSUM , + }; +struct rte_eth_dev_info info; +int round, ret; + + ret =rte_eth_dev_info_get (port_id, &info); +TEST_ASSERT_SUCCESS (ret,"dev_info failed: %s" ,rte_strerror (-ret)); + conf.rxmode.offloads &= info.rx_offload_capa; +TEST_ASSERT (conf.rxmode.offloads !=0 ,"no Rx checksum offload to request" ); + +for (round =0 ; round <2 ; round++) { +TEST_ASSERT_SUCCESS (port_start (&conf),"round %d: port start failed" , round); +TEST_ASSERT_SUCCESS (rx_intr_wakes (),"round %d: Rx interrupt failed" , round); +TEST_ASSERT_SUCCESS (port_stop (),"round %d: port stop failed" , round); + } + +return TEST_SUCCESS ; +} +static void test_virtio_user_cleanup (void ) {
@@ -251,6 +323,7 @@ static struct unit_test_suite test_pmd_virtio_user_suite = { .suite_name = "virtio-user PMD Unit Test Suite", .unit_test_cases = {TEST_CASE (test_virtio_user_rx_flows), +TEST_CASE (test_virtio_user_rx_intr), TEST_CASES_END() } };
Signature · 1 line
2.56.1
PATCH v3 5/7 app/testpmd: add Rx queue interrupts option
In reply to Isaac Boukristestpmd cannot test the Rx queue interrupts of a driver, because it never asks for them.
With --rxq-interrupt, the ports are configured with Rx queue interrupts, and a forwarding lcore whose Rx queues are all empty sleeps until a packet arrives on one of them, 10 ms at most, as l3fwd-power does. The forward statistics show the number of sleeps that an interrupt ended.
If the interrupt of an Rx queue cannot be registered, an error is logged with the port and the queue.
---
v3: log an error when the interrupt of an Rx queue cannot be registered.
app/test-pmd/parameters.c | 8 +++ app/test-pmd/testpmd.c | 93 ++++++++++++++++++++++++++- app/test-pmd/testpmd.h | 2 + doc/guides/testpmd_app_ug/run_app.rst | 8 +++ 4 files changed, 109 insertions(+), 2 deletions(-)
app/test-pmd/parameters.c +8 -0
@@ -207,6 +207,8 @@ enum {TESTPMD_OPT_NO_LSC_INTERRUPT_NUM , #define TESTPMD_OPT_NO_RMV_INTERRUPT "no-rmv-interrupt"TESTPMD_OPT_NO_RMV_INTERRUPT_NUM , +#define TESTPMD_OPT_RXQ_INTERRUPT "rxq-interrupt" +TESTPMD_OPT_RXQ_INTERRUPT_NUM , #define TESTPMD_OPT_PRINT_EVENT "print-event"TESTPMD_OPT_PRINT_EVENT_NUM , #define TESTPMD_OPT_MASK_EVENT "mask-event"
@@ -357,6 +359,7 @@ static const struct option long_options[] = {NO_ARG (TESTPMD_OPT_DISABLE_DEVICE_START ),NO_ARG (TESTPMD_OPT_NO_LSC_INTERRUPT ),NO_ARG (TESTPMD_OPT_NO_RMV_INTERRUPT ), +NO_ARG (TESTPMD_OPT_RXQ_INTERRUPT ),REQUIRED_ARG (TESTPMD_OPT_PRINT_EVENT ),REQUIRED_ARG (TESTPMD_OPT_MASK_EVENT ), REQUIRED_ARG(TESTPMD_OPT_TX_OFFLOADS),
@@ -515,6 +518,8 @@ usage(char* progname)printf (" --disable-device-start: do not automatically start port\n" );printf (" --no-lsc-interrupt: disable link status change interrupt.\n" );printf (" --no-rmv-interrupt: disable device removal interrupt.\n" ); +printf (" --rxq-interrupt: enable Rx queue interrupts, " +"idle forwarding lcores sleep.\n" );#ifdef RTE_LIB_BITRATESTATS printf (" --bitrate-stats=N: set the logical core N to perform " "bit-rate calculation.\n" );
@@ -1638,6 +1643,9 @@ launch_args_parse(int argc, char** argv)case TESTPMD_OPT_NO_RMV_INTERRUPT_NUM : rmv_interrupt =0 ;break ; +case TESTPMD_OPT_RXQ_INTERRUPT_NUM : + rxq_interrupt =1 ; +break ;case TESTPMD_OPT_FLOW_ISOLATE_ALL_NUM : flow_isolate_all =1 ;break ;
app/test-pmd/testpmd.c +91 -2
165 lines not on this page · raw message
app/test-pmd/testpmd.h +2 -0
@@ -405,6 +405,7 @@ struct fwd_lcore {lcoreid_t cpuid_idx;/**< index of logical core in CPU id table */ volatile char stopped;/**< stop forwarding when set */ uint64_t total_cycles;/**< used with --record-core-cycles */ +uint64_t rx_wakeups;/**< used with --rxq-interrupt */ };/*
@@ -541,6 +542,7 @@ extern uint8_t no_device_start; /**<set by "--disable-device-start" parameter */extern volatile int test_done;/* stop packet forwarding when set to 1. */ extern uint8_t lsc_interrupt;/**< disabled by "--no-lsc-interrupt" parameter */ extern uint8_t rmv_interrupt;/**< disabled by "--no-rmv-interrupt" parameter */ +extern uint8_t rxq_interrupt;/**< enabled by "--rxq-interrupt" parameter */ extern uint32_t event_print_mask;/**< set by "--print-event xxxx" and "--mask-event xxxx parameters */ extern bool setup_on_probe_event;/**< disabled by port setup-on iterator */
doc/guides/testpmd_app_ug/run_app.rst +8 -0
@@ -462,6 +462,14 @@ The command line options are: Disable RMV interrupts for all ports, even those supporting it. +* ``--rxq-interrupt`` + + Enable Rx queue interrupts for all ports. + A forwarding lcore whose Rx queues are all empty sleeps + until a packet arrives on one of them, 10 ms at most. + The forward statistics show the number of sleeps that an interrupt ended (``RX-wakeups``). + An error is logged for an Rx queue whose interrupt cannot be registered. + * ``--bitrate-stats=N`` Set the logical core N to perform bitrate calculation.
Signature · 1 line
2.56.1
PATCH v3 6/7 dts: support virtio PCI ports
In reply to Isaac BoukrisDTS reads the logical name and the MAC address of a port from the lshw entry of its PCI device. A virtio device has none there, because lshw lists its network interface as a device of its own, on the virtio bus, right after the PCI device. The test run setup then fails:
Could not gather a valid MAC address and/or logical name for port port-0 in node SUT 1.
Copy to the entry of the PCI device what it lacks from the entry of its interface.
--- dts/framework/testbed_model/linux_session.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
dts/framework/testbed_model/linux_session.py +8 -1
@@ -438,7 +438,14 @@ def get_pci_addr_of_vfs(self, pf_port: Port) -> list[str]: @cached_property def _lshw_net_info(self) -> list[LshwOutput]: output = self.send_command("lshw -quiet -json -C network", verify=True) - return json.loads(output.stdout) + ports = json.loads(output.stdout) + # The network interface of a virtio device is an entry of its own, on the virtio bus, + # right after the entry of the PCI device. Copy from it what the PCI entry lacks. + for device, interface in zip(ports, ports[1:]): + if "logicalname" not in device and interface.get("businfo", "").startswith("virtio@"): + configuration = interface.get("configuration", {}) | device.get("configuration", {}) + device.update(interface | device | {"configuration": configuration}) + return ports def refresh_lshw(self) -> None: """Force refresh of cached lshw network info."""
Signature · 1 line
2.56.1
PATCH v3 7/7 dts: add Rx interrupt test suite
In reply to Isaac BoukrisTest that packets received on a port wake up a testpmd lcore that sleeps on the Rx queues' interrupts (testpmd's --rxq-interrupt).
The first test case also tests it after the ports are configured a second time, with the same number of queues.
The second test case tests it after the number of queues changed. It configures the ports with two queues, then with one queue. The packets differ in their source address, to spread over the queues, and with two queues both must receive packets. The test case is skipped if a port cannot have two queues, or if the packets do not reach both queues.
The test cases run on the ingress port of the test run, so they test the driver of that port. For the virtio PCI driver, the SUT is a VM and its port a virtio-net device.
--- doc/api/dts/tests.TestSuite_rx_interrupt.rst | 8 ++ dts/api/params/types.py | 1 + dts/api/testpmd/config.py | 2 + dts/tests/TestSuite_rx_interrupt.py | 122 +++++++++++++++++++ 4 files changed, 133 insertions(+) create mode 100644 doc/api/dts/tests.TestSuite_rx_interrupt.rst create mode 100644 dts/tests/TestSuite_rx_interrupt.py
doc/api/dts/tests.TestSuite_rx_interrupt.rst new file +8 -0
@@ -0,0 +1,8 @@ +.. SPDX-License-Identifier: BSD-3-Clause + +rx_interrupt Test Suite +======================= + +.. automodule:: tests.TestSuite_rx_interrupt + :members: + :show-inheritance:
dts/api/params/types.py +1 -0
@@ -190,6 +190,7 @@ class TestPmdParamsDict(EalParamsDict, total=False): disable_device_start: Switch no_lsc_interrupt: Switch no_rmv_interrupt: Switch + rxq_interrupt: Switch bitrate_stats: int | None latencystats: int | None print_events: list[Event] | None
dts/api/testpmd/config.py +2 -0
@@ -491,6 +491,7 @@ class TestPmdParams(EalParams): for the first time. no_lsc_interrupt: Disable LSC interrupts for all ports, even those supporting it. no_rmv_interrupt: Disable RMV interrupts for all ports, even those supporting it. + rxq_interrupt: Enable Rx queue interrupts for all ports. Idle forwarding lcores sleep. bitrate_stats: Set the logical core N to perform bitrate calculation. latencystats: Set the logical core N to perform latency and jitter calculations. print_events: Enable printing the occurrence of the designated events.
@@ -596,6 +597,7 @@ class TestPmdParams(EalParams): disable_device_start: Switch = None no_lsc_interrupt: Switch = None no_rmv_interrupt: Switch = None + rxq_interrupt: Switch = None bitrate_stats: int | None = None latencystats: int | None = None print_events: list[Event] | None = field(
dts/tests/TestSuite_rx_interrupt.py new file +122 -0
122 lines not on this page · raw message
Signature · 1 line
2.56.1
v4 cover net/virtio: fix Rx interrupts with MSI-X
In reply to Isaac BoukrisSince 26.11-rc2, a virtio-net PCI device on vfio-pci cannot be configured with Rx interrupts and an offload or RSS, nor configured a second time. l3fwd-power fails to start on it.
Patch 1 is the fix, for 26.11 and stable. The others can wait for 27.03:
- Patch 2 fixes a packet loss on virtio-user ports with vhost-net, which the unit test of v2 found. When the application uses fewer Rx queues than the port has queue pairs, the kernel still sends flows to the TAP queues of the unused pairs. The driver detached these queues before 21.11.
- Patch 3 fixes unaligned reads in virtio-user's control queue, which the sanitizer reports on the port of the unit tests.
- Patch 4 is a unit test of patch 2, on a virtio-user port with two queue pairs and one Rx queue.
- Patch 5 is a unit test of Rx interrupts on that port. It fails without the handle type check of patch 1 ("EAL: Wrong intr vector number"), which is why patch 1 has that check.
- Patch 6 adds testpmd's --rxq-interrupt. Idle forwarding lcores then sleep on the Rx queue interrupts, as l3fwd-power does. It will need a line in the 27.03 release notes.
- Patches 7 and 8 add a DTS suite that uses it. Each packet must wake the lcore up, also after the port is configured again with the same number of queues (first case), and with two queues and then one (second case, where both queues must receive packets).
Tested in a VM (QEMU 10.2, vhost-net):
- l3fwd-power in interrupt-only mode on a virtio-net PCI port fails without patch 1, as in its commit message. With it, each packet wakes its lcore up.
- The DTS suite on a virtio-net PCI port fails without patch 1 at the second configuration, and passes with it. It also passes on an emulated Intel 82576 port (igb).
- testpmd on a virtio-user port with two queue pairs and one Rx queue receives 22 of 64 UDP flows from the kernel without patch 2, and all 64 with it. A port of the TAP driver, and a virtio-net PCI port of QEMU with four queue pairs, receive all 64 on one Rx queue.
- The unit tests pass, also with ASan and UBSan. The first fails without patch 2, and the second without the handle type check of patch 1. UBSan reports the unaligned read without patch 3.
The unit tests log "Some interrupt handle is leaking an event FD" when they close their port. This series does not cause it. main logs it for any virtio-user port since commit 67813957d8 ("interrupts: warn on leaked event FDs"), because virtio-user frees its interrupt handle before it closes its call fds.
v4:
- Patch 3 is new.
- Patch 2 detaches the TAP queue again when a later step of the enable fails. One comment now says when a queue is attached, and why TUNSETQUEUE is not called twice for a state (AI review).
- Patch 4 ignores a flow number that is out of range (AI review).
- Patch 5 asks for the Rx offload without checking the capability first.
- Shorter commit messages and comments in all patches. Patches 1, 6, 7 and 8 have no code change.
v3:
- The fix of the packet loss and its unit test were new. In v2, the unit test of Rx interrupts failed on about half of the CI hosts, because the kernel sent its frame to the TAP queue of the unused queue pair.
- The unit test of Rx interrupts moved on top of them, with an IPv4 frame.
- testpmd logs an error when the interrupt of an Rx queue cannot be registered (AI review).
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.
- The unit test, the testpmd option and the DTS suite were new.
Patches generated with AI assistance.
Isaac Boukris (8):
net/virtio: fix Rx interrupt setup with MSI-X net/virtio-user: fix packet loss with unused queue pairs net/virtio-user: fix unaligned reads of control commands test/virtio_user: add unit test of unused queue pairs 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 | 89 ++++- app/test-pmd/testpmd.h | 2 + app/test/meson.build | 1 + app/test/test_pmd_virtio_user.c | 327 ++++++++++++++++++ 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 +- drivers/net/virtio/virtio_user/vhost_kernel.c | 24 +- .../net/virtio/virtio_user/vhost_kernel_tap.c | 14 + .../net/virtio/virtio_user/vhost_kernel_tap.h | 4 + .../net/virtio/virtio_user/virtio_user_dev.c | 26 +- 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 | 119 +++++++ 17 files changed, 637 insertions(+), 23 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
Signature · 1 line
2.56.1
PATCH v4 1/8 net/virtio: fix Rx interrupt setup with MSI-X
With Rx interrupts, configuring a port initializes the device, twice when an offload or RSS is requested. Each initialization enables the interrupt eventfds. EAL now refuses to enable MSI-X eventfds twice (before, it leaked the previous ones). So such a configuration fails, and so does a second configuration:
EAL: Interrupt eventfds are already enabled
virtio_configure_intr(): Fail to create eventfd
ETHDEV: Port0 dev_configure = -16
Enable the eventfds only when they are not enabled. There is one per Rx queue, so release them first when the number of Rx queues changed. The application must then register the Rx queue interrupts again.
Release them only for a VFIO MSI-X handle, whose eventfds EAL creates. A virtio-user handle also gets here. Its eventfds are the backend's call fds, set once when the device is created. Releasing them would reset their count for good, and registering an Rx queue's interrupt would then fail.
To reproduce, with a virtio-net PCI device bound to vfio-pci:
dpdk-l3fwd-power -l 0 -a 0000:0c:00.0 -- -p 1 --interrupt-only \
--parse-ptype --config="(0,0,0)"---
v4: shorter commit message, no code change.
v2: keep the eventfds unless the number of Rx queues changed (David Marchand).
drivers/net/virtio/virtio_ethdev.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
drivers/net/virtio/virtio_ethdev.c +14 -4
@@ -1455,10 +1455,20 @@ virtio_configure_intr(struct rte_eth_dev *dev)return -ENOTSUP ; } - ret =rte_intr_efd_enable (dev->intr_handle, dev->data->nb_rx_queues); -if (ret <0 ) { -PMD_INIT_LOG (ERR ,"Fail to create eventfd" ); -return ret; +/* On reinitialization, release the eventfds if the number of Rx queues changed. */ +if (rte_intr_type_get (dev->intr_handle) ==RTE_INTR_HANDLE_VFIO_MSIX && +rte_intr_dp_is_en (dev->intr_handle) && +rte_intr_nb_efd_get (dev->intr_handle) != dev->data->nb_rx_queues) { +virtio_intr_disable (dev); +rte_intr_efd_disable (dev->intr_handle); + } + +if (!rte_intr_dp_is_en (dev->intr_handle)) { + ret =rte_intr_efd_enable (dev->intr_handle, dev->data->nb_rx_queues); +if (ret <0 ) { +PMD_INIT_LOG (ERR ,"Fail to create eventfd" ); +return ret; + } } ret = rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec",
Signature · 1 line
2.56.1
Re: [PATCH v4 1/8] net/virtio: fix Rx interrupt setup with MSI-X
Quoted 8 lines · Isaac Boukris
drivers/net/virtio/virtio_ethdev.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)drivers/net/virtio/virtio_ethdev.c +0
-0
drivers/net/virtio/virtio_ethdev.c virtio_configure_intr(struct rte_eth_dev *dev) · line 1459
Quoted 9 lines
drivers/net/virtio/virtio_ethdev.c +2
-4@@ -1455,10 +1455,20 @@ virtio_configure_intr(struct rte_eth_dev *dev)return -ENOTSUP ; } - ret =rte_intr_efd_enable (dev->intr_handle, dev->data->nb_rx_queues); -if (ret <0 ) { -PMD_INIT_LOG (ERR ,"Fail to create eventfd" ); -return ret; +/* On reinitialization, release the eventfds if the number of Rx queues changed. */ + if (rte_intr_type_get(dev->intr_handle) == RTE_INTR_HANDLE_VFIO_MSIX &&
This still does not feel right to me.
drivers/net/virtio/virtio_ethdev.c virtio_configure_intr(struct rte_eth_dev *dev) · line 1463
Quoted 4 lines
drivers/net/virtio/virtio_ethdev.c +4
-0+ rte_intr_dp_is_en(dev->intr_handle) && + rte_intr_nb_efd_get(dev->intr_handle) != dev->data->nb_rx_queues) { +virtio_intr_disable (dev); +rte_intr_efd_disable (dev->intr_handle);
So what happens here iiuc.
For vdev, event FDs are filled by the driver (contrary to MSIX / rte_intr_efd_enable) in the virtio-user probe function for example. But we have an asymmetry in EAL, where rte_intr_efd_enable is not changing the handle for VDEV, but calling rte_intr_efd_disable breaks it resetting nb_efd to 0.
Not resetting to 0 in rte_intr_efd_disable for vdev would break rte_intr_dp_is_en.
And it probably has subtle implications on other part of this API...
We should not be building a workaround in drivers, but correctly fixing this now in net/virtio is risky:
- the virtio driver should probably not be calling rte_intr_efd_enable here in code common to PCI and VDEV ethdevs.
VDEV sets up the interrupt handle once and for all during probing,
and PCI should be doing the same.
- or.. calls to rte_intr_efd_disable are missing in the virtio_dev_init common code.
Taking a step back now.
The initial eventfd leak fix in EAL changed assumptions for drivers, with the expectation now being that the drivers properly enable/disable.
I saw one driver (net/iavf) change on that topic, which is really little when compared to the number of users in-tree.
We likely have bugs in other drivers that were not caught by validation.
Given that we are in rc3 (rc4 by eow), I am for deferring the virtio changes to the next release and instead reverting the EAL fix in this release until we get a proper pass on each maintainer before reapplying.
I'll send a patch in that direction.
Signature · 1 line
David Marchand
Re: [PATCH v4 1/8] net/virtio: fix Rx interrupt setup with MSI-X
Quoted 58 lines · David Marchand
Quoted 8 lines · Isaac Boukris
drivers/net/virtio/virtio_ethdev.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)drivers/net/virtio/virtio_ethdev.c +0
-0drivers/net/virtio/virtio_ethdev.c virtio_configure_intr(struct rte_eth_dev *dev) · line 1459
Quoted 9 lines
drivers/net/virtio/virtio_ethdev.c +2
-4@@ -1455,10 +1455,20 @@ virtio_configure_intr(struct rte_eth_dev *dev)return -ENOTSUP ; } - ret =rte_intr_efd_enable (dev->intr_handle, dev->data->nb_rx_queues); -if (ret <0 ) { -PMD_INIT_LOG (ERR ,"Fail to create eventfd" ); -return ret; +/* On reinitialization, release the eventfds if the number of Rx queues changed. */ + if (rte_intr_type_get(dev->intr_handle) == RTE_INTR_HANDLE_VFIO_MSIX &&This still does not feel right to me.
drivers/net/virtio/virtio_ethdev.c virtio_configure_intr(struct rte_eth_dev *dev) · line 1463
Quoted 4 lines
drivers/net/virtio/virtio_ethdev.c +4
-0+ rte_intr_dp_is_en(dev->intr_handle) && + rte_intr_nb_efd_get(dev->intr_handle) != dev->data->nb_rx_queues) { +virtio_intr_disable (dev); +rte_intr_efd_disable (dev->intr_handle);So what happens here iiuc.
For vdev, event FDs are filled by the driver (contrary to MSIX /
rte_intr_efd_enable) in the virtio-user probe function for example. But we have an asymmetry in EAL, whererte_intr_efd_enableis not changing the handle for VDEV, but callingrte_intr_efd_disablebreaks it resettingnb_efdto 0.Not resetting to 0 in
rte_intr_efd_disablefor vdev would breakrte_intr_dp_is_en.
And it probably has subtle implications on other part of this API...We should not be building a workaround in drivers, but correctly fixing this now in net/virtio is risky:
- the virtio driver should probably not be callingrte_intr_efd_enablehere in code common to PCI and VDEV ethdevs.
VDEV sets up the interrupt handle once and for all during probing,
and PCI should be doing the same.
- or.. calls torte_intr_efd_disableare missing in thevirtio_dev_initcommon code.Taking a step back now.
The initial eventfd leak fix in EAL changed assumptions for drivers, with the expectation now being that the drivers properly enable/disable.
I saw one driver (net/iavf) change on that topic, which is really little when compared to the number of users in-tree.
We likely have bugs in other drivers that were not caught by validation.
Quoted 5 lines
Given that we are in rc3 (rc4 by eow), I am for deferring the virtio changes to the next release and instead reverting the EAL fix in this release until we get a proper pass on each maintainer before reapplying.
I'll send a patch in that direction.
I agree with deferring these changes to the next release, there is a significant risk of regressions here, and the EAL changes being backported, could also introduce regressions in the stable branches.
Maxime
Quoted 4 lines
--
David Marchand
Re: [PATCH v4 1/8] net/virtio: fix Rx interrupt setup with MSI-X
In reply to David MarchandQuoted 13 lines · David Marchand
Quoted 11 lines · Isaac Boukris
drivers/net/virtio/virtio_ethdev.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)drivers/net/virtio/virtio_ethdev.c +0
-0@@ -1455,10 +1455,20 @@ virtio_configure_intr(struct rte_eth_dev *dev)return -ENOTSUP ; }
Quoted 8 lines
drivers/net/virtio/virtio_ethdev.c virtio_configure_intr(struct rte_eth_dev *dev) · line 1459
Quoted 6 lines
drivers/net/virtio/virtio_ethdev.c +2
-4- ret =rte_intr_efd_enable (dev->intr_handle, dev->data->nb_rx_queues); -if (ret <0 ) { -PMD_INIT_LOG (ERR ,"Fail to create eventfd" ); -return ret; +/* On reinitialization, release the eventfds if the number of Rx queues changed. */ + if (rte_intr_type_get(dev->intr_handle) == RTE_INTR_HANDLE_VFIO_MSIX &&This still does not feel right to me.
Yeah, I reckon it is sketchy.
Quoted 17 lines
drivers/net/virtio/virtio_ethdev.c virtio_configure_intr(struct rte_eth_dev *dev) · line 1463
Quoted 4 lines
drivers/net/virtio/virtio_ethdev.c +4
-0+ rte_intr_dp_is_en(dev->intr_handle) && + rte_intr_nb_efd_get(dev->intr_handle) != dev->data->nb_rx_queues) { +virtio_intr_disable (dev); +rte_intr_efd_disable (dev->intr_handle);So what happens here iiuc.
For vdev, event FDs are filled by the driver (contrary to MSIX /
rte_intr_efd_enable) in the virtio-user probe function for example. But we have an asymmetry in EAL, whererte_intr_efd_enableis not changing the handle for VDEV, but callingrte_intr_efd_disablebreaks it resettingnb_efdto 0.Not resetting to 0 in
rte_intr_efd_disablefor vdev would breakrte_intr_dp_is_en.
And it probably has subtle implications on other part of this API...
Quoted 6 lines
We should not be building a workaround in drivers, but correctly fixing this now in net/virtio is risky:
- the virtio driver should probably not be callingrte_intr_efd_enablehere in code common to PCI and VDEV ethdevs.
VDEV sets up the interrupt handle once and for all during probing,
and PCI should be doing the same.
Then perhaps it should set max_queue_pairs, or max MSI-X vectors if it can be less.
Quoted 22 lines
- or.. calls to
rte_intr_efd_disableare missing in thevirtio_dev_initcommon code.Taking a step back now.
The initial eventfd leak fix in EAL changed assumptions for drivers, with the expectation now being that the drivers properly enable/disable.
I saw one driver (net/iavf) change on that topic, which is really little when compared to the number of users in-tree.
We likely have bugs in other drivers that were not caught by validation.Given that we are in rc3 (rc4 by eow), I am for deferring the virtio changes to the next release and instead reverting the EAL fix in this release until we get a proper pass on each maintainer before reapplying.
I'll send a patch in that direction.--
David Marchand
PATCH v4 2/8 net/virtio-user: fix packet loss with unused queue pairs
In reply to Isaac BoukrisA virtio-user port on vhost-net loses received packets when the application configures fewer Rx queues than the port has queue pairs (the queues devarg). With queues=2 and one Rx queue, testpmd receives 22 of the 64 flows that the kernel sends on the TAP interface.
The TAP interface has one queue per queue pair, and the kernel picks a packet's queue by a hash of its flow. The driver unsets the vhost backend of a disabled queue pair but leaves its TAP queue attached, so the kernel still sends flows to it and nothing reads them.
The driver detached such a queue with TUNSETQUEUE until the commit below, which opens all the TAP queues at initialization.
Attach the TAP queue of a queue pair when the pair is enabled, and detach it when the pair is disabled or when a later step of the enable fails. Detach the queues after the first when they are opened. The first one stays attached, because the interface needs a queue.
TUNSETQUEUE fails on a queue that is already in the requested state. The existing check of qp_enabled prevents that, because the state of the TAP queue now follows it.
A memory table change disables the active queue pairs for a moment, so their TAP queues are detached and attached again.
---
v4: detach the queue again when a later step of the enable fails. One comment says the rule.
v3: new patch.
drivers/net/virtio/virtio_user/vhost_kernel.c | 24 +++++++++++++++++-- .../net/virtio/virtio_user/vhost_kernel_tap.c | 14 +++++++++++ .../net/virtio/virtio_user/vhost_kernel_tap.h | 4 ++++ 3 files changed, 40 insertions(+), 2 deletions(-)
drivers/net/virtio/virtio_user/vhost_kernel.c +22 -2
@@ -455,6 +455,9 @@ vhost_kernel_setup(struct virtio_user_dev *dev) data->tapfds[i] =vhost_tap_open (dev->ifname, r_flags, true);if (data->tapfds[i] <0 ) goto err_tapfds; +/* The queue stays detached until its queue pair is enabled. */ +if (vhost_tap_set_queue (data->tapfds[i], false) <0 ) + goto err_tapfds; } dev->backend_data = data;
@@ -541,11 +544,20 @@ vhost_kernel_enable_queue_pair(struct virtio_user_dev *dev, vhostfd = data->vhostfds[pair_idx]; tapfd = data->tapfds[pair_idx]; +/* +* A queue pair's TAP queue is attached only while the pair is enabled, +* so the kernel sends packets only to queues in use. The first queue +* stays attached, because the interface needs one. TUNSETQUEUE fails +* on a queue already in the requested state, which the check above +* prevents. +*/ if (!enable) {if (vhost_kernel_set_backend (vhostfd,-1 ) <0 ) {PMD_DRV_LOG (ERR ,"fail to set backend for vhost kernel" );return -1 ; } +if (pair_idx >0 &&vhost_tap_set_queue (tapfd, false) <0 ) +return -1 ; dev->qp_enabled[pair_idx] = false;return 0 ; }
@@ -561,18 +573,26 @@ vhost_kernel_enable_queue_pair(struct virtio_user_dev *dev, vhost_tap_set_mac(data->tapfds[pair_idx], dev->mac_addr) < 0)return -1 ; +if (pair_idx >0 &&vhost_tap_set_queue (tapfd, true) <0 ) +return -1 ; +if (vhost_kernel_tap_setup (tapfd, hdr_size, dev->features) <0 ) {PMD_DRV_LOG (ERR ,"fail to setup tap for vhost kernel" ); -return -1 ; + goto err_detach; }if (vhost_kernel_set_backend (vhostfd, tapfd) <0 ) {PMD_DRV_LOG (ERR ,"fail to set backend for vhost kernel" ); -return -1 ; + goto err_detach; } dev->qp_enabled[pair_idx] = true;return 0 ; + +err_detach: +if (pair_idx >0 ) +vhost_tap_set_queue (tapfd, false); +return -1 ; } static int
drivers/net/virtio/virtio_user/vhost_kernel_tap.c +14 -0
@@ -126,6 +126,20 @@ vhost_tap_set_mac(int tapfd, uint8_t *mac)return 0 ; } +int +vhost_tap_set_queue (int tapfd,bool attach) +{ +struct ifreq ifr; + +memset (&ifr,0 ,sizeof (ifr)); + ifr.ifr_flags = attach ?IFF_ATTACH_QUEUE :IFF_DETACH_QUEUE ; +if (ioctl (tapfd,TUNSETQUEUE , (void *)&ifr) ==-1 ) { +PMD_DRV_LOG (ERR ,"TUNSETQUEUE failed: %s" ,strerror (errno)); +return -1 ; + } +return 0 ; +} +static int vhost_kernel_tap_set_offload (int fd,uint64_t features) {
drivers/net/virtio/virtio_user/vhost_kernel_tap.h +4 -0
@@ -16,12 +16,15 @@#define TUNSETSNDBUF _IOW('T', 212, int)#define TUNGETVNETHDRSZ _IOR('T', 215, int)#define TUNSETVNETHDRSZ _IOW('T', 216, int) +#define TUNSETQUEUE _IOW('T', 217, int)/* TUNSETIFF ifr flags */ #define IFF_TAP 0x0002#define IFF_NO_PI 0x1000#define IFF_VNET_HDR 0x4000#define IFF_MULTI_QUEUE 0x0100 +#define IFF_ATTACH_QUEUE 0x0200 +#define IFF_DETACH_QUEUE 0x0400#define IFF_NAPI 0x0010/* Features for GSO (TUNSETOFFLOAD). */
@@ -41,5 +44,6 @@ int vhost_tap_open(const char *ifname, unsigned int r_flags, bool multi_queue);int vhost_tap_get_name (int tapfd,char **ifname);int vhost_tap_get_flags (int tapfd,unsigned int *tap_flags);int vhost_tap_set_mac (int tapfd,uint8_t *mac); +int vhost_tap_set_queue (int tapfd,bool attach);#endif
Signature · 1 line
2.56.1
PATCH v4 3/8 net/virtio-user: fix unaligned reads of control commands
In reply to Isaac BoukrisThe data of a control command follows the 2-byte header and the 1-byte status in the driver's buffer, so it starts at an odd address. The device emulation reads the number of queue pairs from it through a pointer to uint16_t, and through a pointer to the RSS configuration structure. Both reads are unaligned. The undefined behaviour sanitizer reports the first one for any port with more than one queue pair:
virtio_user_dev.c:1001:10: runtime error: load of misaligned address 0x7b4802f53f43 for type 'uint16_t', which requires 2 byte alignment
Read the number of queue pairs through an unaligned type, and copy the RSS configuration before reading it.
---
v4: new patch.
.../net/virtio/virtio_user/virtio_user_dev.c | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-)
drivers/net/virtio/virtio_user/virtio_user_dev.c +12 -14
@@ -995,16 +995,15 @@ virtio_user_handle_ctrl_msg_split(struct virtio_user_dev *dev, struct vring *vri hdr =virtio_user_iova2virt (dev, vring->desc[idx_hdr].addr);if (hdr->class ==VIRTIO_NET_CTRL_MQ && hdr->cmd ==VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET ) { -uint16_t queues, *addr; +unaligned_uint16_t *queues; - addr =virtio_user_iova2virt (dev, vring->desc[idx_data].addr); - queues = *addr; - status =virtio_user_handle_mq (dev, queues); + queues =virtio_user_iova2virt (dev, vring->desc[idx_data].addr); + status =virtio_user_handle_mq (dev, *queues); }else if (hdr->class ==VIRTIO_NET_CTRL_MQ && hdr->cmd ==VIRTIO_NET_CTRL_MQ_RSS_CONFIG ) { -struct virtio_net_ctrl_rss *rss; +struct virtio_net_ctrl_rss rss; - rss =virtio_user_iova2virt (dev, vring->desc[idx_data].addr); - status =virtio_user_handle_mq (dev, rss->max_tx_vq); +memcpy (&rss,virtio_user_iova2virt (dev, vring->desc[idx_data].addr),sizeof (rss)); + status =virtio_user_handle_mq (dev, rss.max_tx_vq); }else if (hdr->class ==VIRTIO_NET_CTRL_RX || hdr->class ==VIRTIO_NET_CTRL_MAC || hdr->class ==VIRTIO_NET_CTRL_VLAN ) {
@@ -1061,16 +1060,15 @@ virtio_user_handle_ctrl_msg_packed(struct virtio_user_dev *dev, hdr =virtio_user_iova2virt (dev, vring->desc[idx_hdr].addr);if (hdr->class ==VIRTIO_NET_CTRL_MQ && hdr->cmd ==VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET ) { -uint16_t queues, *addr; +unaligned_uint16_t *queues; - addr =virtio_user_iova2virt (dev, vring->desc[idx_data].addr); - queues = *addr; - status =virtio_user_handle_mq (dev, queues); + queues =virtio_user_iova2virt (dev, vring->desc[idx_data].addr); + status =virtio_user_handle_mq (dev, *queues); }else if (hdr->class ==VIRTIO_NET_CTRL_MQ && hdr->cmd ==VIRTIO_NET_CTRL_MQ_RSS_CONFIG ) { -struct virtio_net_ctrl_rss *rss; +struct virtio_net_ctrl_rss rss; - rss =virtio_user_iova2virt (dev, vring->desc[idx_data].addr); - status =virtio_user_handle_mq (dev, rss->max_tx_vq); +memcpy (&rss,virtio_user_iova2virt (dev, vring->desc[idx_data].addr),sizeof (rss)); + status =virtio_user_handle_mq (dev, rss.max_tx_vq); }else if (hdr->class ==VIRTIO_NET_CTRL_RX || hdr->class ==VIRTIO_NET_CTRL_MAC || hdr->class ==VIRTIO_NET_CTRL_VLAN ) {
Signature · 1 line
2.56.1
PATCH v4 4/8 test/virtio_user: add unit test of unused queue pairs
In reply to Isaac BoukrisAdd a test suite for the virtio PMD on a virtio-user port with vhost-net, modeled on the TAP PMD's. It needs no VM and no PCI device. It is skipped where the port cannot be created (no root, no /dev/vhost-net).
The port has two queue pairs and the test configures one Rx queue. The kernel sends frames of 16 flows through a packet socket on the TAP interface, and all must arrive. Without the fix of the unused queue pairs, about half of them go to the TAP queue of the second queue pair and are lost.
DPDK_TEST=virtio_user_pmd_autotest ./build/app/dpdk-test --no-huge
---
v4: ignore a flow number that is out of range. Shorter comments.
v3: new patch. It has the test suite and the kernel socket that patch 2 of v2 added.
MAINTAINERS | 1 + app/test/meson.build | 1 + app/test/test_pmd_virtio_user.c | 264 ++++++++++++++++++++++++++++++++ 3 files changed, 266 insertions(+) create mode 100644 app/test/test_pmd_virtio_user.c
MAINTAINERS +1 -0
@@ -1106,6 +1106,7 @@ T: git://dpdk.org/next/dpdk-next-virtio F: drivers/net/virtio/ F: doc/guides/nics/virtio.rst F: doc/guides/nics/features/virtio*.ini +F: app/test/test_pmd_virtio_user.c Wind River AVP M: Steven Webster <[email protected]>
app/test/meson.build +1 -0
@@ -155,6 +155,7 @@ source_file_deps = { 'test_pmd_ring.c': ['net_ring', 'ethdev', 'bus_vdev'], 'test_pmd_ring_perf.c': ['ethdev', 'net_ring', 'bus_vdev'], 'test_pmd_tap.c': ['ethdev', 'net_tap', 'bus_vdev'], + 'test_pmd_virtio_user.c': ['ethdev', 'net_virtio', 'bus_vdev'], 'test_pmu.c': ['pmu'], 'test_power.c': ['power', 'power_acpi', 'power_kvm_vm', 'power_intel_pstate', 'power_amd_pstate', 'power_cppc'],
app/test/test_pmd_virtio_user.c new file +264 -0
264 lines not on this page · raw message
Signature · 1 line
2.56.1
PATCH v4 5/8 test/virtio_user: add unit test of Rx interrupts
In reply to Isaac BoukrisConfigure the port with Rx interrupts and an Rx offload, enable the interrupt of the Rx queue, send a frame from the kernel and sleep on the interrupt. The frame must end the sleep. Do the same after a second configure.
The port has two queue pairs and one Rx queue, so it has more interrupt eventfds than Rx queues. They are the backend's call fds. If the driver releases them when it initializes the device again, the test fails.
---
v4: ask for the Rx offload without checking the capability first. Shorter comments.
v3: on top of the previous patch. The test frame is now an IPv4 one.
app/test/test_pmd_virtio_user.c | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+)
app/test/test_pmd_virtio_user.c +63 -0
@@ -34,6 +34,7 @@ test_pmd_virtio_user(void)#include <rte_bus_vdev.h> #include <rte_cycles.h> +#include <rte_epoll.h> #include <rte_ethdev.h> #include <rte_ether.h> #include <rte_ip.h>
@@ -174,6 +175,67 @@ test_virtio_user_rx_flows(void)return TEST_SUCCESS ; } +/* Sleep on the Rx queue's interrupt. A frame from the kernel must end the sleep. */ +static int +rx_intr_wakes (void ) +{ +uint64_t deadline =rte_get_timer_cycles () +rte_get_timer_hz () *WAIT_MS /1000 ; +struct rte_epoll_event event; +bool found; +int ret; + + ret =rte_eth_dev_rx_intr_ctl_q (port_id,0 ,RTE_EPOLL_PER_THREAD ,RTE_INTR_EVENT_ADD , +NULL ); +TEST_ASSERT_SUCCESS (ret,"no interrupt for the Rx queue: %s" ,rte_strerror (-ret)); + +do { +/* From here on a frame raises the interrupt, also before the sleep below. */ + ret =rte_eth_dev_rx_intr_enable (port_id,0 ); +TEST_ASSERT_SUCCESS (ret,"Rx interrupt enable failed: %s" ,rte_strerror (-ret)); +/* Drop the frames that the kernel sent earlier, and their event. */ +port_receive (); +rte_epoll_wait (RTE_EPOLL_PER_THREAD , &event,1 ,0 ); + +TEST_ASSERT_SUCCESS (kernel_send (0 ),"kernel send failed" ); + ret =rte_epoll_wait (RTE_EPOLL_PER_THREAD , &event,1 ,WAIT_MS ); +TEST_ASSERT (ret ==1 ,"no Rx interrupt within %d ms" ,WAIT_MS ); + ret =rte_eth_dev_rx_intr_disable (port_id,0 ); +TEST_ASSERT_SUCCESS (ret,"Rx interrupt disable failed: %s" ,rte_strerror (-ret)); +/* If another frame of the kernel raised the interrupt, send again. */ + found =port_receive () !=0 ; + }while (!found &&rte_get_timer_cycles () < deadline); +TEST_ASSERT (found,"frame from the kernel not received" ); + + ret =rte_eth_dev_rx_intr_ctl_q (port_id,0 ,RTE_EPOLL_PER_THREAD ,RTE_INTR_EVENT_DEL , +NULL ); +TEST_ASSERT_SUCCESS (ret,"Rx interrupt removal failed: %s" ,rte_strerror (-ret)); + +return TEST_SUCCESS ; +} + +/* +* Configure with Rx interrupts and an offload, which initializes the device +* twice, then configure again. The port has more interrupt eventfds than Rx +* queues. They are the backend's, so the driver must not release them. +*/ +static int +test_virtio_user_rx_intr (void ) +{ +struct rte_eth_conf conf = { + .intr_conf.rxq =1 , + .rxmode.offloads =RTE_ETH_RX_OFFLOAD_UDP_CKSUM |RTE_ETH_RX_OFFLOAD_TCP_CKSUM , + }; +int round; + +for (round =0 ; round <2 ; round++) { +TEST_ASSERT_SUCCESS (port_start (&conf),"round %d: port start failed" , round); +TEST_ASSERT_SUCCESS (rx_intr_wakes (),"round %d: Rx interrupt failed" , round); +TEST_ASSERT_SUCCESS (port_stop (),"round %d: port stop failed" , round); + } + +return TEST_SUCCESS ; +} +static void test_virtio_user_cleanup (void ) {
@@ -249,6 +311,7 @@ static struct unit_test_suite test_pmd_virtio_user_suite = { .suite_name = "virtio-user PMD Unit Test Suite", .unit_test_cases = {TEST_CASE (test_virtio_user_rx_flows), +TEST_CASE (test_virtio_user_rx_intr), TEST_CASES_END() } };
Signature · 1 line
2.56.1
PATCH v4 6/8 app/testpmd: add Rx queue interrupts option
In reply to Isaac Boukristestpmd never asks for Rx queue interrupts, so it cannot test them.
With --rxq-interrupt, the ports are configured with Rx queue interrupts, and a forwarding lcore whose Rx queues are all empty sleeps until a packet arrives, 10 ms at most, as l3fwd-power does. The forward statistics count the sleeps that an interrupt ended. An error is logged for an Rx queue whose interrupt cannot be registered.
---
v4: shorter comments and option description, no code change.
v3: log an error when the interrupt of an Rx queue cannot be registered.
app/test-pmd/parameters.c | 8 +++ app/test-pmd/testpmd.c | 89 ++++++++++++++++++++++++++- app/test-pmd/testpmd.h | 2 + doc/guides/testpmd_app_ug/run_app.rst | 7 +++ 4 files changed, 104 insertions(+), 2 deletions(-)
app/test-pmd/parameters.c +8 -0
@@ -207,6 +207,8 @@ enum {TESTPMD_OPT_NO_LSC_INTERRUPT_NUM , #define TESTPMD_OPT_NO_RMV_INTERRUPT "no-rmv-interrupt"TESTPMD_OPT_NO_RMV_INTERRUPT_NUM , +#define TESTPMD_OPT_RXQ_INTERRUPT "rxq-interrupt" +TESTPMD_OPT_RXQ_INTERRUPT_NUM , #define TESTPMD_OPT_PRINT_EVENT "print-event"TESTPMD_OPT_PRINT_EVENT_NUM , #define TESTPMD_OPT_MASK_EVENT "mask-event"
@@ -357,6 +359,7 @@ static const struct option long_options[] = {NO_ARG (TESTPMD_OPT_DISABLE_DEVICE_START ),NO_ARG (TESTPMD_OPT_NO_LSC_INTERRUPT ),NO_ARG (TESTPMD_OPT_NO_RMV_INTERRUPT ), +NO_ARG (TESTPMD_OPT_RXQ_INTERRUPT ),REQUIRED_ARG (TESTPMD_OPT_PRINT_EVENT ),REQUIRED_ARG (TESTPMD_OPT_MASK_EVENT ), REQUIRED_ARG(TESTPMD_OPT_TX_OFFLOADS),
@@ -515,6 +518,8 @@ usage(char* progname)printf (" --disable-device-start: do not automatically start port\n" );printf (" --no-lsc-interrupt: disable link status change interrupt.\n" );printf (" --no-rmv-interrupt: disable device removal interrupt.\n" ); +printf (" --rxq-interrupt: enable Rx queue interrupts, " +"idle forwarding lcores sleep.\n" );#ifdef RTE_LIB_BITRATESTATS printf (" --bitrate-stats=N: set the logical core N to perform " "bit-rate calculation.\n" );
@@ -1638,6 +1643,9 @@ launch_args_parse(int argc, char** argv)case TESTPMD_OPT_NO_RMV_INTERRUPT_NUM : rmv_interrupt =0 ;break ; +case TESTPMD_OPT_RXQ_INTERRUPT_NUM : + rxq_interrupt =1 ; +break ;case TESTPMD_OPT_FLOW_ISOLATE_ALL_NUM : flow_isolate_all =1 ;break ;
app/test-pmd/testpmd.c +87 -2
161 lines not on this page · raw message
app/test-pmd/testpmd.h +2 -0
@@ -405,6 +405,7 @@ struct fwd_lcore {lcoreid_t cpuid_idx;/**< index of logical core in CPU id table */ volatile char stopped;/**< stop forwarding when set */ uint64_t total_cycles;/**< used with --record-core-cycles */ +uint64_t rx_wakeups;/**< used with --rxq-interrupt */ };/*
@@ -541,6 +542,7 @@ extern uint8_t no_device_start; /**<set by "--disable-device-start" parameter */extern volatile int test_done;/* stop packet forwarding when set to 1. */ extern uint8_t lsc_interrupt;/**< disabled by "--no-lsc-interrupt" parameter */ extern uint8_t rmv_interrupt;/**< disabled by "--no-rmv-interrupt" parameter */ +extern uint8_t rxq_interrupt;/**< enabled by "--rxq-interrupt" parameter */ extern uint32_t event_print_mask;/**< set by "--print-event xxxx" and "--mask-event xxxx parameters */ extern bool setup_on_probe_event;/**< disabled by port setup-on iterator */
doc/guides/testpmd_app_ug/run_app.rst +7 -0
@@ -462,6 +462,13 @@ The command line options are: Disable RMV interrupts for all ports, even those supporting it. +* ``--rxq-interrupt`` + + Enable Rx queue interrupts for all ports. + A forwarding lcore whose Rx queues are all empty sleeps until a packet arrives, 10 ms at most. + The forward statistics count the sleeps that an interrupt ended (``RX-wakeups``). + An error is logged for an Rx queue whose interrupt cannot be registered. + * ``--bitrate-stats=N`` Set the logical core N to perform bitrate calculation.
Signature · 1 line
2.56.1
PATCH v4 7/8 dts: support virtio PCI ports
In reply to Isaac BoukrisDTS reads the logical name and the MAC address of a port from the lshw entry of its PCI device. A virtio device has none there, because lshw lists its network interface as an entry of its own, on the virtio bus, right after the PCI device. The test run setup then fails:
Could not gather a valid MAC address and/or logical name for port port-0 in node SUT 1.
Copy to the PCI entry what it lacks from the entry of its interface.
---
v4: shorter commit message, no code change.
dts/framework/testbed_model/linux_session.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
dts/framework/testbed_model/linux_session.py +8 -1
@@ -438,7 +438,14 @@ def get_pci_addr_of_vfs(self, pf_port: Port) -> list[str]: @cached_property def _lshw_net_info(self) -> list[LshwOutput]: output = self.send_command("lshw -quiet -json -C network", verify=True) - return json.loads(output.stdout) + ports = json.loads(output.stdout) + # The network interface of a virtio device is an entry of its own, on the virtio bus, + # right after the entry of the PCI device. Copy from it what the PCI entry lacks. + for device, interface in zip(ports, ports[1:]): + if "logicalname" not in device and interface.get("businfo", "").startswith("virtio@"): + configuration = interface.get("configuration", {}) | device.get("configuration", {}) + device.update(interface | device | {"configuration": configuration}) + return ports def refresh_lshw(self) -> None: """Force refresh of cached lshw network info."""
Signature · 1 line
2.56.1
PATCH v4 8/8 dts: add Rx interrupt test suite
In reply to Isaac BoukrisTest that packets received on a port wake up a testpmd lcore that sleeps on the Rx queues' interrupts (--rxq-interrupt).
The first test case also does it after the ports are configured again with the same number of queues. The second does it after the number of queues changed, to two and back to one. With two queues, both must receive packets. It is skipped if a port cannot have two queues, or if the packets do not reach both.
The test cases run on the ingress port of the test run, so they test its driver. For the virtio PCI driver, the SUT is a VM and its port a virtio-net device.
---
v4: shorter commit message and docstrings, no code change.
doc/api/dts/tests.TestSuite_rx_interrupt.rst | 8 ++ dts/api/params/types.py | 1 + dts/api/testpmd/config.py | 2 + dts/tests/TestSuite_rx_interrupt.py | 119 +++++++++++++++++++ 4 files changed, 130 insertions(+) create mode 100644 doc/api/dts/tests.TestSuite_rx_interrupt.rst create mode 100644 dts/tests/TestSuite_rx_interrupt.py
doc/api/dts/tests.TestSuite_rx_interrupt.rst new file +8 -0
@@ -0,0 +1,8 @@ +.. SPDX-License-Identifier: BSD-3-Clause + +rx_interrupt Test Suite +======================= + +.. automodule:: tests.TestSuite_rx_interrupt + :members: + :show-inheritance:
dts/api/params/types.py +1 -0
@@ -190,6 +190,7 @@ class TestPmdParamsDict(EalParamsDict, total=False): disable_device_start: Switch no_lsc_interrupt: Switch no_rmv_interrupt: Switch + rxq_interrupt: Switch bitrate_stats: int | None latencystats: int | None print_events: list[Event] | None
dts/api/testpmd/config.py +2 -0
@@ -491,6 +491,7 @@ class TestPmdParams(EalParams): for the first time. no_lsc_interrupt: Disable LSC interrupts for all ports, even those supporting it. no_rmv_interrupt: Disable RMV interrupts for all ports, even those supporting it. + rxq_interrupt: Enable Rx queue interrupts for all ports. Idle forwarding lcores sleep. bitrate_stats: Set the logical core N to perform bitrate calculation. latencystats: Set the logical core N to perform latency and jitter calculations. print_events: Enable printing the occurrence of the designated events.
@@ -596,6 +597,7 @@ class TestPmdParams(EalParams): disable_device_start: Switch = None no_lsc_interrupt: Switch = None no_rmv_interrupt: Switch = None + rxq_interrupt: Switch = None bitrate_stats: int | None = None latencystats: int | None = None print_events: list[Event] | None = field(
dts/tests/TestSuite_rx_interrupt.py new file +119 -0
119 lines not on this page · raw message
Signature · 1 line
2.56.1