Commit 448d15aa authored by Chuck Lever's avatar Chuck Lever Committed by Jason Gunthorpe

RDMA/core: Set gid_attr.ndev for iWARP devices

Have the iwarp side properly set the ndev in the device's sgid_attrs
so that address resolution can treat it more like a RoCE device.

Link: https://lore.kernel.org/r/168960673933.3007.8043081822081877578.stgit@manet.1015granger.netSuggested-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Reviewed-by: default avatarTom Talpey <tom@talpey.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent bad5b6e3
......@@ -1457,6 +1457,17 @@ static int config_non_roce_gid_cache(struct ib_device *device,
i);
goto err;
}
if (rdma_protocol_iwarp(device, port)) {
struct net_device *ndev;
ndev = ib_device_get_netdev(device, port);
if (!ndev)
continue;
RCU_INIT_POINTER(gid_attr.ndev, ndev);
dev_put(ndev);
}
gid_attr.index = i;
tprops->subnet_prefix =
be64_to_cpu(gid_attr.gid.global.subnet_prefix);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment