Work in progress SMB-Direct driver for the linux kernel

Stefan Metzmacher metze at samba.org
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://git.samba.org/metze/linux/smbdirect.git
into the smbdirect-work-in-progress branch.

See
https://git.samba.org/?p=metze/linux/smbdirect.git;a=shortlog;h=refs/heads/smbdirect-work-in-progress

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
consumers)
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.

loadchelsio.sh, loadrxe.sh, loadsiw.sh 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>]]]"

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

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

  "5445"
  "5445 172.31.9.166"
  "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.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180201/cc398921/signature.sig>


More information about the samba-technical mailing list