RDMA/mlx5: Support TX port affinity for VF drivers in LAG mode
authorMark Zhang <markz@mellanox.com>
Wed, 27 May 2020 05:50:14 +0000 (08:50 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 29 May 2020 18:15:30 +0000 (15:15 -0300)
commit802dcc7fc5ec0932bea0f33db046cc744aecf233
tree9972fc640ba39600eae02ec865cfbb38c735ef46
parente0cca8b456e2319804c9187f237268b14c50d323
RDMA/mlx5: Support TX port affinity for VF drivers in LAG mode

The mlx5 VF driver doesn't set QP tx port affinity because it doesn't know
if the lag is active or not, since the "lag_active" works only for PF
interfaces. In this case for VF interfaces only one lag is used which
brings performance issue.

Add a lag_tx_port_affinity CAP bit; When it is enabled and
"num_lag_ports > 1", then driver always set QP tx affinity, regardless
of lag state.

Link: https://lore.kernel.org/r/20200527055014.355093-1-leon@kernel.org
Signed-off-by: Mark Zhang <markz@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/qp.c