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: Mark Bloch <mbloch@nvidia.com> Reviewed-by: Maor Gottlieb <maorg@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
bc4c2f2e01
commit
e9d5bb51c5
2 changed files with 2 additions and 0 deletions
|
|
@ -164,6 +164,7 @@ static struct mlx5_lag *mlx5_lag_dev_alloc(struct mlx5_core_dev *dev)
|
|||
if (err)
|
||||
mlx5_core_err(dev, "Failed to init multipath lag err=%d\n",
|
||||
err);
|
||||
ldev->ports = MLX5_CAP_GEN(dev, num_lag_ports);
|
||||
|
||||
return ldev;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ struct lag_tracker {
|
|||
*/
|
||||
struct mlx5_lag {
|
||||
u8 flags;
|
||||
u8 ports;
|
||||
int mode_changes_in_progress;
|
||||
bool shared_fdb;
|
||||
u8 v2p_map[MLX5_MAX_PORTS];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue