From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [dpdk-stable] [PATCH v3] net/failsafe: fix calling device during RMV events Date: Thu, 18 Jan 2018 23:22:51 +0100 Message-ID: <16685617.u0SECMPC3f@xps> References: <1506203877-2090-1-git-send-email-ophirmu@mellanox.com> <20171023083612.GK3596@bidouze.vm.6wind.com> <32c10eb9-fa51-a409-4720-6a92c3b97398@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Ferruh Yigit , Ophir Munk , dev@dpdk.org, Olga Shern , Matan Azrad To: =?ISO-8859-1?Q?Ga=EBtan?= Rivet Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 535511B2EB for ; Thu, 18 Jan 2018 23:23:28 +0100 (CET) In-Reply-To: <32c10eb9-fa51-a409-4720-6a92c3b97398@intel.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" 29/11/2017 20:17, Ferruh Yigit: > >>> On Thu, Oct 05, 2017 at 10:42:08PM +0000, Ophir Munk wrote: > >>>> This commit prevents control path operations from failing after a sub > >>>> device removal. > >>>> > >>>> Following are the failure steps: > >>>> 1. The physical device is removed due to change in one of PF > >>>> parameters (e.g. MTU) 2. The interrupt thread flags the device 3. > >>>> Within 2 seconds Interrupt thread initializes the actual device > >>>> removal, then every 2 seconds it tries to re-sync (plug in) the > >>>> device. The trials fail as long as VF parameter mismatches the PF > >>> parameter. > >>>> 4. A control thread initiates a control operation on failsafe which > >>>> initiates this operation on the device. > >>>> 5. A race condition occurs between the control thread and interrupt > >>>> thread when accessing the device data structures. > >>>> > >>>> This commit prevents the race condition in step 5. Before this commit > >>>> if a device was removed and then a control thread operation was > >>>> initiated on failsafe - in some cases failsafe called the sub device > >>>> operation instead of avoiding it. Such cases could lead to operations > >>> failures. [...] > > Reminder of this patch remaining from previous release. Gaetan, what is the decision for this possible race condition? Can we try to fix it in 18.02?