diff options
author | Parav Pandit <parav@mellanox.com> | 2018-01-28 04:25:31 -0500 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-01-28 16:07:16 -0500 |
commit | 708ea056b30de17e38f2842c8e953df04b3e8b31 (patch) | |
tree | 1c8f8c198c4805040ea70162e2d4b04832aff53d | |
parent | b081808a66345ba725b77ecd8d759bee874cd937 (diff) |
IB/core: Avoid SGID attributes query while converting GID from OPA to IB
SGID attributes are not used during OPA to IB GID conversion.
Therefore don't query it.
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r-- | drivers/infiniband/core/cm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index b8f8d3128a53..68df93558d80 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c | |||
@@ -1577,15 +1577,13 @@ static void cm_opa_to_ib_sgid(struct cm_work *work, | |||
1577 | struct sa_path_rec *path) | 1577 | struct sa_path_rec *path) |
1578 | { | 1578 | { |
1579 | struct ib_device *dev = work->port->cm_dev->ib_device; | 1579 | struct ib_device *dev = work->port->cm_dev->ib_device; |
1580 | struct ib_gid_attr gid_attr; | ||
1581 | u8 port_num = work->port->port_num; | 1580 | u8 port_num = work->port->port_num; |
1582 | 1581 | ||
1583 | if (rdma_cap_opa_ah(dev, port_num) && | 1582 | if (rdma_cap_opa_ah(dev, port_num) && |
1584 | (ib_is_opa_gid(&path->sgid))) { | 1583 | (ib_is_opa_gid(&path->sgid))) { |
1585 | union ib_gid sgid; | 1584 | union ib_gid sgid; |
1586 | 1585 | ||
1587 | if (ib_get_cached_gid(dev, port_num, 0, | 1586 | if (ib_get_cached_gid(dev, port_num, 0, &sgid, NULL)) { |
1588 | &sgid, &gid_attr)) { | ||
1589 | dev_warn(&dev->dev, | 1587 | dev_warn(&dev->dev, |
1590 | "Error updating sgid in CM request\n"); | 1588 | "Error updating sgid in CM request\n"); |
1591 | return; | 1589 | return; |