On Wed, 29 Nov 2017 16:42:00 +0100 Tomasz Kulasek <tomaszx.kula...@intel.com> 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?