ksmbd: fix missing RDMA-capable flag for IPoIB device in ksmbd_rdma_capable_netdev()
authorKangjing Huang <huangkangjing@gmail.com>
Sat, 21 Oct 2023 07:42:07 +0000 (03:42 -0400)
committerSteve French <stfrench@microsoft.com>
Mon, 23 Oct 2023 00:06:27 +0000 (19:06 -0500)
commitecce70cf17d91c3dd87a0c4ea00b2d1387729701
tree608501d3454cf2f87538ef440972ac641e01681a
parent807252f028c59b9a3bac4d62ad84761548c10f11
ksmbd: fix missing RDMA-capable flag for IPoIB device in ksmbd_rdma_capable_netdev()

Physical ib_device does not have an underlying net_device, thus its
association with IPoIB net_device cannot be retrieved via
ops.get_netdev() or ib_device_get_by_netdev(). ksmbd reads physical
ib_device port GUID from the lower 16 bytes of the hardware addresses on
IPoIB net_device and match its underlying ib_device using ib_find_gid()

Signed-off-by: Kangjing Huang <huangkangjing@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Reviewed-by: Tom Talpey <tom@talpey.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/transport_rdma.c