patch 'net/hns3: delete unused markup' has been queued to stable release 20.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 3 10:27:34 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.7

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/05/22. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/824cd052ca391d5a3a30e6e02e075e919a4cfc27

Thanks.

Luca Boccassi

---
>From 824cd052ca391d5a3a30e6e02e075e919a4cfc27 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Mon, 5 Sep 2022 16:59:37 +0800
Subject: [PATCH] net/hns3: delete unused markup

[ upstream commit c05a540902b0e1661945775dc39b144a572c2404 ]

The '__rte_unused' tag in the input parameter  of 'hns3_mac_stats_reset'
is redundant. This patch remove this tag. In addition, this function is
aimed to clear MAC statics. So using 'struct hns3_hw' as input parameter
is better than 'struct rte_eth_dev', and it also facilitates the call of
this function.

Fixes: 8839c5e202f3 ("net/hns3: support device stats")

Signed-off-by: Huisong Li <lihuisong at huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3 at huawei.com>
---
 drivers/net/hns3/hns3_stats.c | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 3cb1e4cac1..6de3767c0b 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -427,15 +427,6 @@ hns3_query_mac_stats_reg_num(struct hns3_hw *hw)
 	return 0;
 }
 
-static int
-hns3_query_update_mac_stats(struct rte_eth_dev *dev)
-{
-	struct hns3_adapter *hns = dev->data->dev_private;
-	struct hns3_hw *hw = &hns->hw;
-
-	return hns3_update_mac_stats(hw);
-}
-
 /* Get tqp stats from register */
 static int
 hns3_update_tqp_stats(struct hns3_hw *hw)
@@ -602,14 +593,13 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 }
 
 static int
-hns3_mac_stats_reset(__rte_unused struct rte_eth_dev *dev)
+hns3_mac_stats_reset(struct hns3_hw *hw)
 {
-	struct hns3_adapter *hns = dev->data->dev_private;
-	struct hns3_hw *hw = &hns->hw;
 	struct hns3_mac_stats *mac_stats = &hw->mac_stats;
 	int ret;
 
-	ret = hns3_query_update_mac_stats(dev);
+	/* Clear hardware MAC statistics by reading it. */
+	ret = hns3_update_mac_stats(hw);
 	if (ret) {
 		hns3_err(hw, "Clear Mac stats fail : %d", ret);
 		return ret;
@@ -727,8 +717,7 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	count = 0;
 
 	if (!hns->is_vf) {
-		/* Update Mac stats */
-		ret = hns3_query_update_mac_stats(dev);
+		ret = hns3_update_mac_stats(hw);
 		if (ret < 0) {
 			hns3_err(hw, "Update Mac stats fail : %d", ret);
 			return ret;
@@ -1095,8 +1084,7 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
 	if (hns->is_vf)
 		return 0;
 
-	/* HW registers are cleared on read */
-	ret = hns3_mac_stats_reset(dev);
+	ret = hns3_mac_stats_reset(&hns->hw);
 	if (ret)
 		return ret;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-03 09:27:29.965218149 +0000
+++ 0076-net-hns3-delete-unused-markup.patch	2022-11-03 09:27:25.513425150 +0000
@@ -1 +1 @@
-From c05a540902b0e1661945775dc39b144a572c2404 Mon Sep 17 00:00:00 2001
+From 824cd052ca391d5a3a30e6e02e075e919a4cfc27 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c05a540902b0e1661945775dc39b144a572c2404 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index 4ec0911522..2ec7a9635e 100644
+index 3cb1e4cac1..6de3767c0b 100644
@@ -25 +26 @@
-@@ -406,15 +406,6 @@ hns3_query_mac_stats_reg_num(struct hns3_hw *hw)
+@@ -427,15 +427,6 @@ hns3_query_mac_stats_reg_num(struct hns3_hw *hw)
@@ -37,0 +39 @@
+ /* Get tqp stats from register */
@@ -39,3 +41,2 @@
- hns3_update_port_rpu_drop_stats(struct hns3_hw *hw)
- {
-@@ -763,14 +754,13 @@ out:
+ hns3_update_tqp_stats(struct hns3_hw *hw)
+@@ -602,14 +593,13 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
@@ -59,2 +60,2 @@
-@@ -1063,8 +1053,7 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
- 	hns3_tqp_basic_stats_get(dev, xstats, &count);
+@@ -727,8 +717,7 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+ 	count = 0;
@@ -68,2 +69,2 @@
- 			rte_spinlock_unlock(&hw->stats_lock);
-@@ -1482,8 +1471,7 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
+ 			return ret;
+@@ -1095,8 +1084,7 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
@@ -71 +72 @@
- 		goto out;
+ 		return 0;
@@ -75 +76,3 @@
-+	ret = hns3_mac_stats_reset(hw);
++	ret = hns3_mac_stats_reset(&hns->hw);
+ 	if (ret)
+ 		return ret;
@@ -77,2 +79,0 @@
- out:
- 	rte_spinlock_unlock(&hw->stats_lock);


More information about the stable mailing list