From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f46.google.com (mail-pg0-f46.google.com [74.125.83.46]) by dpdk.org (Postfix) with ESMTP id 4DBF11B1B0 for ; Fri, 16 Feb 2018 21:13:05 +0100 (CET) Received: by mail-pg0-f46.google.com with SMTP id w17so3263966pgv.6 for ; Fri, 16 Feb 2018 12:13:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wXuQyACDWu6R/J9n66Kb6Ft6FXjGZzVDw6dt7+fm2DI=; b=JAerdXvgtVgiNpco+gJQ0F4Q/SjZJIb4x1Xt0AhgwCHGhRHG4sLQQFIoDmSw4DAZNj md0Ji/JB6qBPG8pYp+MZ3F85F7TN80pbeH32kxDGNONixJQPOGG5BaHLUrczhYWCpH/K N5KOYK66V22xLQ47JqWYGRPff/DhYJ3l/NW3R0a8gBSe8wpxhM14T7s4LuRgdhqwxayq jrDxX752RZ8MZWuKCDbRP90a5EVoE7Dk7CL0Vb6BD5RsMEwJFxHQSXjN2CCVd2Ynnjuk mPsECAwVTTYsYs9PoTwmg2Rguf2Qh64HyIyM+e8I3U6LevUIfiz+xSu0qDhZ7Q2nusp6 xvLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wXuQyACDWu6R/J9n66Kb6Ft6FXjGZzVDw6dt7+fm2DI=; b=uPGOFjwcXYM5TiDoSFscCU+JbVLA8Q3JWwDoG8AYNVWHa+FLVaFU8QzaEsBe4kHbxm y/kI78KPQrnuVYtn8Z0ZtVf1yD5zwW2QTlPerXXpKN8lwTAm/0zcXcUOjKSpJr9MWpXi RfTCVdOvPx14gVsqeAqymhbLwYjf+KzkGHwUZjb0V0kWVP3ZSAkzGQ8kRZaC3PdXr6TD T2tkGCe3PHQPYLWqDGewWmRd2ySrDjZ0H35M4VfZ2j0USpeUZC7Ell9wmloNVPCUDdke IwvQUCZ8PLUEV9K1bL8jAS2FR7nMeiahIX59j1yBRi1nPXDEeNQgv9NbVw4Zm7plTuwe GrCw== X-Gm-Message-State: APf1xPAHj/CkEVpSoLIwnSqa2W7NEE3g5X2D1XxhzDNMjAF7ZCNFOgrl nFiX1ufGGqVyLGesCgePaJiZwg== X-Google-Smtp-Source: AH8x225740+XC0Kme8Ic29V6W1VB0HjlXg/W6W9y16tA/GLiUkREvpBvezLfg8QLUe/IRwGZLvDUcg== X-Received: by 10.99.121.140 with SMTP id u134mr5902202pgc.89.1518811984399; Fri, 16 Feb 2018 12:13:04 -0800 (PST) Received: from xeon-e3 (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id g11sm9766568pfm.100.2018.02.16.12.13.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Feb 2018 12:13:04 -0800 (PST) Date: Fri, 16 Feb 2018 12:13:02 -0800 From: Stephen Hemminger To: Tomasz Kulasek Cc: dev@dpdk.org, declan.doherty@intel.com Message-ID: <20180216121302.01f5ba2b@xeon-e3> In-Reply-To: <20171129154200.14436-1-tomaszx.kulasek@intel.com> References: <20171129145349.43448-1-tomaszx.kulasek@intel.com> <20171129154200.14436-1-tomaszx.kulasek@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] net/bonding: fix link status check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Feb 2018 20:13:05 -0000 On Wed, 29 Nov 2017 16:42:00 +0100 Tomasz Kulasek 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?