From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F2AB6A04DD for ; Wed, 18 Nov 2020 17:37:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E1E045947; Wed, 18 Nov 2020 17:37:17 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 2C982C8B0 for ; Wed, 18 Nov 2020 17:37:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605717435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yx/s4yNsiPAR8QUI+G3yRAjYA6ZzeqxAY0VRRoZcB0w=; b=ay6HqgzBt93eCywfy1AdXXEgy0TvoPjbesDv5OTsZPoUgN9p+JYfjHNgo5jYAwZHFIFyNa FJLYV1HB/UhwkKrj1foxZv6wqgIYIcXGXa6OR6aVsIGl0oadLjvf332wnO4Tkhwfg/wPoP oke6x0UIV+22eEvctSte1QopS85u6Jc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-412-oIFBdVUdMY24s2jmR_hbXg-1; Wed, 18 Nov 2020 11:37:09 -0500 X-MC-Unique: oIFBdVUdMY24s2jmR_hbXg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 79743879A0C; Wed, 18 Nov 2020 16:36:39 +0000 (UTC) Received: from rh.redhat.com (ovpn-113-249.ams2.redhat.com [10.36.113.249]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E4D15C1A3; Wed, 18 Nov 2020 16:36:38 +0000 (UTC) From: Kevin Traynor To: Gaetan Rivet Cc: dpdk stable Date: Wed, 18 Nov 2020 16:34:58 +0000 Message-Id: <20201118163558.1101823-12-ktraynor@redhat.com> In-Reply-To: <20201118163558.1101823-1-ktraynor@redhat.com> References: <20201118163558.1101823-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-stable] patch 'net/failsafe: fix state synchro cleanup' has been queued to LTS release 18.11.11 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/c577654d95801e9bbe910952e18ba49a9711101c Thanks. Kevin. --- >From c577654d95801e9bbe910952e18ba49a9711101c Mon Sep 17 00:00:00 2001 From: Gaetan Rivet Date: Mon, 12 Oct 2020 16:19:04 +0200 Subject: [PATCH] net/failsafe: fix state synchro cleanup [ upstream commit 352074b3a4b1518f3c1ec70865c407f135d8fa4d ] During a hotplug attempt, failsafe will try to bring a subdevice that just appeared to its internal state. On error, the subdevice is marked for removal and will be cleaned up. However failsafe_dev_remove() only remove active devices. Devices that failed during probe will be stuck in DEV_PARSED state repeatedly. Consider all devices when doing a removal round, but limit burst control and stats saving to active devices. Fixes: 598fb8aec6f6 ("net/failsafe: support device removal") Signed-off-by: Gaetan Rivet --- drivers/net/failsafe/failsafe_ether.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c index 3e1f65f09a..9c8bf01224 100644 --- a/drivers/net/failsafe/failsafe_ether.c +++ b/drivers/net/failsafe/failsafe_ether.c @@ -373,12 +373,21 @@ failsafe_dev_remove(struct rte_eth_dev *dev) uint8_t i; - FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) - if (sdev->remove && fs_rxtx_clean(sdev)) { - if (fs_lock(dev, 1) != 0) - return; + FOREACH_SUBDEV(sdev, i, dev) { + if (!sdev->remove) + continue; + + /* Active devices must have finished their burst and + * their stats must be saved. + */ + if (sdev->state >= DEV_ACTIVE && + fs_rxtx_clean(sdev) == 0) + continue; + if (fs_lock(dev, 1) != 0) + return; + if (sdev->state >= DEV_ACTIVE) fs_dev_stats_save(sdev); - fs_dev_remove(sdev); - fs_unlock(dev, 1); - } + fs_dev_remove(sdev); + fs_unlock(dev, 1); + } } -- 2.26.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-11-18 16:33:38.213465289 +0000 +++ 0012-net-failsafe-fix-state-synchro-cleanup.patch 2020-11-18 16:33:37.914215052 +0000 @@ -1 +1 @@ -From 352074b3a4b1518f3c1ec70865c407f135d8fa4d Mon Sep 17 00:00:00 2001 +From c577654d95801e9bbe910952e18ba49a9711101c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 352074b3a4b1518f3c1ec70865c407f135d8fa4d ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 7c68bbdec0..f18935a7e2 100644 +index 3e1f65f09a..9c8bf01224 100644 @@ -28 +29 @@ -@@ -384,12 +384,21 @@ failsafe_dev_remove(struct rte_eth_dev *dev) +@@ -373,12 +373,21 @@ failsafe_dev_remove(struct rte_eth_dev *dev)