diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-09-02 22:23:04 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-09-03 21:50:06 +0300 |
commit | b636401f0ec9bbf7931774e00f3adf7ee9214cce (patch) | |
tree | 06050c24138d3d58f86eec78a4f807be1bd2a20f /drivers/infiniband/hw/mlx5/mlx5_ib.h | |
parent | 11d748045c6dadb279d1acdb6d2ea8f3f2ede85b (diff) | |
download | linux-b636401f0ec9bbf7931774e00f3adf7ee9214cce.tar.xz |
mlx5: Fix incorrect wc pkey_index assignment for GSI messages
Since patch series "Demux IB CM requests in the rdma_cm module" the
P_Key index is taken from the work completion rather than the message
itself.
The HCA provides us with the message P_Key. In order to provide the
P_Key index, we need to look it up. Given that this is relevant only
for GSI messages (session establishments) which is less performance critical,
micro-optimize against the GSI (is_qp1) branch.
Fixes: 4c21b5bcef73 ("IB/cma: Add net_dev and private data checks to
RDMA CM")
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/mlx5_ib.h')
-rw-r--r-- | drivers/infiniband/hw/mlx5/mlx5_ib.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index a5fa0b9c7580..bb8cda79e881 100644 --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h @@ -680,6 +680,11 @@ static inline u8 convert_access(int acc) MLX5_PERM_LOCAL_READ; } +static inline int is_qp1(enum ib_qp_type qp_type) +{ + return qp_type == IB_QPT_GSI; +} + #define MLX5_MAX_UMR_SHIFT 16 #define MLX5_MAX_UMR_PAGES (1 << MLX5_MAX_UMR_SHIFT) |