]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/mlx4/mlx4.c
net/mlx4: fix Rx interrupts with multiple ports
[dpdk.git] / drivers / net / mlx4 / mlx4.c
index 892d654e7b29295925b487c5a73b78b73e70057b..b20ceccee90104c13d5157724164b0d0f6c28416 100644 (file)
@@ -6209,6 +6209,15 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 
                eth_dev->device->driver = &mlx4_driver.driver;
 
+               /*
+                * Copy and override interrupt handle to prevent it from
+                * being shared between all ethdev instances of a given PCI
+                * device. This is required to properly handle Rx interrupts
+                * on all ports.
+                */
+               priv->intr_handle_dev = *eth_dev->intr_handle;
+               eth_dev->intr_handle = &priv->intr_handle_dev;
+
                priv->dev = eth_dev;
                eth_dev->dev_ops = &mlx4_dev_ops;