eal/linux: fix link status interrupt with uio_pci_generic
authorCunming Liang <cunming.liang@intel.com>
Mon, 20 Jul 2015 03:02:23 +0000 (11:02 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 27 Jul 2015 21:13:56 +0000 (23:13 +0200)
The intr handle type(RTE_INTR_HANDLE_UIO_INTX) was introduced by UIO pci generic.
When turning on the lsc interrupt, it complains fd read error.
The patch uses the correct read size in the case of RTE_INTR_HANDLE_UIO_INTX.

Fixes: 3f313bef3467 ("eal/linux: fix irq handling with igb_uio")
Reported-by: Yong Liu <yong.liu@intel.com>
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
lib/librte_eal/linuxapp/eal/eal_interrupts.c

index 12105cc86f5d8f7f0f07e7dd34ff0d6346c09b30..e919fb07058ab224de846054b4a787a4f2e1ee16 100644 (file)
@@ -684,6 +684,7 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
                /* set the length to be read dor different handle type */
                switch (src->intr_handle.type) {
                case RTE_INTR_HANDLE_UIO:
+               case RTE_INTR_HANDLE_UIO_INTX:
                        bytes_read = sizeof(buf.uio_intr_count);
                        break;
                case RTE_INTR_HANDLE_ALARM: