[dpdk-stable] patch 'ethdev: fix port ownership logs' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Tue Nov 20 20:12:09 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/23/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 255637fd67dc81bdbe6f3047d24b5efb48f6ef4f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Thu, 16 Aug 2018 15:37:14 -0700
Subject: [PATCH] ethdev: fix port ownership logs

[ upstream commit 40d96ffbd1f61533a19f2df5673f378d166ff11a ]

The rte_eth_dev_owner_unset function always generates a log
message because the unset value for owner id is 0.

Also, when rte_eth_dev_owner_delete is called with a valid
owner id, the log message should be at NOTICE not ERROR
severity.

Fixes: 5b7ba31148a8 ("ethdev: add port ownership")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Matan Azrad <matan at mellanox.com>
---
 lib/librte_ethdev/rte_ethdev.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index ee6bb0552..850d0c1b5 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -394,9 +394,6 @@ rte_eth_is_valid_owner_id(uint64_t owner_id)
 {
 	if (owner_id == RTE_ETH_DEV_NO_OWNER ||
-	    rte_eth_dev_shared_data->next_owner_id <= owner_id) {
-		RTE_ETHDEV_LOG(ERR, "Invalid owner_id=%016"PRIx64"\n",
-			owner_id);
+	    rte_eth_dev_shared_data->next_owner_id <= owner_id)
 		return 0;
-	}
 	return 1;
 }
@@ -445,6 +442,10 @@ _rte_eth_dev_owner_set(const uint16_t port_id, const uint64_t old_owner_id,
 
 	if (!rte_eth_is_valid_owner_id(new_owner->id) &&
-	    !rte_eth_is_valid_owner_id(old_owner_id))
+	    !rte_eth_is_valid_owner_id(old_owner_id)) {
+		RTE_ETHDEV_LOG(ERR,
+			"Invalid owner old_id=%016"PRIx64" new_id=%016"PRIx64"\n",
+		       old_owner_id, new_owner->id);
 		return -EINVAL;
+	}
 
 	port_owner = &rte_eth_devices[port_id].data->owner;
@@ -517,7 +518,11 @@ rte_eth_dev_owner_delete(const uint64_t owner_id)
 				memset(&rte_eth_devices[port_id].data->owner, 0,
 				       sizeof(struct rte_eth_dev_owner));
-		RTE_ETHDEV_LOG(ERR,
+		RTE_ETHDEV_LOG(NOTICE,
 			"All port owners owned by %016"PRIx64" identifier have removed\n",
 			owner_id);
+	} else {
+		RTE_ETHDEV_LOG(ERR,
+			       "Invalid owner id=%016"PRIx64"\n",
+			       owner_id);
 	}
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-20 17:53:07.926145657 +0000
+++ 0019-ethdev-fix-port-ownership-logs.patch	2018-11-20 17:53:07.000000000 +0000
@@ -1,8 +1,10 @@
-From 40d96ffbd1f61533a19f2df5673f378d166ff11a Mon Sep 17 00:00:00 2001
+From 255637fd67dc81bdbe6f3047d24b5efb48f6ef4f Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen at networkplumber.org>
 Date: Thu, 16 Aug 2018 15:37:14 -0700
 Subject: [PATCH] ethdev: fix port ownership logs
 
+[ upstream commit 40d96ffbd1f61533a19f2df5673f378d166ff11a ]
+
 The rte_eth_dev_owner_unset function always generates a log
 message because the unset value for owner id is 0.
 
@@ -11,7 +13,6 @@
 severity.
 
 Fixes: 5b7ba31148a8 ("ethdev: add port ownership")
-Cc: stable at dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
 Acked-by: Matan Azrad <matan at mellanox.com>
@@ -20,7 +21,7 @@
  1 file changed, 11 insertions(+), 6 deletions(-)
 
 diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
-index 16825bf3c..3f8de9341 100644
+index ee6bb0552..850d0c1b5 100644
 --- a/lib/librte_ethdev/rte_ethdev.c
 +++ b/lib/librte_ethdev/rte_ethdev.c
 @@ -394,9 +394,6 @@ rte_eth_is_valid_owner_id(uint64_t owner_id)


More information about the stable mailing list