提交 e9d5bb51 编写于 作者: M Mark Bloch 提交者: Saeed Mahameed

net/mlx5: Lag, store number of ports inside lag object

Store the number of lag ports inside the lag object. Lag object is a single
shared object managing the lag state of multiple mlx5 devices on the same
physical HCA.

Downstream patches will allow hardware lag to be created over devices with
more than 2 ports.
Signed-off-by: NMark Bloch <mbloch@nvidia.com>
Reviewed-by: NMaor Gottlieb <maorg@nvidia.com>
Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
上级 bc4c2f2e
...@@ -164,6 +164,7 @@ static struct mlx5_lag *mlx5_lag_dev_alloc(struct mlx5_core_dev *dev) ...@@ -164,6 +164,7 @@ static struct mlx5_lag *mlx5_lag_dev_alloc(struct mlx5_core_dev *dev)
if (err) if (err)
mlx5_core_err(dev, "Failed to init multipath lag err=%d\n", mlx5_core_err(dev, "Failed to init multipath lag err=%d\n",
err); err);
ldev->ports = MLX5_CAP_GEN(dev, num_lag_ports);
return ldev; return ldev;
} }
......
...@@ -45,6 +45,7 @@ struct lag_tracker { ...@@ -45,6 +45,7 @@ struct lag_tracker {
*/ */
struct mlx5_lag { struct mlx5_lag {
u8 flags; u8 flags;
u8 ports;
int mode_changes_in_progress; int mode_changes_in_progress;
bool shared_fdb; bool shared_fdb;
u8 v2p_map[MLX5_MAX_PORTS]; u8 v2p_map[MLX5_MAX_PORTS];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册