bonding: fix initial link status of slave
authorTomasz Kulasek <tomaszx.kulasek@intel.com>
Wed, 24 Jun 2015 08:50:45 +0000 (10:50 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 28 Jun 2015 22:30:55 +0000 (00:30 +0200)
On Fortville NIC, link status change interrupt callback is not executed when
slave in bonding is (re-)started. It causes that slave's NIC is inactive even
if its link status is up on the start.

This patch invokes lsc callback, just after port's start, to check its initial
link status and manage properly.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
drivers/net/bonding/rte_eth_bond_pmd.c

index 5a2fbef..7888a7f 100644 (file)
@@ -1361,6 +1361,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
                return -1;
        }
 
+       /* If lsc interrupt is set, check initial slave's link status */
+       if (slave_eth_dev->driver->pci_drv.drv_flags & RTE_PCI_DRV_INTR_LSC)
+               bond_ethdev_lsc_event_callback(slave_eth_dev->data->port_id,
+                               RTE_ETH_EVENT_INTR_LSC, &bonded_eth_dev->data->port_id);
+
        return 0;
 }