OSDN Git Service

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)
commitef74422020aa8c224b00a927e3e47faac4d8fae3
treea8701de675aa99c7bfa9c6561b491eba1c4516ea
parent84b3fd1fc9592d431e23b077e692fa4e3fd0f086
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: c22291f7cf45 ("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