From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id F23E11C782; Mon, 14 May 2018 13:45:36 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2018 04:45:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,399,1520924400"; d="scan'208";a="39136260" Received: from dwdohert-mobl.ger.corp.intel.com (HELO [10.252.7.26]) ([10.252.7.26]) by fmsmga007.fm.intel.com with ESMTP; 14 May 2018 04:45:34 -0700 To: Matan Azrad Cc: dev@dpdk.org, stable@dpdk.org, Thomas Monjalon References: <1524569370-6799-1-git-send-email-matan@mellanox.com> From: "Doherty, Declan" Message-ID: <0aad672c-210a-db8c-53f3-98660fe17f1d@intel.com> Date: Mon, 14 May 2018 12:45:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1524569370-6799-1-git-send-email-matan@mellanox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/bonding: fix slave activation simultaneously 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: Mon, 14 May 2018 11:45:37 -0000 On 24/04/2018 12:29 PM, Matan Azrad wrote: > The bonding PMD decides to activate\deactivate its slaves according to > the slaves link statuses. > Thus, it registers to the LSC events of the slaves ports and > activates\deactivates them from its LSC callbacks called asynchronously > by the host thread when the slave link status is changed. > > In addition, the bonding PMD uses the callback for slave activation > when it tries to start it, this operation is probably called by the > master thread. > > Consequently, a slave may be activated in the same time by two > different threads and may cause a lot of optional errors, for example, > slave mempool recreation with the same name causes an error. > > Synchronize the critical section in the LSC callback using a special > new spinlock. > > Fixes: 414b202343ce ("bonding: fix initial link status of slave") > Fixes: a45b288ef21a ("bond: support link status polling") > Cc: stable@dpdk.org > > Signed-off-by: Matan Azrad > --- ... > Acked-by: Declan Doherty