[dpdk-stable] patch 'net/hns3: increase readability in logs' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Sat Jun 12 01:02:40 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8e6d9cfe2d140f2bb92412f36777ee308d1bbf01

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 8e6d9cfe2d140f2bb92412f36777ee308d1bbf01 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Fri, 30 Apr 2021 17:04:04 +0800
Subject: [PATCH] net/hns3: increase readability in logs
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit b80c527a9ca4b8aa5ed1d8fba4e7882213883485 ]

Some logs format u64 variables, mostly using hexadecimal which was not
readable.
This patch formats most u64 variables in decimal, and add '0x' prefix
to the ones that are not adjusted.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Fixes: 2790c6464725 ("net/hns3: support device reset")
Fixes: 8839c5e202f3 ("net/hns3: support device stats")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
---
 drivers/net/hns3/hns3_flow.c  |  2 +-
 drivers/net/hns3/hns3_intr.c  | 20 ++++++++++----------
 drivers/net/hns3/hns3_stats.c |  8 ++++----
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 026f376a55..9087268712 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1572,7 +1572,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 		     hw->rss_info.conf.types;
 	if (flow_types != rss_flow_conf.types)
 		hns3_warn(hw, "modified RSS types based on hardware support, "
-			      "requested:%" PRIx64 " configured:%" PRIx64,
+			      "requested:0x%" PRIx64 " configured:0x%" PRIx64,
 			  rss_flow_conf.types, flow_types);
 	/* Update the useful flow types */
 	rss_flow_conf.types = flow_types;
diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 4da197f940..b133670be0 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -1934,7 +1934,7 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels)
 	if (merge_cnt != hw->reset.stats.merge_cnt)
 		hns3_warn(hw,
 			  "No need to do low-level reset after %s reset. "
-			  "merge cnt: %" PRIx64 " total merge cnt: %" PRIx64,
+			  "merge cnt: %" PRIu64 " total merge cnt: %" PRIu64,
 			  reset_string[hw->reset.level],
 			  hw->reset.stats.merge_cnt - merge_cnt,
 			  hw->reset.stats.merge_cnt);
@@ -1954,7 +1954,7 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
 		hw->reset.attempts = 0;
 		hw->reset.stats.fail_cnt++;
 		hns3_warn(hw, "%s reset fail because new Reset is pending "
-			      "attempts:%" PRIx64,
+			      "attempts:%" PRIu64,
 			  reset_string[hw->reset.level],
 			  hw->reset.stats.fail_cnt);
 		hw->reset.level = HNS3_NONE_RESET;
@@ -1981,10 +1981,10 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
 reset_fail:
 	hw->reset.attempts = 0;
 	hw->reset.stats.fail_cnt++;
-	hns3_warn(hw, "%s reset fail fail_cnt:%" PRIx64 " success_cnt:%" PRIx64
-		  " global_cnt:%" PRIx64 " imp_cnt:%" PRIx64
-		  " request_cnt:%" PRIx64 " exec_cnt:%" PRIx64
-		  " merge_cnt:%" PRIx64 "adapter_state:%d",
+	hns3_warn(hw, "%s reset fail fail_cnt:%" PRIu64 " success_cnt:%" PRIu64
+		  " global_cnt:%" PRIu64 " imp_cnt:%" PRIu64
+		  " request_cnt:%" PRIu64 " exec_cnt:%" PRIu64
+		  " merge_cnt:%" PRIu64 "adapter_state:%d",
 		  reset_string[hw->reset.level], hw->reset.stats.fail_cnt,
 		  hw->reset.stats.success_cnt, hw->reset.stats.global_cnt,
 		  hw->reset.stats.imp_cnt, hw->reset.stats.request_cnt,
@@ -2100,10 +2100,10 @@ hns3_reset_post(struct hns3_adapter *hns)
 		rte_spinlock_unlock(&hw->lock);
 		hns3_clock_gettime(&tv);
 		timersub(&tv, &hw->reset.start_time, &tv_delta);
-		hns3_warn(hw, "%s reset done fail_cnt:%" PRIx64
-			  " success_cnt:%" PRIx64 " global_cnt:%" PRIx64
-			  " imp_cnt:%" PRIx64 " request_cnt:%" PRIx64
-			  " exec_cnt:%" PRIx64 " merge_cnt:%" PRIx64,
+		hns3_warn(hw, "%s reset done fail_cnt:%" PRIu64
+			  " success_cnt:%" PRIu64 " global_cnt:%" PRIu64
+			  " imp_cnt:%" PRIu64 " request_cnt:%" PRIu64
+			  " exec_cnt:%" PRIu64 " merge_cnt:%" PRIu64,
 			  reset_string[hw->reset.level],
 			  hw->reset.stats.fail_cnt, hw->reset.stats.success_cnt,
 			  hw->reset.stats.global_cnt, hw->reset.stats.imp_cnt,
diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 5b7b0c2f10..7fbdce9a1f 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -943,7 +943,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
 	len = cnt_stats * sizeof(struct rte_eth_xstat);
 	values_copy = rte_zmalloc("hns3_xstats_values", len, 0);
 	if (values_copy == NULL) {
-		hns3_err(hw, "Failed to allocate %" PRIx64 " bytes needed "
+		hns3_err(hw, "Failed to allocate 0x%" PRIx64 " bytes needed "
 			     "to store statistics values", len);
 		return -ENOMEM;
 	}
@@ -965,7 +965,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
 
 	for (i = 0; i < size; i++) {
 		if (ids[i] >= cnt_stats) {
-			hns3_err(hw, "ids[%u] (%" PRIx64 ") is invalid, "
+			hns3_err(hw, "ids[%u] (%" PRIu64 ") is invalid, "
 				     "should < %u", i, ids[i], cnt_stats);
 			rte_free(values_copy);
 			return -EINVAL;
@@ -1024,7 +1024,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
 	len = cnt_stats * sizeof(struct rte_eth_xstat_name);
 	names_copy = rte_zmalloc("hns3_xstats_names", len, 0);
 	if (names_copy == NULL) {
-		hns3_err(hw, "Failed to allocate %" PRIx64 " bytes needed "
+		hns3_err(hw, "Failed to allocate 0x%" PRIx64 " bytes needed "
 			     "to store statistics names", len);
 		return -ENOMEM;
 	}
@@ -1033,7 +1033,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
 
 	for (i = 0; i < size; i++) {
 		if (ids[i] >= cnt_stats) {
-			hns3_err(hw, "ids[%u] (%" PRIx64 ") is invalid, "
+			hns3_err(hw, "ids[%u] (%" PRIu64 ") is invalid, "
 				     "should < %u", i, ids[i], cnt_stats);
 			rte_free(names_copy);
 			return -EINVAL;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.331476100 +0800
+++ 0066-net-hns3-increase-readability-in-logs.patch	2021-06-12 06:53:56.320000000 +0800
@@ -1 +1 @@
-From b80c527a9ca4b8aa5ed1d8fba4e7882213883485 Mon Sep 17 00:00:00 2001
+From 8e6d9cfe2d140f2bb92412f36777ee308d1bbf01 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit b80c527a9ca4b8aa5ed1d8fba4e7882213883485 ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -25 +27 @@
-index 49d6568b22..65c7f6ed88 100644
+index 026f376a55..9087268712 100644
@@ -28 +30 @@
-@@ -1556,7 +1556,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
+@@ -1572,7 +1572,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
@@ -38 +40 @@
-index 62e89a960b..905c6d9513 100644
+index 4da197f940..b133670be0 100644
@@ -41 +43 @@
-@@ -2570,7 +2570,7 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels)
+@@ -1934,7 +1934,7 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels)
@@ -50 +52 @@
-@@ -2590,7 +2590,7 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
+@@ -1954,7 +1954,7 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
@@ -59 +61 @@
-@@ -2617,10 +2617,10 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
+@@ -1981,10 +1981,10 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
@@ -74 +76 @@
-@@ -2736,10 +2736,10 @@ hns3_reset_post(struct hns3_adapter *hns)
+@@ -2100,10 +2100,10 @@ hns3_reset_post(struct hns3_adapter *hns)
@@ -90 +92 @@
-index 3afef4a04b..e09dc0da80 100644
+index 5b7b0c2f10..7fbdce9a1f 100644
@@ -93 +95 @@
-@@ -1325,7 +1325,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -943,7 +943,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
@@ -102 +104 @@
-@@ -1347,7 +1347,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -965,7 +965,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
@@ -111 +113 @@
-@@ -1406,7 +1406,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
+@@ -1024,7 +1024,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
@@ -120 +122 @@
-@@ -1415,7 +1415,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
+@@ -1033,7 +1033,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,


More information about the stable mailing list