From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v2] net/bonding: fix update link status on slave add Date: Thu, 31 May 2018 16:36:15 +0100 Message-ID: <2c61f454-9c44-39d3-3258-3f894175186d@intel.com> References: <1527777275-9974-1-git-send-email-radu.nicolau@intel.com> <2d1f24aa-b752-5031-f063-1394c47d64ff@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: declan.doherty@intel.com To: Radu Nicolau , dev@dpdk.org Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DCA2D5F2F for ; Thu, 31 May 2018 17:36:17 +0200 (CEST) In-Reply-To: <2d1f24aa-b752-5031-f063-1394c47d64ff@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 5/31/2018 4:34 PM, Ferruh Yigit wrote: > On 5/31/2018 3:34 PM, Radu Nicolau wrote: > > I can see you just prefix "fix" to the title without updating it :) > > What about following one: > "net/bonding: fix slave add for mode 4" ? > >> 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. > > What is the link related expectation from slaves in mode 4? > > What does "if the ports are all stopped but only one of them checked" mean, why > checking only one of them? > >> >> Fixes: b77d21cc2364 ("ethdev: add link status get/set helper functions") >> Bugzilla entry: https://dpdk.org/tracker/show_bug.cgi?id=52 Bugzilla ID: 52 btw, can you please send new version as reply to previous version? >> >> Signed-off-by: Radu Nicolau >> --- >> v2: add fix and Bugzilla references >> >> 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); >> + > > The error seems in link_properties_valid(), does it make sense to get link info > inside that function before link checks? > >> slave_add(internals, slave_eth_dev); >> >> /* We need to store slaves reta_size to be able to synchronize RETA for all >> >