]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_acl: Add cleanup after C-TCAM update error condition
authorNir Dotan <nird@mellanox.com>
Tue, 8 Jan 2019 16:48:03 +0000 (16:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jan 2019 21:53:53 +0000 (16:53 -0500)
commitda904bc02e96e0ae4691dc11c6671626a5fb69ff
tree859ca559b043f9db60f3def594cdaafe9966f05e
parent6c259d038cf9a84d8ed3578cd9833cec11f68e3c
mlxsw: spectrum_acl: Add cleanup after C-TCAM update error condition

When writing to C-TCAM, mlxsw driver uses cregion->ops->entry_insert().
In case of C-TCAM HW insertion error, the opposite action should take
place.
Add error handling case in which the C-TCAM region entry is removed, by
calling cregion->ops->entry_remove().

Fixes: 8051a96b8c39 ("mlxsw: spectrum_acl: Start using A-TCAM")
Signed-off-by: Nir Dotan <nird@mellanox.com>
Reviewed-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_ctcam.c