DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] drivers/net/bonding: fix updating the slave link status
@ 2017-04-25  6:30 wang wei
  2017-04-27 14:28 ` Declan Doherty
  0 siblings, 1 reply; 4+ messages in thread
From: wang wei @ 2017-04-25  6:30 UTC (permalink / raw)
  To: dev

we need to update dev->data->dev_link before handling lsc event.
Otherwise it will still have the initial value after the startup of
the program before interrupt callback was executed.

Signed-off-by: wang wei <lnykww@gmail.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index c94071ffb..57b1012c4 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1435,9 +1435,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 	}
 
 	/* If lsc interrupt is set, check initial slave's link status */
-	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
+	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
+		slave_eth_dev->dev_ops->link_update(slave_eth_dev, 0);
 		bond_ethdev_lsc_event_callback(slave_eth_dev->data->port_id,
 			RTE_ETH_EVENT_INTR_LSC, &bonded_eth_dev->data->port_id);
+	}
 
 	return 0;
 }
-- 
2.11.0 (Apple Git-81)

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH] drivers/net/bonding: fix updating the slave link status
@ 2017-04-25  6:11 wang wei
  0 siblings, 0 replies; 4+ messages in thread
From: wang wei @ 2017-04-25  6:11 UTC (permalink / raw)
  To: dev

we need to update dev->data->dev_link before handling lsc event.
Otherwise it will still have the initial value after the startup of
the program before interrupt callback was executed.

Signed-off-by: wang wei <lnykww@gmail.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index c94071ffb..57b1012c4 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1435,9 +1435,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 	}
 
 	/* If lsc interrupt is set, check initial slave's link status */
-	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
+	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
+        slave_eth_dev->dev_ops->link_update(slave_eth_dev, 0);
 		bond_ethdev_lsc_event_callback(slave_eth_dev->data->port_id,
 			RTE_ETH_EVENT_INTR_LSC, &bonded_eth_dev->data->port_id);
+    }
 
 	return 0;
 }
-- 
2.11.0 (Apple Git-81)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-28  5:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-25  6:30 [dpdk-dev] [PATCH] drivers/net/bonding: fix updating the slave link status wang wei
2017-04-27 14:28 ` Declan Doherty
2017-04-28  5:15   ` Ferruh Yigit
  -- strict thread matches above, loose matches on Subject: below --
2017-04-25  6:11 wang wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).