patch 'net/mlx5: fix drop action validation' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Wed Nov 23 19:03:32 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

Thanks.

Kevin

---
>From 3e76df459a703b7fa745053282ba13117d00ad9f Mon Sep 17 00:00:00 2001
From: Shun Hao <shunh at nvidia.com>
Date: Thu, 10 Nov 2022 08:59:21 +0200
Subject: [PATCH] net/mlx5: fix drop action validation

[ upstream commit e2b05b22ec5c8fbe35abf8a38e02bd2997e052a3 ]

Currently there's limitation for Drop action that can only co-exist with
Count action.

Sample and Age actions are also able to exist with Drop within the same
flow, and this patch includes them in the Drop action validation.

Fixes: 70faf9ae0a29 ("net/mlx5: unify validation of drop action")

Signed-off-by: Shun Hao <shunh at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.h    | 3 +++
 drivers/net/mlx5/mlx5_flow_dv.c | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 094e483325..7b5fde4823 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -268,4 +268,7 @@ enum mlx5_feature_name {
 #define MLX5_FLOW_ACTION_CT (1ull << 41)
 
+#define MLX5_FLOW_DROP_INCLUSIVE_ACTIONS \
+	(MLX5_FLOW_ACTION_COUNT | MLX5_FLOW_ACTION_SAMPLE | MLX5_FLOW_ACTION_AGE)
+
 #define MLX5_FLOW_FATE_ACTIONS \
 	(MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE | \
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index c3a2a658e1..4603736c28 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7916,5 +7916,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	 * Validate the drop action mutual exclusion with other actions.
 	 * Drop action is mutually-exclusive with any other action, except for
-	 * Count action.
+	 * Count/Sample/Age actions.
 	 * Drop action compatibility with tunnel offload was already validated.
 	 */
@@ -7922,10 +7922,10 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			    MLX5_FLOW_ACTION_TUNNEL_MATCH));
 	else if ((action_flags & MLX5_FLOW_ACTION_DROP) &&
-	    (action_flags & ~(MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_COUNT)))
+	    (action_flags & ~(MLX5_FLOW_ACTION_DROP | MLX5_FLOW_DROP_INCLUSIVE_ACTIONS)))
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
 					  "Drop action is mutually-exclusive "
 					  "with any other action, except for "
-					  "Count action");
+					  "Count/Sample/Age action");
 	/* Eswitch has few restrictions on using items and actions */
 	if (attr->transfer) {
-- 
2.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-23 09:55:57.549328687 +0000
+++ 0019-net-mlx5-fix-drop-action-validation.patch	2022-11-23 09:55:57.049149256 +0000
@@ -1 +1 @@
-From e2b05b22ec5c8fbe35abf8a38e02bd2997e052a3 Mon Sep 17 00:00:00 2001
+From 3e76df459a703b7fa745053282ba13117d00ad9f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e2b05b22ec5c8fbe35abf8a38e02bd2997e052a3 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 955383dd07..94e0ac99b9 100644
+index 094e483325..7b5fde4823 100644
@@ -26,2 +27,2 @@
-@@ -305,4 +305,7 @@ enum mlx5_feature_name {
- #define MLX5_FLOW_ACTION_INDIRECT_AGE (1ull << 44)
+@@ -268,4 +268,7 @@ enum mlx5_feature_name {
+ #define MLX5_FLOW_ACTION_CT (1ull << 41)
@@ -35 +36 @@
-index d79dd8d5f0..bc9a75f225 100644
+index c3a2a658e1..4603736c28 100644
@@ -38 +39 @@
-@@ -8104,5 +8104,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7916,5 +7916,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -45 +46 @@
-@@ -8110,10 +8110,10 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7922,10 +7922,10 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,



More information about the stable mailing list