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.
Unified · Split
| @@ -2663,6 +2663,10 @@ bool ksmbd_rdma_capable_netdev(struct net_device *netdev) · 2662 unmodified lines | ||
| 2663 | 2663 | if (ksmbd_find_rdma_capable_netdev(lower_dev)) |
| 2664 | 2664 | return true; |
| 2665 | 2665 | |
| 2666 | + /* check if netdev is IPoIB safely without layer violation */ | |
| 2667 | + if (netdev->type == ARPHRD_INFINIBAND) | |
| 2668 | + return true; | |
| 2669 | + | |
| 2666 | 2670 | return false; |
| 2667 | 2671 | } |
| 2668 | 2672 | |