public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Shirley Ma <shirley.ma-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: "Hefty,
	Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: how to re-use a QP for a new connection
Date: Fri, 20 Jun 2014 15:56:35 -0700	[thread overview]
Message-ID: <53A4BC23.8080703@oracle.com> (raw)
In-Reply-To: <905C8760-5964-47F8-8DF2-0C018CBDF695-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

On 06/20/2014 03:30 PM, Chuck Lever wrote:
> Hi Shirley-
> 
> I’ve found that to move the QP back to the IB_QPS_INIT state, I need to
> call ib_modify_qp() with a specific set of attributes, including the
> pkey_index and port_num.
> 
> rdma_init_qp_attr() extracts those attributes. But, when I try to call it
> after rdma_disconnect(), the rdma_cm_id is not in the RDMA_CM_IDLE state,
> and the call fails.
> 
> So I can’t get the QP back to the INIT state unless the rdma_cm_id has
> somehow been reset.

I see, we need to have rdma_reset_id() to change the cm_id state to RDMA_CM_IDLE.
 
> I suppose I could call rdma_init_qp_attr() while the transport is still
> connected, and save the returned attributes.
Maybe we can save ib_qp_attr in xprtrdma rpcrdma_ia?

> On Jun 20, 2014, at 6:24 PM, Shirley Ma <shirley.ma-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> wrote:
> 
>> The QP can be reused. The rdma_id_private has a field reuseaddr. What additional change is needed besides rdma_set_reuseaddr?
>>
>> Shirley
>>
>> On 06/20/2014 02:17 PM, Hefty, Sean wrote:
>>>> During a remote transport disconnect, the QP leaves RTS.
>>>>
>>>> xprtrdma deals with this in a separate transport connect worker process,
>>>> where it creates a new id and qp, and replaces the existing id and qp.
>>>>
>>>> Unfortunately there are parts of xprtrdma (namely FRMR deregistration)
>>>> that are not easy to serialize with this reconnect logic.
>>>>
>>>> Re-using the QP would mean no serialization would be needed between
>>>> transport reconnect and FRMR deregistration.
>>>>
>>>> If QP re-use is not supported, though, it's not worth considering any
>>>> further.
>>>
>>> It may be possible to reuse the QP, just not the rdma_cm_id without additional code changes.  Reuse of the rdma_cm_id may also require changes in the underlying IB/iWarp CMs.
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
>>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
> 
> --
> Chuck Lever
> chuck[dot]lever[at]oracle[dot]com
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-06-20 22:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20 18:06 how to re-use a QP for a new connection Chuck Lever
     [not found] ` <36E48CE3-3FB6-4985-9CA5-4D6B800EE3DC-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-06-20 19:41   ` Hefty, Sean
     [not found]     ` <1828884A29C6694DAF28B7E6B8A82373993132A8-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-06-20 20:32       ` Chuck Lever
     [not found]         ` <5F77D836-4EE1-458D-B256-3C0EF4B1F2C2-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-06-20 21:17           ` Hefty, Sean
     [not found]             ` <1828884A29C6694DAF28B7E6B8A8237399313467-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-06-20 22:24               ` Shirley Ma
     [not found]                 ` <53A4B4A1.50301-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-06-20 22:30                   ` Chuck Lever
     [not found]                     ` <905C8760-5964-47F8-8DF2-0C018CBDF695-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-06-20 22:56                       ` Shirley Ma [this message]
2014-06-23 15:20               ` Chuck Lever
     [not found]                 ` <8E9844F1-AFDC-4F28-B646-596BCBC3FAA8-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-06-23 16:17                   ` Devesh Sharma
2014-06-23 16:22                   ` Hefty, Sean
     [not found]                     ` <1828884A29C6694DAF28B7E6B8A823739931EDD5-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-06-23 17:22                       ` Chuck Lever
     [not found]                         ` <1F02274F-B3FC-40EE-A46D-FB178EA3781B-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-06-23 17:25                           ` Hefty, Sean
     [not found]                             ` <1828884A29C6694DAF28B7E6B8A823739931EE90-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-06-23 17:31                               ` Chuck Lever
     [not found]                                 ` <98556348-B33A-4C2C-9D4E-AEA57FB472CE-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-06-23 21:12                                   ` Steve Wise

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=53A4BC23.8080703@oracle.com \
    --to=shirley.ma-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@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