From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>,
Stefan Metzmacher <metze-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Cc: "David Disseldorp"
<ddiss-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
"Samba Technical"
<samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org>,
"linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Tom Talpey" <ttalpey-0li6OtcxBFHby3iVrkZq2A@public.gmane.org>,
"Long Li" <longli-0li6OtcxBFHby3iVrkZq2A@public.gmane.org>,
"Steve French" <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Ralph Böhme" <slow-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Subject: Re: Work in progress SMB-Direct driver for the linux kernel
Date: Sun, 04 Feb 2018 11:39:13 -0500 [thread overview]
Message-ID: <1517762353.3936.41.camel@redhat.com> (raw)
In-Reply-To: <20180201175247.GT17053-uk2M96/98Pc@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3012 bytes --]
On Thu, 2018-02-01 at 10:52 -0700, Jason Gunthorpe wrote:
> On Thu, Feb 01, 2018 at 09:18:10AM +0100, Stefan Metzmacher wrote:
>
> > 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.
>
> Part of the point of RDMA is that we don't need to make protocol
> specific kernel modules like this - is there a specific reason this
> needs to be in the kernel like this?
Although your question was partially answered, I think the precise cause
is that to behave like an SMB3 server, the model involves opening a TCP
connection, doing auth over that, then negotiating whether or not RDMA
connections are possible, then opening the RDMA connections. On our
end, once the auth happens, smbd forks and the new user process handles
the connection from that point on (which is integral to smbd's security
model). Because of this, and because the client initiates the RDMA
connection and will only use a single well known port to connect to,
incoming RDMA connections after negotiation would always go to the
master smbd process and not the forked client authed smbd process.
Because we don't have a way of then handing the RDMA connection from one
process to another forked process, the model breaks down. Possible
solutions are:
1) Don't make the master process listen on the well known RDMA port.
Let each client register to listen on the port only after the
negotiation has completed, listen until it finds the proper client
connection, then stop listening on the port. This obviously makes
multiple client connections race for which server is listening. I have
no idea if the Microsoft client would even retry a connection if it went
to the wrong process the first time and was rejected.
2) Create a new listen model where a process could register to listen on
a specific port + remote IP address(es). That way all connection
attempts from the specific remote IP address(es) and the local port
would go to the specific process. This could be contained within the
CMA and need not impact normal sockets processes. I would envision that
the smbd would get the negotiation packet from the client with a list of
the RDMA devices it can connect across, would work out which of those
devices it could accept connections from, would initiate all necessary
listens, and finally would send the reply packet to the client.
3) Make a kernel module as they are doing to handle the incoming
connections and multiplex between processes.
4) Make smbd threaded so that it can listen on the well known port and
then hand a connection off to a specific thread once established.
I'm partial to either 2 or 4 myself.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-02-04 16:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 8:18 Work in progress SMB-Direct driver for the linux kernel Stefan Metzmacher
[not found] ` <959c3608-c508-17c4-bad6-fd9421a4a235-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
2018-02-01 12:12 ` David Disseldorp
2018-02-01 17:52 ` Jason Gunthorpe
[not found] ` <20180201175247.GT17053-uk2M96/98Pc@public.gmane.org>
2018-02-02 3:00 ` Richard Sharpe
[not found] ` <CACyXjPyKcLktNqEdBbicSd=3GU7R9BeE-=Dcc2DyCh2sH9wxMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-02 9:25 ` Stefan Metzmacher
[not found] ` <2f684247-04ec-1c0f-8153-9b6f8d45f265-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
2018-02-02 14:52 ` Tom Talpey
2018-02-04 16:39 ` Doug Ledford [this message]
[not found] ` <1517762353.3936.41.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-02-05 1:32 ` Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1517762353.3936.41.camel@redhat.com \
--to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=ddiss-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
--cc=jgg-uk2M96/98Pc@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=longli-0li6OtcxBFHby3iVrkZq2A@public.gmane.org \
--cc=metze-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
--cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
--cc=slow-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
--cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ttalpey-0li6OtcxBFHby3iVrkZq2A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox