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 02DA2A04DD for ; Wed, 28 Oct 2020 11:55:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EF741CAAA; Wed, 28 Oct 2020 11:55:35 +0100 (CET) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by dpdk.org (Postfix) with ESMTP id 7C3D6CAAA for ; Wed, 28 Oct 2020 11:55:34 +0100 (CET) Received: by mail-wm1-f51.google.com with SMTP id w23so4105264wmi.4 for ; Wed, 28 Oct 2020 03:55:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=a24WW8hKnsr2r9XEU0MOykbS3JH9nsO106ltNHKzpUs=; b=Jyo3556K4PcndLH8+ChUrNixHrUhLK0ui8claXgi/jEofYpR9jd7NRhcj16P7+jauJ Z7rls3wSMVDDyUK6hlv7IcSIjDYGQnQsj4U5/xTXLsENUBYVLn5qa26dt+dLsbFfxZGm bqJgLCGEnoGv20doQVUCA1paYT0LL8TP8mlZ9tfuAE2csRYT5rbGDyNv9sA9jOf4A63u /OGgPjKzjhmazZwNnL9x+/Yvk1GP6BUvAlLNf0wYBooo1hZ+dBnay5GVzpqXcLPrgP+N ChOjS4tZeSt9GRVMUjNEdIocPJmtjwTDUUFsj0lzIQED4EBzM0YUHmryVXYg7Lk17413 83Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=a24WW8hKnsr2r9XEU0MOykbS3JH9nsO106ltNHKzpUs=; b=gwq4chY6yZTJ1ftMA6u04K3FJT7I+hJ6LFI3soqt6xjj3XfB/jX9eNceTMr92l6T0U KYA1HbbjMu0iUtuFXEgjBqpId0yzJTkNXYX9X2I4U517Aqs+Gh0trw1ATFkVGMagb2qF cZ1+t7TBOPwtJPgHSl5Lj7urn1pJVZTcZJSl3qTLnl48bj+J0c8Urm5lr7SFrzBiKYhi ANA6awxWAOIL2L5ufVOxYMGP/sZk+cSwCGxTmhFxGaOcyjUby5P6dVa3BXJkuophAURr AZxKryg7xy7A/jIWoFbaPrvnOHidsTO/R3lNabK1+LsBTCecNMMJpppvKSHHDykj816O bvFg== X-Gm-Message-State: AOAM531HMLZwx8yCEpM78AhcuhJCJiVW2sKAEuMdoYMkPEDTV9tBRvgB m1IpxNtRLyLgay14wRKPSatHD5uLkrQcR/r6 X-Google-Smtp-Source: ABdhPJwvZAmXlDbjiVZ4Uv+ml6CjOKHQoAav+8qYNJK1H/qOLzJR1CsBysPWmFYkjDftJoJ8l1JnJg== X-Received: by 2002:a7b:c309:: with SMTP id k9mr7171302wmj.125.1603882533258; Wed, 28 Oct 2020 03:55:33 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id 30sm6414357wrs.84.2020.10.28.03.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:55:32 -0700 (PDT) From: luca.boccassi@gmail.com To: Gaetan Rivet Cc: dpdk stable Date: Wed, 28 Oct 2020 10:45:35 +0000 Message-Id: <20201028104606.3504127-176-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/failsafe: fix state synchro cleanup' has been queued to stable release 19.11.6 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 stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/30/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. Thanks. Luca Boccassi --- >From 382958f4fef1a0d857939a460f98200fc8b8a635 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 6c27645b96..98fbdefc50 100644 --- a/drivers/net/failsafe/failsafe_ether.c +++ b/drivers/net/failsafe/failsafe_ether.c @@ -383,14 +383,23 @@ failsafe_dev_remove(struct rte_eth_dev *dev) struct sub_device *sdev; 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); + } } static int -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:17.181223024 +0000 +++ 0176-net-failsafe-fix-state-synchro-cleanup.patch 2020-10-28 10:35:11.784834145 +0000 @@ -1,8 +1,10 @@ -From 352074b3a4b1518f3c1ec70865c407f135d8fa4d Mon Sep 17 00:00:00 2001 +From 382958f4fef1a0d857939a460f98200fc8b8a635 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. @@ -14,7 +16,6 @@ and stats saving to active devices. Fixes: 598fb8aec6f6 ("net/failsafe: support device removal") -Cc: stable@dpdk.org Signed-off-by: Gaetan Rivet --- @@ -22,7 +23,7 @@ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c -index 7c68bbdec0..f18935a7e2 100644 +index 6c27645b96..98fbdefc50 100644 --- a/drivers/net/failsafe/failsafe_ether.c +++ b/drivers/net/failsafe/failsafe_ether.c @@ -383,14 +383,23 @@ failsafe_dev_remove(struct rte_eth_dev *dev)