There is no reason to re-register a interrupt handler for LSC if this
feature was not requested in the first place.
A simple use case is when asking for Rx interrupts without LSC interrupt.
Fixes:
26b683b4f7d0 ("net/virtio: setup Rx queue interrupts")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
- /* Re-register callback to update max_intr */
- rte_intr_callback_unregister(dev->intr_handle,
- virtio_interrupt_handler,
- dev);
- rte_intr_callback_register(dev->intr_handle,
- virtio_interrupt_handler,
- dev);
+ if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
+ /* Re-register callback to update max_intr */
+ rte_intr_callback_unregister(dev->intr_handle,
+ virtio_interrupt_handler,
+ dev);
+ rte_intr_callback_register(dev->intr_handle,
+ virtio_interrupt_handler,
+ dev);
+ }
/* DO NOT try to remove this! This function will enable msix, or QEMU
* will encounter SIGSEGV when DRIVER_OK is sent.
/* DO NOT try to remove this! This function will enable msix, or QEMU
* will encounter SIGSEGV when DRIVER_OK is sent.