[dpdk-stable] [PATCH] net/ixgbe: fix VFIO interrupt mapping in PF
    Wei Dai 
    wei.dai at intel.com
       
    Wed Sep 20 10:11:42 CEST 2017
    
    
  
When a PF port is bound to VFIO-PIC, only miscellaneous interrupt
is mapped to VFIO vector 0 in ixgbe_dev_init( ).
In ixgbe_dev_start(), if previous VFIO interrupt mapping set in
ixgbe_dev_init( ) is not cleard, it will fail when calling
rte_intr_enable( ) tries to map Rx queue interrupt to other VFIO
vectors. This patch clears the VFIO interrupt mappings before
setting both miscellaneous and Rx queue interrupt mappings again
to avoid failure.
Fixes: 0a45657a6794 ("pci: rework interrupt handling")
Cc: stable at dpdk.org
Signed-off-by: Wei Dai <wei.dai at intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 9ca5cbc..9030d3d 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2692,6 +2692,15 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 				     " no intr multiplex");
 	}
 
+	/* When a PF port is bound to VFIO-PCI only miscellaneous interrupt
+	*  is mapped to VFIO vector 0 in ixgbe_dev_init( ).
+	*  If previous VFIO interrupt mapping set in ixgbe_dev_init( ) is
+	*  not cleared, it will fail when following rte_intr_enable( ) tries
+	*  to map Rx queue interrupt to other VFIO vectors.
+	*  So clear uio/vfio intr/evevnfd first to avoid failure.
+	*/
+	rte_intr_disable(intr_handle);
+
 	/* check if rxq interrupt is enabled */
 	if (dev->data->dev_conf.intr_conf.rxq != 0 &&
 	    rte_intr_dp_is_en(intr_handle))
-- 
2.7.5
    
    
More information about the stable
mailing list