diff mbox series

[net-next,mlxsw,1/2] mlxsw: core_acl_flex_actions: Avoid WARN_ON for conflicting actions

Message ID 20180725083744.994-2-nird@mellanox.com (mailing list archive)
State Changes Requested
Delegated to: Jiří Pírko
Headers show
Series mlxsw: Fix ACL actions error condition handling | expand

Commit Message

Nir Dotan July 25, 2018, 8:37 a.m. UTC
Stop the driver from marking actions which terminate a packet flow
such as trap, discard and pass in order not to accept a following
terminating action. This was found out to be unnecessary as SW
model allows setting several terminating actions so that some
of the actions configured will never be executed.
Furthermore, this kind of configuration generated a warning as the
driver was using the same marking for end of action block, so it
would not expect to see it before the end of an action block.

Signed-off-by: Nir Dotan <nird@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c | 9 ---------
 1 file changed, 9 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
index a4669e7..9c87363 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
@@ -458,33 +458,24 @@  EXPORT_SYMBOL(mlxsw_afa_block_activity_get);
 
 int mlxsw_afa_block_continue(struct mlxsw_afa_block *block)
 {
-	if (block->finished)
-		return -EINVAL;
 	mlxsw_afa_set_goto_set(block->cur_set,
 			       MLXSW_AFA_SET_GOTO_BINDING_CMD_NONE, 0);
-	block->finished = true;
 	return 0;
 }
 EXPORT_SYMBOL(mlxsw_afa_block_continue);
 
 int mlxsw_afa_block_jump(struct mlxsw_afa_block *block, u16 group_id)
 {
-	if (block->finished)
-		return -EINVAL;
 	mlxsw_afa_set_goto_set(block->cur_set,
 			       MLXSW_AFA_SET_GOTO_BINDING_CMD_JUMP, group_id);
-	block->finished = true;
 	return 0;
 }
 EXPORT_SYMBOL(mlxsw_afa_block_jump);
 
 int mlxsw_afa_block_terminate(struct mlxsw_afa_block *block)
 {
-	if (block->finished)
-		return -EINVAL;
 	mlxsw_afa_set_goto_set(block->cur_set,
 			       MLXSW_AFA_SET_GOTO_BINDING_CMD_TERM, 0);
-	block->finished = true;
 	return 0;
 }
 EXPORT_SYMBOL(mlxsw_afa_block_terminate);