net/mlx5: Enable QP number request when creating IPoIB underlay QP
authorMichael Guralnik <michaelgur@mellanox.com>
Wed, 20 May 2020 10:59:06 +0000 (13:59 +0300)
committerLeon Romanovsky <leonro@mellanox.com>
Fri, 3 Jul 2020 15:38:01 +0000 (18:38 +0300)
commit4dca650991e4175b8d5bae7ff6f1637a0c42be4a
tree29519ee8795eb8abeef51a04bd89cfe8b43367d9
parent2d1b69ed65ee033aa541518cc9f6a815296ac493
net/mlx5: Enable QP number request when creating IPoIB underlay QP

If in the process of creating the underlay QP for an IPoIB interface
the user has set the address and specifically the 1st-3rd bytes
representing the QP number, use the requested QP number when creating
the underlay QP.

For a user to be able to request a QP number on QP creation, the MKEY_BY_NAME
NVCONFIG should be set. As mkey_by_name and qp_by_name are coupled in FW.
This requires driver to query the mkey_by_name max cap during initialization
and set the current cap if it was enabled in FW.

Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/mlx5_ifc.h