[PATCH 1/2] net/mlx5: add DROP destination to mirror clone actions

Gregory Etelson getelson at nvidia.com
Thu Feb 13 09:32:38 CET 2025


From: Tamar Mashiah <tmashiah at nvidia.com>

Add DROP destination to mirror clone actions.

cc: stable at dpdk.org

Signed-off-by: Tamar Mashiah <tmashiah at nvidia.com>
---
 .mailmap                        | 1 +
 drivers/common/mlx5/mlx5_prm.h  | 1 +
 drivers/net/mlx5/mlx5_flow_hw.c | 5 +++++
 3 files changed, 7 insertions(+)

diff --git a/.mailmap b/.mailmap
index a03d3cfb59..8e6e2d58a6 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1517,6 +1517,7 @@ Takeshi Yoshimura <tyos at jp.ibm.com> <t.yoshimura8869 at gmail.com>
 Takuya Asada <syuu at cloudius-systems.com>
 Tal Avraham <talavr at annapurnalabs.com>
 Tal Shnaiderman <talshn at nvidia.com> <talshn at mellanox.com>
+Tamar Mashiah <tmashiah at nvidia.com>
 Tao Y Yang <tao.y.yang at intel.com>
 Tao Zhu <taox.zhu at intel.com>
 Taripin Samuel <samuel.taripin at intel.com>
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index d0cb0131f6..4e630254f8 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -5221,6 +5221,7 @@ enum mlx5_flow_destination_type {
 	MLX5_FLOW_DESTINATION_TYPE_VPORT = 0x0,
 	MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE = 0x1,
 	MLX5_FLOW_DESTINATION_TYPE_TIR = 0x2,
+	MLX5_FLOW_DESTINATION_TYPE_NOP = 0xb,
 };
 
 enum mlx5_flow_context_action {
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 501bf33f94..39da3543b4 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -14144,6 +14144,7 @@ mlx5_mirror_terminal_action(const struct rte_flow_action *action)
 	case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
 	case RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR:
 	case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX:
+	case RTE_FLOW_ACTION_TYPE_DROP:
 		return true;
 	default:
 		break;
@@ -14187,6 +14188,8 @@ mlx5_mirror_validate_sample_action(struct rte_eth_dev *dev,
 			return false;
 		break;
 	case RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX:
+	case RTE_FLOW_ACTION_TYPE_JUMP:
+	case RTE_FLOW_ACTION_TYPE_DROP:
 		break;
 	default:
 		return false;
@@ -14382,6 +14385,8 @@ hw_mirror_format_clone(struct rte_eth_dev *dev,
 							  &actions[i],
 							  "failed to create reformat action");
 			break;
+		case RTE_FLOW_ACTION_TYPE_DROP:
+			break;
 		default:
 			return rte_flow_error_set(error, EINVAL,
 						  RTE_FLOW_ERROR_TYPE_ACTION,
-- 
2.45.2



More information about the stable mailing list