mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
b081808a66
commit
708ea056b3
|
@ -1577,15 +1577,13 @@ static void cm_opa_to_ib_sgid(struct cm_work *work,
|
||||||
struct sa_path_rec *path)
|
struct sa_path_rec *path)
|
||||||
{
|
{
|
||||||
struct ib_device *dev = work->port->cm_dev->ib_device;
|
struct ib_device *dev = work->port->cm_dev->ib_device;
|
||||||
struct ib_gid_attr gid_attr;
|
|
||||||
u8 port_num = work->port->port_num;
|
u8 port_num = work->port->port_num;
|
||||||
|
|
||||||
if (rdma_cap_opa_ah(dev, port_num) &&
|
if (rdma_cap_opa_ah(dev, port_num) &&
|
||||||
(ib_is_opa_gid(&path->sgid))) {
|
(ib_is_opa_gid(&path->sgid))) {
|
||||||
union ib_gid sgid;
|
union ib_gid sgid;
|
||||||
|
|
||||||
if (ib_get_cached_gid(dev, port_num, 0,
|
if (ib_get_cached_gid(dev, port_num, 0, &sgid, NULL)) {
|
||||||
&sgid, &gid_attr)) {
|
|
||||||
dev_warn(&dev->dev,
|
dev_warn(&dev->dev,
|
||||||
"Error updating sgid in CM request\n");
|
"Error updating sgid in CM request\n");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue