Handle unsupported interrupt type requests properly,
on unsupported interrupt case:
'ifpga_unregister_msix_irq()' returns success,
'ifpga_register_msix_irq()' return failure.
Fixes:
e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions")
Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
intr_handle = &ifpga_irq_handle[0];
else if (type == IFPGA_AFU_IRQ)
intr_handle = &ifpga_irq_handle[vec_start + 1];
+ else
+ return 0;
rte_intr_efd_disable(intr_handle);
if (type == IFPGA_FME_IRQ) {
intr_handle = &ifpga_irq_handle[0];
count = 1;
- } else if (type == IFPGA_AFU_IRQ)
+ } else if (type == IFPGA_AFU_IRQ) {
intr_handle = &ifpga_irq_handle[vec_start + 1];
+ } else {
+ return -EINVAL;
+ }
intr_handle->type = RTE_INTR_HANDLE_VFIO_MSIX;