Work in progress SMB-Direct driver for the linux kernel

Stefan Metzmacher metze at
Thu Feb 1 08:18:10 UTC 2018

Hi David,

you were asking about my work in progress of the SMB-Direct driver for
the linux kernel.

I dumped what I have to git://
into the smbdirect-work-in-progress branch.


From the README:

This is a work in progress SMB-Direct driver for the linux kernel

It's just a raw dump of what I currently have to get some help
with debugging kernel freezes. A lot of cleanups are required
and real commits with useful commit messages...

The protocol is specified by Microsoft in
[MS-SMBD] SMB2 Remote Direct Memory Access (RDMA) Transport Protocol

The aim is to later reuse parts of this for other operating systems
like FreeBSD.

The first goal is to provide a socket fd to userspace (or in kernel
which provides semantics like a TCP socket which is used as transport
for SMB3. Basically frames are submitted with a 4 byte length header.

The second goal will be to provide RDMA read and write support
via ioctl() calls on the main smb-direct socket fd, but the
api for that is not yet designed. But it needs to
avoid data copy as much as possible.,, offer some examples
to setup the rdma stack before using 'insmod smbdirect.ko'.

The userspace 'smbdirect-tool' offers some commands for testing.

  "connect <dstaddr> [<dstport> [<srcaddr> [<srcport>]]]"

  " 5445"
  " 5445"
  "fd3a:aaa3:ee87:ff09:f189:7430:7976:6276 5445"

  "listen [<port> [<addr>]]"

  "445 fd3a:aaa3:ee87:ff09:f189:7430:7976:6276"

The current state is the following:
- It compiles with v4.{10,11,12,13,14,15}
- The kernel freezes after some time
  on an active connection, e.g. when readv() is called
- Also rmmod smbdirect causes a freeze after some time

As you gave a talk about debugging the linux kernel
you might be able to find the reasons for the (silent) freezes.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the samba-technical mailing list