igb: avoid enabling interrupt with zero vector
authorCunming Liang <cunming.liang@intel.com>
Wed, 4 Nov 2015 08:45:33 +0000 (16:45 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 4 Nov 2015 14:27:41 +0000 (15:27 +0100)
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
drivers/net/e1000/igb_ethdev.c

index 1332974..76d2acc 100644 (file)
@@ -1122,11 +1122,11 @@ eth_igb_start(struct rte_eth_dev *dev)
        igb_pf_host_configure(dev);
 
        /* check and configure queue intr-vector mapping */
-       if (dev->data->dev_conf.intr_conf.rxq != 0)
+       if (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;
+               if (rte_intr_efd_enable(intr_handle, intr_vector))
+                       return -1;
+       }
 
        if (rte_intr_dp_is_en(intr_handle)) {
                intr_handle->intr_vec =