[dpdk-stable] patch 'net/mlx5: fix unreachable MPLS error path' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 13:57:31 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Thanks.

Luca Boccassi

---
>From edd6234fbd3b8698fab41e7f41ed0aea5b2a80ea Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba at mellanox.com>
Date: Wed, 27 May 2020 08:37:57 +0000
Subject: [PATCH] net/mlx5: fix unreachable MPLS error path

[ upstream commit 01de93f2451730d480db8db18921e1bca7cb1f3e ]

The mlx5_flow_validate_item_mpls function checks MPLS item validation.
It first checks if the device supports MPLS, it is done using the ifdef
condition that if it fails to skip to endif and return the appropriate
error.

When MPLS is supported, the preprocessor will copy the body of the
function ending with return 0 followed by the lines that report MPLS
support.
In fact, these lines are unreachable because before them the function
returns 0 and in any case they are unnecessary.

Replace the endif by else and move endif to the end of the
function.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")

Signed-off-by: Michael Baum <michaelba at mellanox.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index e05c35a41..400273f25 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2230,11 +2230,12 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
 	if (ret < 0)
 		return ret;
 	return 0;
-#endif
+#else
 	return rte_flow_error_set(error, ENOTSUP,
 				  RTE_FLOW_ERROR_TYPE_ITEM, item,
 				  "MPLS is not supported by Verbs, please"
 				  " update.");
+#endif
 }
 
 /**
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.096437178 +0100
+++ 0013-net-mlx5-fix-unreachable-MPLS-error-path.patch	2020-07-24 12:53:48.167004224 +0100
@@ -1,8 +1,10 @@
-From 01de93f2451730d480db8db18921e1bca7cb1f3e Mon Sep 17 00:00:00 2001
+From edd6234fbd3b8698fab41e7f41ed0aea5b2a80ea Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba at mellanox.com>
 Date: Wed, 27 May 2020 08:37:57 +0000
 Subject: [PATCH] net/mlx5: fix unreachable MPLS error path
 
+[ upstream commit 01de93f2451730d480db8db18921e1bca7cb1f3e ]
+
 The mlx5_flow_validate_item_mpls function checks MPLS item validation.
 It first checks if the device supports MPLS, it is done using the ifdef
 condition that if it fails to skip to endif and return the appropriate
@@ -18,7 +20,6 @@
 function.
 
 Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
-Cc: stable at dpdk.org
 
 Signed-off-by: Michael Baum <michaelba at mellanox.com>
 Acked-by: Matan Azrad <matan at mellanox.com>
@@ -27,10 +28,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index ae478a510..f2c3cf90d 100644
+index e05c35a41..400273f25 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -2269,11 +2269,12 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
+@@ -2230,11 +2230,12 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
  	if (ret < 0)
  		return ret;
  	return 0;


More information about the stable mailing list