From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] net/bonding: fix slave activation simultaneously Date: Mon, 14 May 2018 04:07:07 +0200 Message-ID: <4366104.K65D46sZa3@xps> References: <1524569370-6799-1-git-send-email-matan@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Matan Azrad , stable@dpdk.org, chas3@att.com, radu.nicolau@intel.com, sharmila.podury@att.com To: Declan Doherty Return-path: In-Reply-To: <1524569370-6799-1-git-send-email-matan@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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