summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDekel Peled <dekelp@mellanox.com>2019-08-15 12:26:50 +0300
committerFerruh Yigit <ferruh.yigit@intel.com>2019-09-06 17:15:14 +0200
commite6ed9dfdf848a3c7995dc6fa8f56f8c7fbb85161 (patch)
tree2648479c968be4935e621817aa8dbf690d1caef4
parent48c91c8f3fc7edb3e90eef682d535af294ed7eec (diff)
downloaddpdk-next-eventdev-e6ed9dfdf848a3c7995dc6fa8f56f8c7fbb85161.zip
dpdk-next-eventdev-e6ed9dfdf848a3c7995dc6fa8f56f8c7fbb85161.tar.gz
dpdk-next-eventdev-e6ed9dfdf848a3c7995dc6fa8f56f8c7fbb85161.tar.xz
net/mlx5: fix drop action validation
Function mlx5_flow_validate_action_drop() checks if another fate action is already present in this flow rule, using defined value MLX5_FLOW_FATE_ACTIONS. This patch enhances the check using value (MLX5_FLOW_FATE_ACTIONS | MLX5_FLOW_FATE_ESWITCH_ACTIONS) to make sure all relevant fate actions are checked. Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function") Cc: stable@dpdk.org Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
-rw-r--r--drivers/net/mlx5/mlx5_flow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 67a3147..78cc06f 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -817,7 +817,8 @@ mlx5_flow_validate_action_drop(uint64_t action_flags,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't drop and mark in same flow");
- if (action_flags & MLX5_FLOW_FATE_ACTIONS)
+ if (action_flags & (MLX5_FLOW_FATE_ACTIONS |
+ MLX5_FLOW_FATE_ESWITCH_ACTIONS))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can't have 2 fate actions in"