[dpdk-stable] patch 'net/hns3: fail setting FEC if one bit mode is not supported' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Sat Jun 12 01:03:42 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/98f23aad5647198c35f83767641f24fbc39b861d

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 98f23aad5647198c35f83767641f24fbc39b861d Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Mon, 10 May 2021 21:38:13 +0800
Subject: [PATCH] net/hns3: fail setting FEC if one bit mode is not supported
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit ab8c5005853ac4f77b645396ce681fb6ea2bb5e9 ]

If the FEC mode was not supported, it should return error code.

This patch also adds a space when log error info.

Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")

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

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 498e1a40f3..5716e399c9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6121,9 +6121,11 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
 		return ret;
 
 	/* HNS3 PMD driver only support one bit set mode, e.g. 0x1, 0x4 */
-	if (!is_fec_mode_one_bit_set(mode))
-		hns3_err(hw, "FEC mode(0x%x) not supported in HNS3 PMD,"
+	if (!is_fec_mode_one_bit_set(mode)) {
+		hns3_err(hw, "FEC mode(0x%x) not supported in HNS3 PMD, "
 			     "FEC mode should be only one bit set", mode);
+		return -EINVAL;
+	}
 
 	/*
 	 * Check whether the configured mode is within the FEC capability.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.859901800 +0800
+++ 0128-net-hns3-fail-setting-FEC-if-one-bit-mode-is-not-sup.patch	2021-06-12 06:53:56.540000000 +0800
@@ -1 +1 @@
-From ab8c5005853ac4f77b645396ce681fb6ea2bb5e9 Mon Sep 17 00:00:00 2001
+From 98f23aad5647198c35f83767641f24fbc39b861d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit ab8c5005853ac4f77b645396ce681fb6ea2bb5e9 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index b8e97355e9..0589e3f10a 100644
+index 498e1a40f3..5716e399c9 100644
@@ -23 +25 @@
-@@ -6991,9 +6991,11 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
+@@ -6121,9 +6121,11 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)


More information about the stable mailing list