[dpdk-dev] [PATCH] bond: fix check initial link status of slave

Tomasz Kulasek tomaszx.kulasek at intel.com
Wed Jun 24 10:50:45 CEST 2015


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 at intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 8bad2e1..277b310 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1357,6 +1357,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;
 }
 
-- 
1.7.9.5



More information about the dev mailing list