diff options
author | Parav Pandit <parav@mellanox.com> | 2018-06-13 10:22:09 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-06-18 11:11:27 -0600 |
commit | 89af969a665390dc6b156fef55755ca546cd8d92 (patch) | |
tree | 4c9dc54d44b0a091ed972ba1f2c20ad12dc48a4d /drivers/infiniband/hw/mlx4/qp.c | |
parent | 1a1f460ff151710289c2f8d4badd8b603b87d610 (diff) | |
download | op-kernel-dev-89af969a665390dc6b156fef55755ca546cd8d92.zip op-kernel-dev-89af969a665390dc6b156fef55755ca546cd8d92.tar.gz |
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 'drivers/infiniband/hw/mlx4/qp.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index f800e80..e576ca3 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, |