[dpdk-stable] patch 'net/hns3: fix log on flow director clear' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Sat Jun 12 01:03:33 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/8f93ec62881375eb5ec45696d44cee34f3d161fc

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 8f93ec62881375eb5ec45696d44cee34f3d161fc Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Fri, 7 May 2021 17:08:15 +0800
Subject: [PATCH] net/hns3: fix log on flow director clear
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit f4e5c18ffa2656d253bc334171854e60463afbbb ]

If clear FDIR rules fail, the error code was logged, but the error code
was useless because it was the sum of all fail code.

This patch fixes it by log the success cnt and fail cnt.

Fixes: fcba820d9b9e ("net/hns3: support flow director")
Fixes: 8eed8acc812e ("net/hns3: add error code to some logs")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
---
 drivers/net/hns3/hns3_fdir.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 3810c6fcd1..ab7db1189d 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -1013,6 +1013,8 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
 	struct hns3_fdir_info *fdir_info = &pf->fdir;
 	struct hns3_fdir_rule_ele *fdir_filter;
 	struct hns3_hw *hw = &hns->hw;
+	int succ_cnt = 0;
+	int fail_cnt = 0;
 	int ret = 0;
 
 	/* flush flow director */
@@ -1021,17 +1023,23 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
 	fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list);
 	while (fdir_filter) {
 		TAILQ_REMOVE(&fdir_info->fdir_list, fdir_filter, entries);
-		ret += hns3_fd_tcam_config(hw, true,
-					   fdir_filter->fdir_conf.location,
-					   NULL, false);
+		ret = hns3_fd_tcam_config(hw, true,
+					  fdir_filter->fdir_conf.location,
+					  NULL, false);
+		if (ret == 0)
+			succ_cnt++;
+		else
+			fail_cnt++;
 		rte_free(fdir_filter);
 		fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list);
 	}
 
-	if (ret) {
-		hns3_err(hw, "Fail to delete FDIR filter, ret = %d", ret);
+	if (fail_cnt > 0) {
+		hns3_err(hw, "fail to delete all FDIR filter, success num = %d "
+			 "fail num = %d", succ_cnt, fail_cnt);
 		ret = -EIO;
 	}
+
 	return ret;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.647938800 +0800
+++ 0119-net-hns3-fix-log-on-flow-director-clear.patch	2021-06-12 06:53:56.510000000 +0800
@@ -1 +1 @@
-From f4e5c18ffa2656d253bc334171854e60463afbbb Mon Sep 17 00:00:00 2001
+From 8f93ec62881375eb5ec45696d44cee34f3d161fc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit f4e5c18ffa2656d253bc334171854e60463afbbb ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index 0ef0938ea2..e116d872fb 100644
+index 3810c6fcd1..ab7db1189d 100644
@@ -25 +27 @@
-@@ -1026,6 +1026,8 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
+@@ -1013,6 +1013,8 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
@@ -34 +36 @@
-@@ -1034,17 +1036,23 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
+@@ -1021,17 +1023,23 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)


More information about the stable mailing list