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

Kevin Traynor ktraynor at redhat.com
Fri Jul 17 18:31:51 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.10

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/23/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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

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

Thanks.

Kevin.

---
>From b05ad22ad0e0147637336afe6f5617795e7079bf 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 30d5b66e64..0350d72efd 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1672,9 +1672,10 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
 		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.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-17 17:17:00.161670040 +0100
+++ 0003-net-mlx5-fix-unreachable-MPLS-error-path.patch	2020-07-17 17:16:59.955771961 +0100
@@ -1 +1 @@
-From 01de93f2451730d480db8db18921e1bca7cb1f3e Mon Sep 17 00:00:00 2001
+From b05ad22ad0e0147637336afe6f5617795e7079bf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 01de93f2451730d480db8db18921e1bca7cb1f3e ]
+
@@ -21 +22,0 @@
-Cc: stable at dpdk.org
@@ -30 +31 @@
-index ae478a510a..f2c3cf90d4 100644
+index 30d5b66e64..0350d72efd 100644
@@ -33 +34 @@
-@@ -2270,9 +2270,10 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
+@@ -1672,9 +1672,10 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,



More information about the stable mailing list