net/mlx5: Fix mlx5_cmd_update_root_ft() error flow
The cited patch change mlx5_cmd_update_root_ft() to work with multiple
peer devices. However, it didn't align the error flow as well.
Hence, Fix the error code to work with multiple peer devices.
Fixes: 222dd18583
("{net/RDMA}/mlx5: introduce lag_for_each_peer")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
Родитель
34a79876d9
Коммит
0fd23db0cc
|
@ -245,12 +245,20 @@ static int mlx5_cmd_update_root_ft(struct mlx5_flow_root_namespace *ns,
|
|||
mlx5_lag_is_shared_fdb(dev) &&
|
||||
mlx5_lag_is_master(dev)) {
|
||||
struct mlx5_core_dev *peer_dev;
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
mlx5_lag_for_each_peer_mdev(dev, peer_dev, i) {
|
||||
err = mlx5_cmd_set_slave_root_fdb(dev, peer_dev, !disconnect,
|
||||
(!disconnect) ? ft->id : 0);
|
||||
if (err && !disconnect) {
|
||||
mlx5_lag_for_each_peer_mdev(dev, peer_dev, j) {
|
||||
if (j < i)
|
||||
mlx5_cmd_set_slave_root_fdb(dev, peer_dev, 1,
|
||||
ns->root_ft->id);
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
MLX5_SET(set_flow_table_root_in, in, op_mod, 0);
|
||||
MLX5_SET(set_flow_table_root_in, in, table_id,
|
||||
ns->root_ft->id);
|
||||
|
|
Загрузка…
Ссылка в новой задаче