From: Namjae Jeon Date: Mon, 27 Oct 2025 06:46:39 +0000 (+0900) Subject: ksmbd: detect RDMA capable netdevs include IPoIB X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6187655acfa2dd566ea2aed4522083f0bb940c3;p=thirdparty%2Flinux.git ksmbd: detect RDMA capable netdevs include IPoIB Current ksmbd_rdma_capable_netdev fails to mark certain RDMA-capable inerfaces such as IPoIB as RDMA capable after reverting GUID matching code due to layer violation. This patch check the ARPHRD_INFINIBAND type safely identifies an IPoIB interface without introducing a layer violation, ensuring RDMA functionality is correctly enabled for these interfaces. Signed-off-by: Namjae Jeon Signed-off-by: Steve French --- diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c index 4a8aeb1df0cc..5d3b48e77012 100644 --- a/fs/smb/server/transport_rdma.c +++ b/fs/smb/server/transport_rdma.c @@ -2663,6 +2663,10 @@ bool ksmbd_rdma_capable_netdev(struct net_device *netdev) if (ksmbd_find_rdma_capable_netdev(lower_dev)) return true; + /* check if netdev is IPoIB safely without layer violation */ + if (netdev->type == ARPHRD_INFINIBAND) + return true; + return false; }