[dpdk-stable] patch 'ethdev: fix redundant function pointer check' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Fri Nov 23 11:26:43 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. 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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 52ed89a09e572a5f694cae107417e23b9404d6a3 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Sun, 28 Oct 2018 01:46:50 +0000
Subject: [PATCH] ethdev: fix redundant function pointer check

[ upstream commit 11745065a5b98957dc834b04a3b175c62ae8a70b ]

RTE_FUNC_PTR_OR_ERR_RET() already does the `ethdev_uninit` NULL check.

Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs")

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Acked-by: Thomas Monjalon <thomas at monjalon.net>
---
 lib/librte_ethdev/rte_ethdev.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index a20498711..07335a1d6 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -3542,9 +3542,8 @@ rte_eth_dev_destroy(struct rte_eth_dev *ethdev,
 
 	RTE_FUNC_PTR_OR_ERR_RET(*ethdev_uninit, -EINVAL);
-	if (ethdev_uninit) {
-		ret = ethdev_uninit(ethdev);
-		if (ret)
-			return ret;
-	}
+
+	ret = ethdev_uninit(ethdev);
+	if (ret)
+		return ret;
 
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.277802387 +0000
+++ 0039-ethdev-fix-redundant-function-pointer-check.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,12 +1,13 @@
-From 11745065a5b98957dc834b04a3b175c62ae8a70b Mon Sep 17 00:00:00 2001
+From 52ed89a09e572a5f694cae107417e23b9404d6a3 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit at intel.com>
 Date: Sun, 28 Oct 2018 01:46:50 +0000
 Subject: [PATCH] ethdev: fix redundant function pointer check
 
+[ upstream commit 11745065a5b98957dc834b04a3b175c62ae8a70b ]
+
 RTE_FUNC_PTR_OR_ERR_RET() already does the `ethdev_uninit` NULL check.
 
 Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs")
-Cc: stable at dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
 Acked-by: Thomas Monjalon <thomas at monjalon.net>
@@ -15,10 +16,10 @@
  1 file changed, 4 insertions(+), 5 deletions(-)
 
 diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
-index 9d3481389..36e5389b3 100644
+index a20498711..07335a1d6 100644
 --- a/lib/librte_ethdev/rte_ethdev.c
 +++ b/lib/librte_ethdev/rte_ethdev.c
-@@ -3648,9 +3648,8 @@ rte_eth_dev_destroy(struct rte_eth_dev *ethdev,
+@@ -3542,9 +3542,8 @@ rte_eth_dev_destroy(struct rte_eth_dev *ethdev,
  
  	RTE_FUNC_PTR_OR_ERR_RET(*ethdev_uninit, -EINVAL);
 -	if (ethdev_uninit) {
@@ -31,7 +32,7 @@
 +	if (ret)
 +		return ret;
  
- 	return rte_eth_dev_release_port(ethdev);
+ 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
 -- 
 2.19.0
 


More information about the stable mailing list