From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 8C3411B3DB for ; Mon, 12 Feb 2018 19:42:25 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id i186so11390098wmi.4 for ; Mon, 12 Feb 2018 10:42:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=R4VGhglWfAS1Z3aX0Iblvr/kYcQmTZApbzlfuTU/qqU=; b=Vsn4XOohPD+ZbbUpAxb86DIY20hkaQ4GiCAsmhMBKlwtyj7ulPX2r1pRa5+gjy3Z8U ci+NKv9FiKF8f/qdj4+SyaqlWumP1UV3bOXUn6EDO2oRLUGQIt1K2YOQGozmGg7dtxuD ++KZbES382+hSbFAEl4GoGA3ZHkHIASuMi9QlFSI7rUyReZ4m01l4e1pSZ6Mf1/dFTkv birOg+PZ53uxGVrWOdSDkq4cZO56ctxwStJ+lt+33XR9F8X9iuq9hYSrQR4l8nwK6hgq VS+R+PPVKpBGCmxgUA9DaIpeayNOejmGl5jN63SRzIKUYl7H49ParH+DlNCRdS3CLwEu xoog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=R4VGhglWfAS1Z3aX0Iblvr/kYcQmTZApbzlfuTU/qqU=; b=Ed+0NXRBhReELhkZ0rs2btRApbSpNimMSdnYIKl4eX4SwkbXxtMX3/DX9fYNBRpsZS 1H5T/9mNd7TgmYJGaju6jO29XQrLPNM3idDN6a73KFM2Yzlw2238H3o673Bone1Zt+VD gl0yuiM42GAHmKv69VCTojXrRZHgicfFHvqOYi4hn5S1q3h/a8GVwj/JqLBnUWxkdeV+ wKrFsPqi6585K2FLgBUYs9ZuacjSiI1DpHiyqOFVcjZuouAx7fpnjYDz7PkrFSm4rq8k NUSFODBWnHxmsJYan9zdfpaCwanBARKovg1iaXKdv9fqauraSlr77dFPIgCBAlAwZWXm 4ibg== X-Gm-Message-State: APf1xPAAsIkx0IsE72nwSk3KpoSD9ckFj5RBN3L14EKTJBXH9WtG2bn3 PKCh3p3cC1IMPS2HwNcH4v9S/g== X-Google-Smtp-Source: AH8x224BRQd94DA8ChuRo0qmcNOtDeAYTmdbKut0mn0w07sNVTP/qDvi/AuKRHXxj1AhA3EcBrnK8w== X-Received: by 10.28.192.24 with SMTP id q24mr4637326wmf.149.1518460944985; Mon, 12 Feb 2018 10:42:24 -0800 (PST) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id o82sm5612263wmo.30.2018.02.12.10.42.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 10:42:24 -0800 (PST) Date: Mon, 12 Feb 2018 19:42:11 +0100 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Matan Azrad Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20180212184211.nmjzwqmbf3i6z7eq@bidouze.vm.6wind.com> References: <1518370054-12578-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1518370054-12578-1-git-send-email-matan@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-stable] [PATCH] net/failsafe: fix reconfiguration 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, 12 Feb 2018 18:42:25 -0000 Hi Matan, On Sun, Feb 11, 2018 at 05:27:34PM +0000, Matan Azrad wrote: > Fail-safe PMD manages the states of its sub-devices gradually: > DEV_UNDEFINED, DEV_PARSED, DEV_PROBED, DEV_ACTIVE, DEV_STARTED. > > When the sub-device arguments successfully was parsed, the state is > raised from DEV_UNDEFINED to DEV_PARSED. > When the sub-device successfully was probed, the state is raised from > DEV_PARSED to DEV_PROBED. > When the sub-device successfully was configured by > rte_eth_dev_configure(), the state is raised from DEV_PROBED to > DEV_ACTIVE. > When the sub-device successfully was started by rte_eth_dev_start(), the > state is raised from DEV_ACTIVE to DEV_STARTED. > > When the sub-device successfully was stopped by rte_eth_dev_stop(), the > state is degraded from DEV_STARTED to DEV_ACTIVE. > When the sub-device successfully was closed by rte_eth_dev_close(), the > state is degraded from DEV_ACTIVE to DEV_PROBED. > When the sub-device successfully was removed by > rte_eal_hotplug_remove(), the state is degraded from DEV_PROBED to > DEV_UNDEFINED. > > Fail-safe dev_configure() operation calls to its sub-devices > dev_configure() operation, but only for sub-devices which are in > DEV_PROBED state, means that sub-devices which are in DEV_ACTIVE state > because the application triggered dev_stop() operation cannot be > reconfigured again by dev_configure() operation which is really > problematic when application wants to reconfigure its ports. > Actually, the application may get success report when some of the > sub-devices are not in the wanted configuration. > > The current behavior of fail-safe dev_configure() is correct only for > the first time dev_configure() is triggered by the application or for > sub-device synchronization in plug-in event, but it ignores the option > for reconfiguration from application side. > > Allow calling to sub-devices dev_configure() operations also in > DEV_ACTIVE state when the call was triggered by the application. > > Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD") > Cc: stable@dpdk.org > > Signed-off-by: Matan Azrad The commit log is too verbose, but otherwise the issue is real and the fix correct. Acked-by: Gaetan Rivet > --- > Based on previous series, "fix hotplug races". > > drivers/net/failsafe/failsafe_ops.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c > index fe64c68..057e435 100644 > --- a/drivers/net/failsafe/failsafe_ops.c > +++ b/drivers/net/failsafe/failsafe_ops.c > @@ -110,7 +110,8 @@ > int lsc_interrupt = 0; > int lsc_enabled; > > - if (sdev->state != DEV_PROBED) > + if (sdev->state != DEV_PROBED && > + !(PRIV(dev)->alarm_lock == 0 && sdev->state == DEV_ACTIVE)) > continue; > > rmv_interrupt = ETH(sdev)->data->dev_flags & > -- > 1.8.3.1 > -- Gaëtan Rivet 6WIND