@@ -1429,6 +1429,7 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev)
dev->ib_dev.free_fast_reg_page_list = mlx5_ib_free_fast_reg_page_list;
dev->ib_dev.check_mr_status = mlx5_ib_check_mr_status;
dev->ib_dev.get_port_immutable = mlx5_port_immutable;
+ dev->ib_dev.gsi_pkey_index_in_qp = 1;
mlx5_ib_internal_fill_odp_caps(dev);
@@ -2202,6 +2202,7 @@ int ipath_register_ib_device(struct ipath_devdata *dd)
dev->mmap = ipath_mmap;
dev->dma_ops = &ipath_dma_mapping_ops;
dev->get_port_immutable = ipath_port_immutable;
+ dev->gsi_pkey_index_in_qp = 1;
snprintf(dev->node_desc, sizeof(dev->node_desc),
IPATH_IDSTR " %s", init_utsname()->nodename);
@@ -1792,6 +1792,8 @@ struct ib_device {
__be64 node_guid;
u32 local_dma_lkey;
u16 is_switch:1;
+ /* The device reads the pkey_index from the QP in GSI (QP1) QPs. */
+ u16 gsi_pkey_index_in_qp:1;
u8 node_type;
u8 phys_port_cnt;
The IB specs do not require per work-request control over the P_Key used in GMPs. Most drivers have implemented this feature, but some drivers such as ipath and mlx5 do not support it. Add a capability bit, and turn it on in drivers that lack support for per-WR P_Key. Cc: Mike Marciniszyn <infinipath@intel.com> Cc: Eli Cohen <eli@mellanox.com> Signed-off-by: Haggai Eran <haggaie@mellanox.com> --- drivers/infiniband/hw/mlx5/main.c | 1 + drivers/staging/rdma/ipath/ipath_verbs.c | 1 + include/rdma/ib_verbs.h | 2 ++ 3 files changed, 4 insertions(+)