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

Message ID 20250213083239.94360-1-getelson@nvidia.com (mailing list archive)
State Awaiting Upstream
Delegated to: Raslan Darawsheh
Headers
Series [1/2] net/mlx5: add DROP destination to mirror clone actions |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Etelson, Gregory Feb. 13, 2025, 8:32 a.m. UTC
From: Tamar Mashiah <tmashiah@nvidia.com>

Add DROP destination to mirror clone actions.

cc: stable@dpdk.org

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

Comments

Dariusz Sosnowski Feb. 26, 2025, 8:38 a.m. UTC | #1
> -----Original Message-----
> From: Gregory Etelson <getelson@nvidia.com>
> Sent: Thursday, February 13, 2025 9:33 AM
> To: dev@dpdk.org
> Cc: Gregory Etelson <getelson@nvidia.com>; Maayan Kashani
> <mkashani@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>; Tamar
> Mashiah <tmashiah@nvidia.com>; stable@dpdk.org
> Subject: [PATCH 1/2] net/mlx5: add DROP destination to mirror clone actions
> 
> External email: Use caution opening links or attachments
> 
> 
> From: Tamar Mashiah <tmashiah@nvidia.com>
> 
> Add DROP destination to mirror clone actions.
> 
> cc: stable@dpdk.org
> 
> Signed-off-by: Tamar Mashiah <tmashiah@nvidia.com>

Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

Best regards,
Dariusz Sosnowski
  
Raslan Darawsheh Feb. 26, 2025, 1:55 p.m. UTC | #2
Hi,

From: Gregory Etelson <getelson@nvidia.com>
Sent: Thursday, February 13, 2025 10:32 AM
To: dev@dpdk.org
Cc: Gregory Etelson; Maayan Kashani; Raslan Darawsheh; Tamar Mashiah; stable@dpdk.org
Subject: [PATCH 1/2] net/mlx5: add DROP destination to mirror clone actions

From: Tamar Mashiah <tmashiah@nvidia.com>

Add DROP destination to mirror clone actions.

cc: stable@dpdk.org

Signed-off-by: Tamar Mashiah <tmashiah@nvidia.com>


Series applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/.mailmap b/.mailmap
index a03d3cfb59..8e6e2d58a6 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1517,6 +1517,7 @@  Takeshi Yoshimura <tyos@jp.ibm.com> <t.yoshimura8869@gmail.com>
 Takuya Asada <syuu@cloudius-systems.com>
 Tal Avraham <talavr@annapurnalabs.com>
 Tal Shnaiderman <talshn@nvidia.com> <talshn@mellanox.com>
+Tamar Mashiah <tmashiah@nvidia.com>
 Tao Y Yang <tao.y.yang@intel.com>
 Tao Zhu <taox.zhu@intel.com>
 Taripin Samuel <samuel.taripin@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,