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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Nov 18 00:08:41 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.7

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/19/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/1f22dd064c5df53f43d04c08af61340f48faa931

Thanks.

Luca Boccassi

---
>From 1f22dd064c5df53f43d04c08af61340f48faa931 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 090cc7c77f..156dadde6b 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -217,6 +217,9 @@ enum mlx5_feature_name {
 #define MLX5_FLOW_ACTION_TUNNEL_SET (1ull << 37)
 #define MLX5_FLOW_ACTION_TUNNEL_MATCH (1ull << 38)
 
+#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 | \
 	 MLX5_FLOW_ACTION_RSS | MLX5_FLOW_ACTION_JUMP | \
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 1705e2a1f0..c60aabf075 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -6155,18 +6155,18 @@ 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.
 	 */
 	if (action_flags & (MLX5_FLOW_ACTION_TUNNEL_MATCH |
 			    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) {
 		if (!mlx5_flow_ext_mreg_supported(dev) &&
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-17 23:07:56.232855751 +0000
+++ 0017-net-mlx5-fix-drop-action-validation.patch	2022-11-17 23:07:55.504330637 +0000
@@ -1 +1 @@
-From e2b05b22ec5c8fbe35abf8a38e02bd2997e052a3 Mon Sep 17 00:00:00 2001
+From 1f22dd064c5df53f43d04c08af61340f48faa931 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 090cc7c77f..156dadde6b 100644
@@ -26,3 +27,3 @@
-@@ -304,6 +304,9 @@ enum mlx5_feature_name {
- #define MLX5_FLOW_ACTION_INDIRECT_COUNT (1ull << 43)
- #define MLX5_FLOW_ACTION_INDIRECT_AGE (1ull << 44)
+@@ -217,6 +217,9 @@ enum mlx5_feature_name {
+ #define MLX5_FLOW_ACTION_TUNNEL_SET (1ull << 37)
+ #define MLX5_FLOW_ACTION_TUNNEL_MATCH (1ull << 38)
@@ -37 +38 @@
-index d79dd8d5f0..bc9a75f225 100644
+index 1705e2a1f0..c60aabf075 100644
@@ -40 +41 @@
-@@ -8103,18 +8103,18 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -6155,18 +6155,18 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,


More information about the stable mailing list