Closed cyfdecyf closed 1 year ago
As I know, Windows pro version doesn't support smb-direct. So I could not work with windows 10 pro version before. Only windows workstation or enterprise(or server) support it ?
@namjaejeon Thanks for your reply!
I guess I maybe mis-guided by this Microsoft document
At least two computers running one or more of the following operating systems:
- Windows Server 2012 and later.
- Windows 10 Enterprise and later.
- Windows 10 Education and later.
- Windows 10 Pro and later.
Note
Windows 10 and Windows 11 family are restricted to client-only and can't act as an SMB Direct server.
There's indeed SMB direct option when installing optional features in Windows 11 Pro, so I think it should work as the document also says this. I'll try to use a different version of Windows to try enable RMDA to ksmbd server.
I think that this seems to be old document. They remove high performance and new features like SMB Direct and refs filesystem in windows 10 pro. And Add them to new windows 10 pro S version. I am not sure I don't have tested all windows versions. Let me know if it doesn't still work on windows higher version.
Just tested with Windows 11 Pro workstation connecting to ksmbd server. It works.
Get-SmbMultichannelConnection
shows Client RDMA Capable
True
ksmbd: smb_direct: RDMA read, len 0x100000, needed credits 0x2
ksmbd: smb_direct: Send completed. status='success (0)', opcode=0
ksmbd: smb_direct: Recv completed. status='success (0)', opcode=128
ksmbd: smb_direct: Recv completed. status='success (0)', opcode=128
ksmbd: smb_direct: returning rfc1002 length 144
ksmbd: smb_direct: Recv completed. status='success (0)', opcode=128
ksmbd: smb_direct: returning rfc1002 length 144
Thanks for your help @namjaejeon. I'm closing this issue as it's solved.
@cyfdecyf Okay, Sound great! Thanks for your test:)
I noticed that while Client RDMA Capable
is True
, Client RSS Capable
becomes False
.
After using Disable-NetAdapterRmda
to disable RDMA on all interfaces on windows, then Client RSS Capable
becomes True
.
Is this expected behavior?
Yes, It's the same when I tested it. Please check whether RSS and RDMA can work together.
Please give me some help to make RDMA work between Windows 11 Pro client and ksmbd sever. I've tried using wireshark, compile and modify ksmbd souce code for dignosing for some days, but still can't figure out what's wrong.
Test setup:
nd_rping.exe
on Windows andrping
from Linux confirms that RDMA is working.ksmbd's config has multi-channel enabled, relevent configs will be included at the end.
After Windows accessing a share on ksmbd sever, run following commands on windows:
Multi-channel works, but RDMA is not used for SMB conection. Copying a 10GB file to server will trigger high CPU usage.
Here's a packet capture smb.pcap.gz and kernel log ksmbd.log.gz during windows making connection and accessing a shared folder.
Kernel log shows
ksmbd: smb_direct: init RDMA listener
, so the ksmbd kernel module hasSMB_SERVER_SMBDIRECT
enabled.Client SMB negotiate request contains
SMB2_RDMA_TRANSFORM_CAPABILITIES
context, which is not sent if I connected with a non-RDMA capable NIC.ksmbd server's response does not have
SMB2_RDMA_TRANSFORM_CAPABILITIES
, but the SMB doc mentions the processing of this context and corresponding response:So I tried to modify ksmbd souce code and include
SMB2_RDMA_TRANSFORM_CAPABILITIES
in response. But this still dose not make windows to use RDMA for SMB connection. (If I saw #435 ealier, I would guess this is not necessary to make Windows client use RDMA.)Finally, here's the excerpt of ksmbd.conf: