From: "Stefan (metze) Metzmacher" <metze-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
To: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Cc: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Is there a way to transfer a rdma connection between userspace processes?
Date: Tue, 16 Oct 2012 18:46:34 +0200 [thread overview]
Message-ID: <507D8F6A.5090008@samba.org> (raw)
In-Reply-To: <507D6E3C.2050405-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2881 bytes --]
Am 16.10.2012 16:25, schrieb Stefan (metze) Metzmacher:
> @Yann and Steve: thanks for the feedback!
>
>>>> I'm currently researching how to implement SMBDirect [MS-SMBD]
>>>> together with the multi channel feature of SMB 3.0 in Samba.
>>>>
>>>> As Samba currently uses one process per tcp connection
>>>> and maintains a lot of in memory state within the process
>>>> (e.g. for the SMB_VFS modules) it would require a lot of work
>>>> to change Samba to coordinate two (or more) processes for one logical
>>>> multi channel connection.
>>>>
>>>> My current plan tries to pass the socket fd of new connections
>>>> (which join an existing multi channel session) via fd-passing to
>>>> the existing process.
>>>>
>>>> Now I'm wondering if this would also be possible with
>>>> a rdma connection (struct rdma_cm_i ).
>>>>
>>> RDMA / verbs ressources are tied to a process (especially Memory
>>> Registration), but it's ending up in the HCA, which is probably unaware
>>> of processes.
>>>
>>> Additionally, an RDMA_CM connection is not identified by a FD, so this
>>> kind of Unix trick (FD passing through Unix socket: SCM_RIGHTS) is not
>>> going to work.
>>>
>>> Forking might already be a challenge for a RDMA/verbs application, so I
>>> don't think that sharing/moving an RDMA_CM connection across different
>>> processes is supported.
>>>
>>> But other people on this list (especially Roland Dreier and Sean Hefty)
>>> could find a solution.
>>>
>>> Regards.
>>>
>>
>> fork() support like you need is not there in Linux RDMA verbs. Another
>> alternative is to fork() before you setup the RDMA connection. IE if a
>> regular TCP socket is first used to negotiate RDMA mode, then maybe you
>> could fork() after negotiation but before setting up the RDMA connection
>> and other resources?
>
> For client connections that would work, but it can't work for a server
> that uses fork() after listen().
>
> Would it be possible to extend the librdmacm and libibverbs to:
> - handle fork() after getting RDMA_CM_EVENT_CONNECT_REQUEST
> which means there have to be some functions to destroy contexts like
> struct rdma_cm_id, but without affecting the real connection.
> Similar to close() on an FD that is used shared between two processes.
> - export/import an interprocess token attached to the hierarchy of objects
> similar to gss_export_sec_context/gss_import_sec_context.
> Or a function which exports the contexts into a FD (of a pipe),
> which could also transfer open FDs to the other end.
> Maybe this could pass the information through a rdma/ibverb event channel?
It would be ok if there's a limitation, which means that the transfer to
a different process is only possible if there're:
- no posted work requests
- no queue pairs
- completion queues
active on the connection.
metze
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2012-10-16 16:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 8:27 Is there a way to transfer a rdma connection between userspace processes? Stefan (metze) Metzmacher
[not found] ` <507BC8EE.2020908-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
2012-10-15 9:07 ` Yann Droneaud
[not found] ` <1350292042.2750.11.camel-vNW8ozRvgWupuGC+iAP0z+TW4wlIGRCZ@public.gmane.org>
2012-10-15 15:31 ` Steve Wise
[not found] ` <507C2C6E.7010507-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2012-10-16 14:25 ` Stefan (metze) Metzmacher
[not found] ` <507D6E3C.2050405-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
2012-10-16 16:46 ` Stefan (metze) Metzmacher [this message]
2012-10-17 19:01 ` Hefty, Sean
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=507D8F6A.5090008@samba.org \
--to=metze-eunubhrolfbytjvyw6ydsg@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org \
--cc=ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.