]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_acl: Avoid warning after identical rules insertion
authorJiri Pirko <jiri@mellanox.com>
Wed, 29 May 2019 07:59:44 +0000 (10:59 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 May 2019 19:30:47 +0000 (12:30 -0700)
commit17545f0ca585c178932bd947ef68a4d6e9c4f75c
treea8701de675aa99c7bfa9c6561b491eba1c4516ea
parentaca4d74f8fcb5a35b81dfe369d26ed88b41ff317
mlxsw: spectrum_acl: Avoid warning after identical rules insertion

When identical rules are inserted, the latter one goes to C-TCAM. For
that, a second eRP with the same mask is created. These 2 eRPs by the
nature cannot be merged and also one cannot be parent of another.
Teach mlxsw_sp_acl_erp_delta_fill() about this possibility and handle it
gracefully.

Reported-by: Alex Kushnarov <alexanderk@mellanox.com>
Fixes: 33587f9df7b3 ("mlxsw: spectrum: acl: Implement delta for ERP")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c