mbox series

[net-next,mlxsw,0/2] mlxsw: Fix ACL actions error condition handling

Message ID 20180725083744.994-1-nird@mellanox.com (mailing list archive)
Headers show
Series mlxsw: Fix ACL actions error condition handling | expand

Message

Nir Dotan July 25, 2018, 8:37 a.m. UTC
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(-)