All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Cc: dev@dpdk.org, declan.doherty@intel.com
Subject: Re: [PATCH v2] net/bonding: fix link status check
Date: Fri, 16 Feb 2018 12:13:02 -0800	[thread overview]
Message-ID: <20180216121302.01f5ba2b@xeon-e3> (raw)
In-Reply-To: <20171129154200.14436-1-tomaszx.kulasek@intel.com>

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

      parent reply	other threads:[~2018-02-16 20:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29 14:53 [PATCH] net/bonding: fix link status check Tomasz Kulasek
2017-11-29 15:42 ` [PATCH v2] " Tomasz Kulasek
2018-01-17 16:02   ` Ferruh Yigit
2018-02-06 20:52     ` Thomas Monjalon
2018-02-12 18:26       ` Chas Williams
2018-06-13 16:10         ` Ferruh Yigit
2018-06-18  8:39           ` Ferruh Yigit
2018-02-16 20:13   ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180216121302.01f5ba2b@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=tomaszx.kulasek@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.