[dpdk-dev] [PATCH v3 05/13] ixgbe: fix efd_enable with zero number

Cunming Liang cunming.liang at intel.com
Wed Nov 4 07:07:35 CET 2015


Signed-off-by: Cunming Liang <cunming.liang at intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 153ba98..f1a738c 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1975,11 +1975,11 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 	ixgbe_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) {
 		intr_handle->intr_vec =
@@ -3862,11 +3862,11 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
 	ixgbevf_dev_rxtx_start(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) {
 		intr_handle->intr_vec =
-- 
2.4.3



More information about the dev mailing list