aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/qp.c
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-06-13 10:22:09 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-06-18 11:11:27 -0600
commit89af969a665390dc6b156fef55755ca546cd8d92 (patch)
tree4c9dc54d44b0a091ed972ba1f2c20ad12dc48a4d /drivers/infiniband/hw/mlx4/qp.c
parentRDMA: Hold the sgid_attr inside the struct ib_ah/qp (diff)
downloadlinux-dev-89af969a665390dc6b156fef55755ca546cd8d92.tar.xz
linux-dev-89af969a665390dc6b156fef55755ca546cd8d92.zip
RDMA: Convert drivers to use the AH's sgid_attr in post_wr paths
For UD the drivers were doing a sgid_index lookup into the cache to get the attrs, however we can now directly access the same attrs stores in the ib_ah instead and remove the lookup. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index f800e8024859..e576ca385d8e 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -3169,12 +3169,8 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_ud_wr *wr,
to_mdev(ib_dev)->sriov.demux[sqp->qp.port - 1].
guid_cache[ah->av.ib.gid_index];
} else {
- err = rdma_query_gid(ib_dev,
- be32_to_cpu(ah->av.ib.port_pd) >> 24,
- ah->av.ib.gid_index,
- &sqp->ud_header.grh.source_gid);
- if (err)
- return err;
+ sqp->ud_header.grh.source_gid =
+ ah->ibah.sgid_attr->gid;
}
}
memcpy(sqp->ud_header.grh.destination_gid.raw,