diff options
author | Mark Bloch <mbloch@nvidia.com> | 2022-03-01 18:42:01 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2022-05-10 08:54:00 +0300 |
commit | 34a30d7635a8e37275a7b63bec09035ed762969b (patch) | |
tree | ead65e2f4fee0d0daea95f849b57babca89161a0 /drivers/infiniband/hw/mlx5/qp.c | |
parent | 37ca95e62ee23fa6d2c2c64e3dc40b4a0c0146dc (diff) | |
download | linux-34a30d7635a8e37275a7b63bec09035ed762969b.tar.xz |
net/mlx5: Lag, expose number of lag ports
Downstream patches will add support for hardware lag with
more than 2 ports. Add a way for users to query the number of lag ports.
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/qp.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index 3f467557d34e..fb8669c02546 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -3907,7 +3907,7 @@ static unsigned int get_tx_affinity_rr(struct mlx5_ib_dev *dev, tx_port_affinity = &dev->port[port_num].roce.tx_port_affinity; return (unsigned int)atomic_add_return(1, tx_port_affinity) % - MLX5_MAX_PORTS + 1; + (dev->lag_active ? dev->lag_ports : MLX5_CAP_GEN(dev->mdev, num_lag_ports)) + 1; } static bool qp_supports_affinity(struct mlx5_ib_qp *qp) |