Thread (8 messages) 8 messages, 5 authors, 2018-06-18

Re: [PATCH v2] net/bonding: fix link status check

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2018-02-16 20:13:05

On Wed, 29 Nov 2017 16:42:00 +0100
Tomasz Kulasek [off-list ref] wrote:
+	/* Some devices needs more time to initialize and bring interface up.
+	 * While link status up is preferable we wait some time to be sure that
+	 * link status of slave is valid.
+	 */
+	if (slave_eth_dev->data->dev_link.link_status == ETH_LINK_DOWN) {
+		rte_delay_ms(100);
+		rte_eth_link_get_nowait(slave_port_id, &link_props);
+		while ((link_props.link_status == ETH_LINK_DOWN) &&
+				(retries > 0)) {
+			rte_delay_ms(100);
+			rte_eth_link_get_nowait(slave_port_id, &link_props);
+			retries--;
+		}
+	}
+
Why use nowait and a loop, when there is already a waiting version of eth_link_get?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help