]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Lag, correct get the port select mode str
authorLiu, Changcheng <jerrliu@nvidia.com>
Fri, 27 May 2022 08:49:14 +0000 (16:49 +0800)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 6 Jul 2022 23:11:55 +0000 (16:11 -0700)
commitc714b09f8ffc0e5da3d52268f791f91ab81de385
treef17d4e754e3520b403cd9d210f35dee1a781a9ac
parentcf6577ba3440e9281b2b3dfde2800f5d0298ef6d
net/mlx5: Lag, correct get the port select mode str

mode & mode_flags is updated at the end of mlx5_activate_lag which
may not reflect the actual mode as shown in below logic:
    mlx5_activate_lag(struct mlx5_lag *ldev,
    |-- unsigned long flags = 0;
    |-- err = mlx5_lag_set_flags(ldev, mode, tracker, shared_fdb, &flags);
    |-- err = mlx5_create_lag(ldev, tracker, mode, flags);
              |-- mlx5_get_str_port_sel_mode(ldev);
    |-- ldev->mode = mode;
    |-- ldev->mode_flags = flags;
Use mode & flag as parameters to get port select mode info.

Fixes: 94d7020b1395 ("net/mlx5: Support multiport eswitch mode")
Signed-off-by: Liu, Changcheng <jerrliu@nvidia.com>
Reviewed-by: Eli Cohen <elic@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/lag/debugfs.c
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h