[dpdk-stable] patch 'net/sfc: fix error path inconsistency' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Mon May 10 18:00:59 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 05/12/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/cd33dd08a7ac1e8b910786dbef0275e306a5d03c

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From cd33dd08a7ac1e8b910786dbef0275e306a5d03c Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov at oktetlabs.ru>
Date: Fri, 26 Mar 2021 12:39:27 +0300
Subject: [PATCH] net/sfc: fix error path inconsistency
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit 85a9c42499fa97b9bee12a95a8477d34cec277ec ]

At the fail label, there's a statement to set general errno and
error message. However, before the label is reached, a custom
error message can be set by the code which parses actions.
This custom (action-specific) message, when present,
must not be replaced by the general one.

Fixes: 662286ae61d2 ("net/sfc: add actions parsing stub to MAE backend")

Signed-off-by: Ivan Malov <ivan.malov at oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton at xilinx.com>
---
 drivers/net/sfc/sfc_mae.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 15c5c39758..42d1612302 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -2101,6 +2101,8 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
 	efx_mae_actions_t *spec;
 	int rc;
 
+	rte_errno = 0;
+
 	if (actions == NULL) {
 		return rte_flow_error_set(error, EINVAL,
 				RTE_FLOW_ERROR_TYPE_ACTION_NUM, NULL,
@@ -2144,7 +2146,7 @@ fail_rule_parse_action:
 	efx_mae_action_set_spec_fini(sa->nic, spec);
 
 fail_action_set_spec_init:
-	if (rc > 0) {
+	if (rc > 0 && rte_errno == 0) {
 		rc = rte_flow_error_set(error, rc,
 			RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 			NULL, "Failed to process the action");
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.473198200 +0800
+++ 0111-net-sfc-fix-error-path-inconsistency.patch	2021-05-10 23:59:26.500000000 +0800
@@ -1 +1 @@
-From 85a9c42499fa97b9bee12a95a8477d34cec277ec Mon Sep 17 00:00:00 2001
+From cd33dd08a7ac1e8b910786dbef0275e306a5d03c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 85a9c42499fa97b9bee12a95a8477d34cec277ec ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index 8afa093414..4dafe3dcd9 100644
+index 15c5c39758..42d1612302 100644
@@ -26 +28 @@
-@@ -2634,6 +2634,8 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
+@@ -2101,6 +2101,8 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
@@ -35 +37 @@
-@@ -2690,7 +2692,7 @@ fail_rule_parse_action:
+@@ -2144,7 +2146,7 @@ fail_rule_parse_action:


More information about the stable mailing list