ksmbd: set RDMA capability for FSCTL_QUERY_NETWORK_INTERFACE_INFO
set RDMA capability for
FSCTL_QUERY_NETWORK_INTERFACE_INFO.
Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
index ee91d99..c1a59459 100644
--- a/fs/ksmbd/smb2pdu.c
+++ b/fs/ksmbd/smb2pdu.c
@@ -22,6 +22,7 @@
#include "asn1.h"
#include "connection.h"
#include "transport_ipc.h"
+#include "transport_rdma.h"
#include "vfs.h"
#include "vfs_cache.h"
#include "misc.h"
@@ -7028,11 +7029,11 @@ static int fsctl_query_iface_info_ioctl(struct ksmbd_conn *conn,
&rsp->Buffer[nbytes];
nii_rsp->IfIndex = cpu_to_le32(netdev->ifindex);
- /* TODO: specify the RDMA capabilities */
+ nii_rsp->Capability = 0;
if (netdev->num_tx_queues > 1)
- nii_rsp->Capability = cpu_to_le32(RSS_CAPABLE);
- else
- nii_rsp->Capability = 0;
+ nii_rsp->Capability |= cpu_to_le32(RSS_CAPABLE);
+ if (ksmbd_rdma_capable_netdev(netdev))
+ nii_rsp->Capability |= cpu_to_le32(RDMA_CAPABLE);
nii_rsp->Next = cpu_to_le32(152);
nii_rsp->Reserved = 0;