Commit 6ca219e7 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

mlxsw: spectrum_acl: Don't migrate already migrated entry

Check if the entry is already in a chunk where we want it to be. In that
case, skip migration. This is preparation for "per parts" migration
where this situation may occur.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f9b274ce
...@@ -1174,6 +1174,10 @@ mlxsw_sp_acl_tcam_ventry_migrate(struct mlxsw_sp *mlxsw_sp, ...@@ -1174,6 +1174,10 @@ mlxsw_sp_acl_tcam_ventry_migrate(struct mlxsw_sp *mlxsw_sp,
{ {
struct mlxsw_sp_acl_tcam_entry *entry2; struct mlxsw_sp_acl_tcam_entry *entry2;
/* First check if the entry is not already where we want it to be. */
if (ventry->entry->chunk == chunk2)
return 0;
entry2 = mlxsw_sp_acl_tcam_entry_create(mlxsw_sp, ventry, chunk2); entry2 = mlxsw_sp_acl_tcam_entry_create(mlxsw_sp, ventry, chunk2);
if (IS_ERR(entry2)) if (IS_ERR(entry2))
return PTR_ERR(entry2); return PTR_ERR(entry2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment