[PATCH net-next mlxsw 0/2] mlxsw: Fix ACL actions error condition handling
nird at mellanox.com
Wed Jul 25 18:37:42 AEST 2018
Two issues were lately noticed within mlxsw ACL actions error condition
handling. The first patch deals with conflicting actions such as :
- tc filter add dev swp49 parent ffff: protocol ip pref 10 flower skip_sw dst_ip 192.168.101.1 action goto chain 100 action mirred egress mirror dev swp4i
The second action will never execute, however SW model allows this configuration,
while the mlxsw driver marked terminating actions and tried to disallow it.
The marking led to an undesired warning as the same marking was used to notice
the end of an action block, so the elegant solution would be to remove the
marking and behave like the SW model does.
The second patch fixes a duplicate destruction of resources. Some actions
require allocation of specific resource prior to setting the action. On
error condition this resource was destroyed twice, leading to a crash for
mirror action, and a redundant destruction in other cases, as for error
condition the rule destruction also takes care of resource destruction.
Nir Dotan (2):
mlxsw: core_acl_flex_actions: Avoid WARN_ON for conflicting actions
mlxsw: core_acl_flex_actions: Remove redundant resource destruction
.../mellanox/mlxsw/core_acl_flex_actions.c | 29 +++-------------------
1 file changed, 3 insertions(+), 26 deletions(-)
More information about the Linux-mlxsw