From patchwork Wed May 9 12:06:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Radu Nicolau X-Patchwork-Id: 39567 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 394201B1DF; Wed, 9 May 2018 14:12:36 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id B2AEC1B16B for ; Wed, 9 May 2018 14:12:34 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2018 05:12:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,381,1520924400"; d="scan'208";a="227101023" Received: from silpixa00383879.ir.intel.com (HELO silpixa00383879.ger.corp.intel.com) ([10.237.223.127]) by fmsmga006.fm.intel.com with ESMTP; 09 May 2018 05:12:32 -0700 From: Radu Nicolau To: dev@dpdk.org Cc: declan.doherty@intel.com, Radu Nicolau Date: Wed, 9 May 2018 13:06:26 +0100 Message-Id: <1525867586-23328-1-git-send-email-radu.nicolau@intel.com> X-Mailer: git-send-email 2.7.5 Subject: [dpdk-dev] [PATCH] net/bonding: update link status on slave add 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add a call to rte_eth_link_get_nowait on every slave to update the internal link status struct. Otherwise slave add will fail for mode 4 if the ports are all stopped but only one of them checked. Signed-off-by: Radu Nicolau --- drivers/net/bonding/rte_eth_bond_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index d558df8..cad08b9 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -296,6 +296,8 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id) return -1; } + rte_eth_link_get_nowait(slave_port_id, &link_props); + slave_add(internals, slave_eth_dev); /* We need to store slaves reta_size to be able to synchronize RETA for all