[dpdk-stable] patch 'common/mlx5: fix code arrangement in tag allocation' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 13:58:26 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 dac5398ff22718581c4b564325aa87fbca645ac3 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba at mellanox.com>
Date: Wed, 24 Jun 2020 13:20:31 +0000
Subject: [PATCH] common/mlx5: fix code arrangement in tag allocation

[ upstream commit ed5d23656e925ea8b271d4a84eec8e4046f66fa9 ]

Flow tag action is supported only when the driver has DR or DV support.
The tag allocation is adjusted to the modes DV or DR.

In case both DR and DV are not supported in the system, the driver
handles static code for error report.
This error code, wrongly, was compiled when DV is supported while in
this case it cannot be accessed at all.

Ignore the aforementioned static error code in case of DV by
preprocessor commands rearrangement.

Fixes: cbb66daa3c85 ("net/mlx5: prepare Direct Verbs for Direct Rule")

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

diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c
index 44f63116a..65b63bd60 100644
--- a/drivers/net/mlx5/mlx5_glue.c
+++ b/drivers/net/mlx5/mlx5_glue.c
@@ -754,7 +754,7 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag)
 #ifdef HAVE_IBV_FLOW_DV_SUPPORT
 #ifdef HAVE_MLX5DV_DR
 	return mlx5dv_dr_action_create_tag(tag);
-#else
+#else /* HAVE_MLX5DV_DR */
 	struct mlx5dv_flow_action_attr *action;
 	action = malloc(sizeof(*action));
 	if (!action)
@@ -762,11 +762,12 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag)
 	action->type = MLX5DV_FLOW_ACTION_TAG;
 	action->tag_value = tag;
 	return action;
-#endif
-#endif
+#endif /* HAVE_MLX5DV_DR */
+#else /* HAVE_IBV_FLOW_DV_SUPPORT */
 	(void)tag;
 	errno = ENOTSUP;
 	return NULL;
+#endif /* HAVE_IBV_FLOW_DV_SUPPORT */
 }
 
 static void *
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.213459854 +0100
+++ 0068-common-mlx5-fix-code-arrangement-in-tag-allocation.patch	2020-07-24 12:53:48.291006534 +0100
@@ -1,8 +1,10 @@
-From ed5d23656e925ea8b271d4a84eec8e4046f66fa9 Mon Sep 17 00:00:00 2001
+From dac5398ff22718581c4b564325aa87fbca645ac3 Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba at mellanox.com>
 Date: Wed, 24 Jun 2020 13:20:31 +0000
 Subject: [PATCH] common/mlx5: fix code arrangement in tag allocation
 
+[ upstream commit ed5d23656e925ea8b271d4a84eec8e4046f66fa9 ]
+
 Flow tag action is supported only when the driver has DR or DV support.
 The tag allocation is adjusted to the modes DV or DR.
 
@@ -15,19 +17,18 @@
 preprocessor commands rearrangement.
 
 Fixes: cbb66daa3c85 ("net/mlx5: prepare Direct Verbs for Direct Rule")
-Cc: stable at dpdk.org
 
 Signed-off-by: Michael Baum <michaelba at mellanox.com>
 Acked-by: Matan Azrad <matan at mellanox.com>
 ---
- drivers/common/mlx5/linux/mlx5_glue.c | 7 ++++---
+ drivers/net/mlx5/mlx5_glue.c | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c
-index 62c4cc74b..048207eb7 100644
---- a/drivers/common/mlx5/linux/mlx5_glue.c
-+++ b/drivers/common/mlx5/linux/mlx5_glue.c
-@@ -752,7 +752,7 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag)
+diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c
+index 44f63116a..65b63bd60 100644
+--- a/drivers/net/mlx5/mlx5_glue.c
++++ b/drivers/net/mlx5/mlx5_glue.c
+@@ -754,7 +754,7 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag)
  #ifdef HAVE_IBV_FLOW_DV_SUPPORT
  #ifdef HAVE_MLX5DV_DR
  	return mlx5dv_dr_action_create_tag(tag);
@@ -36,7 +37,7 @@
  	struct mlx5dv_flow_action_attr *action;
  	action = malloc(sizeof(*action));
  	if (!action)
-@@ -760,11 +760,12 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag)
+@@ -762,11 +762,12 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag)
  	action->type = MLX5DV_FLOW_ACTION_TAG;
  	action->tag_value = tag;
  	return action;


More information about the stable mailing list