New upstream version 16.11.8
[deb_dpdk.git] / lib / librte_eal / linuxapp / eal / eal_interrupts.c
index 06b26a9..7f73914 100644 (file)
 #include <rte_lcore.h>
 #include <rte_atomic.h>
 #include <rte_branch_prediction.h>
-#include <rte_ring.h>
 #include <rte_debug.h>
 #include <rte_log.h>
-#include <rte_mempool.h>
 #include <rte_pci.h>
 #include <rte_malloc.h>
 #include <rte_errno.h>
@@ -196,14 +194,14 @@ vfio_disable_intx(struct rte_intr_handle *intr_handle) {
        irq_set = (struct vfio_irq_set *) irq_set_buf;
        irq_set->argsz = len;
        irq_set->count = 1;
-       irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_UNMASK;
+       irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_MASK;
        irq_set->index = VFIO_PCI_INTX_IRQ_INDEX;
        irq_set->start = 0;
 
        ret = ioctl(intr_handle->vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set);
 
        if (ret) {
-               RTE_LOG(ERR, EAL, "Error unmasking INTx interrupts for fd %d\n",
+               RTE_LOG(ERR, EAL, "Error masking INTx interrupts for fd %d\n",
                                                intr_handle->fd);
                return -1;
        }
@@ -453,7 +451,7 @@ rte_intr_callback_register(struct rte_intr_handle *intr_handle,
        TAILQ_FOREACH(src, &intr_sources, next) {
                if (src->intr_handle.fd == intr_handle->fd) {
                        /* we had no interrupts for this */
-                       if TAILQ_EMPTY(&src->callbacks)
+                       if (TAILQ_EMPTY(&src->callbacks))
                                wake_thread = 1;
 
                        TAILQ_INSERT_TAIL(&(src->callbacks), callback, next);
@@ -889,7 +887,7 @@ rte_eal_intr_init(void)
                        "eal-intr-thread");
                ret_1 = rte_thread_setname(intr_thread, thread_name);
                if (ret_1 != 0)
-                       RTE_LOG(ERR, EAL,
+                       RTE_LOG(DEBUG, EAL,
                        "Failed to set thread name for interrupt handling\n");
        }