Skip to content

Commit

Permalink
mlxsw: spectrum_acl: Move rehash_dis trace call and err msg to vregio…
Browse files Browse the repository at this point in the history
…n_migrate()

Move the call of rehash_dis trace and the error message to
vregion_migrate() next to the failed_rollback flag set.

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>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Mar 31, 2019
1 parent 44fd86c commit f3d4ef1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -1394,8 +1394,12 @@ mlxsw_sp_acl_tcam_vregion_migrate(struct mlxsw_sp *mlxsw_sp,
ctx->this_is_rollback = true;
err2 = mlxsw_sp_acl_tcam_vchunk_migrate_all(mlxsw_sp, vregion,
ctx, credits);
if (err2)
if (err2) {
vregion->failed_rollback = true;
trace_mlxsw_sp_acl_tcam_vregion_rehash_dis(mlxsw_sp,
vregion);
dev_err(mlxsw_sp->bus_info->dev, "Failed to rollback during vregion migration fail\n");
}
}
mutex_unlock(&vregion->lock);
trace_mlxsw_sp_acl_tcam_vregion_migrate_end(mlxsw_sp, vregion);
Expand Down Expand Up @@ -1503,11 +1507,6 @@ mlxsw_sp_acl_tcam_vregion_rehash(struct mlxsw_sp *mlxsw_sp,
ctx, credits);
if (err) {
dev_err(mlxsw_sp->bus_info->dev, "Failed to migrate vregion\n");
if (vregion->failed_rollback) {
trace_mlxsw_sp_acl_tcam_vregion_rehash_dis(mlxsw_sp,
vregion);
dev_err(mlxsw_sp->bus_info->dev, "Failed to rollback during vregion migration fail\n");
}
}

if (*credits >= 0)
Expand Down

0 comments on commit f3d4ef1

Please sign in to comment.