From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0EE31A0524 for ; Fri, 5 Feb 2021 12:38:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08EA3188A51; Fri, 5 Feb 2021 12:38:30 +0100 (CET) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id 3785E188A51 for ; Fri, 5 Feb 2021 12:38:29 +0100 (CET) Received: by mail-wr1-f54.google.com with SMTP id l12so7360931wry.2 for ; Fri, 05 Feb 2021 03:38:29 -0800 (PST) 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=Pk3Gp8g4jSyd5u/dhYhEHmykHfrE+/pjeu536KVNIg8=; b=ErNphg6tWLJDOd8Ioc4CMHSnRyQYNoWriLNwzxMktgUBMuWL0wfnpwlMfwQAG6PFn9 mzsLLmbNzB/0IExWFFXcRT5R3dn0Ui5FVtrsMPPI6P5FWp4a86BYlyH2nTKc/pvQfZHX Zp0z/CO/4Tr6olbMQbZ9YtOmHYLd9/fXSLFnmXqOeft3E1u0UAttQzMA3hwytrbkMCPx xu5XUnV2VPFXgxwOI3zUmdhihHE4PxLhk8u0sgHx+D1A1v3v38xsMynrujqLaKkaC4J/ BCuS7NC3ek3uuBW9xtT25iyvRINoTQIrHym9LRfr7mH9Ac2epTD/+MML9MVGUZqZe8zA pCDA== 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=Pk3Gp8g4jSyd5u/dhYhEHmykHfrE+/pjeu536KVNIg8=; b=rDSMz1KdjgN0pdLIvrkf/Ph9U+LfUMzFCrI7YcoLPWWPcQhapzCm2A3qI4HRf6O0j8 fqWv6Ihng3vOtrdfu2+I/4TaEjYJC4vB3usV4gIsa0hWKbNjJXmdauuEaoH2/D9egtdd 1zOWVJ8yekf92vXOMai7yLZNDE+2G0V/C27jXVMYkymFH4W3AHtVJPIeJmt1cQYgbE/T tyvaTRCdWSOIHZG/Qe0UPETeC7aImR43KNKWWBL0AGvp3a/NfPQjZk8NtabTRnqnSI/O OL3sm48k+wgNGdOWgk+oNZOl/qBqfePhoNf1nvz6oGvjt0i7xa0CpjFGmY33Z4jwjwTg ePWA== X-Gm-Message-State: AOAM5325beTeB7F88gHoQ9UhQEqpFVqoeiUuhCqoMYhXK2xdi7AySQou 04uEfXUkw/4NsyVHY/OlC70= X-Google-Smtp-Source: ABdhPJxTOB9hOv8+XSRaUigSqCmUE7UFzO1wwofdmagssgjsmjfsZ91eMn2aq4NPRAv32UJvtQJOCQ== X-Received: by 2002:a5d:4203:: with SMTP id n3mr4527709wrq.49.1612525109027; Fri, 05 Feb 2021 03:38:29 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id s64sm9132413wms.21.2021.02.05.03.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:38:28 -0800 (PST) From: luca.boccassi@gmail.com To: Thomas Monjalon Cc: Anatoly Burakov , Andrew Rybchenko , dpdk stable Date: Fri, 5 Feb 2021 11:18:54 +0000 Message-Id: <20210205111920.1272063-248-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'ethdev: fix close failure handling' has been queued to stable release 20.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/732bdcc188b44d1d0f3b110728b5610ce05fb2e9 Thanks. Luca Boccassi --- >From 732bdcc188b44d1d0f3b110728b5610ce05fb2e9 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Fri, 22 Jan 2021 18:58:04 +0100 Subject: [PATCH] ethdev: fix close failure handling [ upstream commit a6f34f91008ec200e492459bc79b62c04a88e918 ] If a failure happens when closing a port, it was unnecessarily failing again in the function eth_err(), because of a check against HW removal cause. Indeed there is a big chance the port is released at this point. Given the port is in the middle (or at the end) of a close process, checking the error cause by accessing the port is a non-sense. The error check is replaced by a simple return in the close function. Bugzilla ID: 624 Fixes: 8a5a0aad5d3e ("ethdev: allow close function to return an error") Reported-by: Anatoly Burakov Signed-off-by: Thomas Monjalon Acked-by: Andrew Rybchenko Tested-by: Anatoly Burakov --- lib/librte_ethdev/rte_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 8c584e4c83..ecd46ac01f 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -1820,7 +1820,7 @@ rte_eth_dev_close(uint16_t port_id) rte_ethdev_trace_close(port_id); *lasterr = rte_eth_dev_release_port(dev); - return eth_err(port_id, firsterr); + return firsterr; } int -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:40.106234248 +0000 +++ 0248-ethdev-fix-close-failure-handling.patch 2021-02-05 11:18:29.262699793 +0000 @@ -1 +1 @@ -From a6f34f91008ec200e492459bc79b62c04a88e918 Mon Sep 17 00:00:00 2001 +From 732bdcc188b44d1d0f3b110728b5610ce05fb2e9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a6f34f91008ec200e492459bc79b62c04a88e918 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index f40df65e34..6f514c388b 100644 +index 8c584e4c83..ecd46ac01f 100644