net/i40e: return errno when interrupt setup fails
authorMichał Mirosław <michal.miroslaw@atendesoftware.pl>
Tue, 13 Dec 2016 01:08:19 +0000 (02:08 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:41:42 +0000 (19:41 +0100)
Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
drivers/net/i40e/i40e_ethdev.c
lib/librte_eal/linuxapp/eal/eal_interrupts.c

index b690850..6d09bba 100644 (file)
@@ -1881,8 +1881,9 @@ i40e_dev_start(struct rte_eth_dev *dev)
             !RTE_ETH_DEV_SRIOV(dev).active) &&
            dev->data->dev_conf.intr_conf.rxq != 0) {
                intr_vector = dev->data->nb_rx_queues;
-               if (rte_intr_efd_enable(intr_handle, intr_vector))
-                       return -1;
+               ret = rte_intr_efd_enable(intr_handle, intr_vector);
+               if (ret)
+                       return ret;
        }
 
        if (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) {
index cb55751..b5b3f2b 100644 (file)
@@ -1181,7 +1181,7 @@ rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd)
                                RTE_LOG(ERR, EAL,
                                        "can't setup eventfd, error %i (%s)\n",
                                        errno, strerror(errno));
-                               return -1;
+                               return -errno;
                        }
                        intr_handle->efds[i] = fd;
                }