MS-SMBD and RDMA/Infiniband ...

Richard Sharpe realrichardsharpe at
Tue Feb 28 20:50:29 MST 2012

2012/2/28 Stefan (metze) Metzmacher <metze at>:
> Hi Richard,
>> I recently acquired some 10Gbps Infiniband cards and am looking at
>> getting a switch as I have acquired some Infiniband/RDMA coding
>> experience.
>> I am interested in implementing MS-SMBD, the Direct Placement variant
>> of SMB2.2, for Samba.
> First try to setup two Windows8 beta (when it's available within the
> next days)
> with RDMA support. (Please document the steps in our wiki)
> Then find a way to capture traffic between the windows hosts.
> Then we need an implementation of SMB-Direct, I guess we need to
> define an transport abstraction.
> struct smb_transport;
> uint32_t smb_transport_max_pdu_size(struct smb_transport *transport);
> bool smb_transport_is_connected(struct smb_transport *transport);
> struct tevent_req *smb_transport_write_pdu_send(TALLOC_CTX *mem_ctx,
>                                                                                         struct tevent_context *ev,
>                                                                                         struct smb_transport *transport,
>                                                                                         int num_iov,
>                                                                                         struct iovec *iov);
> NTSTATUS smb_transport_write_pdu_recv(struct tevent_req *req);
> struct tevent_req *smb_transport_read_pdu_send(TALLOC_CTX *mem_ctx,
>                                                                                         struct tevent_context *ev,
>                                                                                         struct smb_transport *transport);
> NTSTATUS smb_transport_read_pdu_recv(struct tevent_req *req,
>                                                                         TALLOC_CTX *mem_ctx,
>                                                                         struct iovec *iov);
> And then specific constructors like:
> struct tevent_req *smb_transport_rdma_connect_send(TALLOC_CTX *mem_ctx,
>                                                                                                 struct tevent_context *ev,
>                                                                                                 ....
>                                                                                                 src and dest addresses);
> NTSTATUS smb_transport_rdma_connect_recv(struct tevent_req *req,
>                                                                                 TALLOC_CTX *mem_ctx,
>                                                                                 struct smb_transport **transport);
> something similar for TCP (port 445) and NBSS over TCP (port 139).
> We need the client side first....
> You may want to look at the ctdb code for some event based rdma programming.

I understand event-based RDMA code, but thank you for all the other stuff.

> Also note that there's software bases iwarp support on linux,
> so it would be cool to find out how to configure windows to do rdma over
> iwrap,
> then we may only need to buy hardware for the windows test machines.
> See
> You can test with
> Server: rping -s -vVd -a -p 5555
> Client: rping -c -vVd -a -p 5555
>> What is the status of the SMB 2.2 implementation? Will I have to
>> implement enough of that first?
> I think the core SMB-Direct can be implement without any SMB2 reference.

I thought that at first, but then I saw this in the recent update to
the SMB2 spec:

ReadChannelInfoOffset (2 bytes): For the SMB 2.002 and 2.1 dialects,
this field MUST NOT
be used and MUST be reserved. The client MUST set this field to 0, and
the server MUST
ignore it on receipt. For the SMB 2.2 dialect, it contains the offset,
in bytes, from the
beginning of the SMB2 header to the channel data as specified by the
Channel field of the

Richard Sharpe

More information about the samba-technical mailing list