From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id BFAA61C31D; Mon, 14 May 2018 04:07:09 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4D019250E8; Sun, 13 May 2018 22:07:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 13 May 2018 22:07:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=LM76wapPsdVNI/1Ge9xW+o0xPS UQlr5Yn/kpglEblAI=; b=QGCf2vPryuoaHDrpqApMO+A7O6IZ42/RTUlmm1Ezxq FKRBpjWS6zfM7R4xwsF2qVj5/nTA5dwB+JyewxHvmC03liYIqunxsqulPC3CDR+f /2cCKP6XW8oTP+9wEgCukZ9K5Zy08i2Xd7zq3pAXfGf21I9c9Zfl/OXgIYz6m9aO s= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=LM76wa pPsdVNI/1Ge9xW+o0xPSUQlr5Yn/kpglEblAI=; b=idWpH2zf4UeoDKMWlEgCjx WIouEPgpebyZbI4Y8ltTKITtkf1Voem8u4GpV+fLWua9cffkeF6ChZwL5Hz59t+t whw3VNlgHdp+S+Fk3RaqEaqck94Nlkh05CxverAJlF9uku1/6ijCW3Y5lFHZgNp8 FH1yPIsDTj9ocdyTD2+/336K5Qa3VABMKAtPtZNNNF2j9AdcdDfkHxtLW4NPZEpO 2uB0q7gW4GJr7TXl2W/jBk/p5yaar3cZv8G/Q9H60h3voy3hplpG5w0jBuhNbuFB qiVN1qHVFYQbqAOVxma+lBeNyv6x7SqHDRVoKNpW9N/foNP+WPzJB3UIoBVRA2TA == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 5708EE4393; Sun, 13 May 2018 22:07:08 -0400 (EDT) From: Thomas Monjalon To: Declan Doherty Cc: dev@dpdk.org, Matan Azrad , stable@dpdk.org, chas3@att.com, radu.nicolau@intel.com, sharmila.podury@att.com Date: Mon, 14 May 2018 04:07:07 +0200 Message-ID: <4366104.K65D46sZa3@xps> In-Reply-To: <1524569370-6799-1-git-send-email-matan@mellanox.com> References: <1524569370-6799-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/bonding: fix slave activation simultaneously X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2018 02:07:10 -0000 Someone to review please? 24/04/2018 13:29, Matan Azrad: > 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