[2/3] net/mlx5: fix action configuration validation

Message ID 20240718095717.290960-3-dsosnowski@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: E-Switch and validation fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Dariusz Sosnowski July 18, 2024, 9:57 a.m. UTC
Checking if action configuration is required should be checked based on
action type recorded in the actions template, not on user action.

Also, adds a missing internal RSS action type to configuration check
skip list.

Fixes: 57c7b94301ee ("net/mlx5: add async flow operation validation")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index fe7df7305f..39d1cd96d4 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -16388,10 +16388,11 @@  flow_hw_validate_rule_actions(struct rte_eth_dev *dev,
 		user_action = &actions[act_data->action_src];
 
 		/* Skip actions which do not require conf. */
-		switch ((int)user_action->type) {
+		switch ((int)act_data->type) {
 		case RTE_FLOW_ACTION_TYPE_COUNT:
 		case MLX5_RTE_FLOW_ACTION_TYPE_COUNT:
 		case MLX5_RTE_FLOW_ACTION_TYPE_METER_MARK:
+		case MLX5_RTE_FLOW_ACTION_TYPE_RSS:
 			continue;
 		default:
 			break;