[dpdk-stable] patch 'ethdev: fix close failure handling' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:18:54 CET 2021


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 <thomas at monjalon.net>
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 <anatoly.burakov at intel.com>
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Tested-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 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 at dpdk.org
@@ -27 +28 @@
-index f40df65e34..6f514c388b 100644
+index 8c584e4c83..ecd46ac01f 100644


More information about the stable mailing list