public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Roberson <jroberson-gUAg20sWgfgcWVvVuXF20w@public.gmane.org>
To: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: RE: LID reconfiguration
Date: Mon, 30 Nov 2009 14:28:22 -1000 (HST)	[thread overview]
Message-ID: <alpine.BSF.2.00.0911301407180.1226@desktop> (raw)
In-Reply-To: <65B503E4F968463B8D6D5D019E036ED7-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>

On Tue, 24 Nov 2009, Sean Hefty wrote:

>> That's what I suspected.  I wonder if the connection state isn't set
>> properly until later?  I'm really not sure.  Without a kernel debugger
>> it'll be hard to determine.  I guess I can throw some printfs in to track
>> this down unless there are better suggestions.
>
> Adding some printk's to ib_send_cm_lap() may be sufficient.  I would look at the
> cm_id state (should be IB_CM_ESTABLISHED) and the lap_state (should be
> IB_CM_LAP_UNINT the first time it's called).
>
> - Sean
>

I think I have tracked down part of my problem.  So just quickly to recap, 
what I'm trying to do is as send a lap immediately after sending the rtu. 
This fails on the server side when the server receives the RTU and tries 
to modify the qp to RTS.  I enabled mthca debugging and discovered that 
the qp attr isn't being setup properly.  I then found code in 
cm_init_qp_rts_attr that looks suspicious:

         if (cm_id_priv->id.lap_state == IB_CM_LAP_UNINIT) {
         } else {
             *qp_attr_mask = IB_QP_ALT_PATH | IB_QP_PATH_MIG_STATE;

So what happens is we don't actually do the RTR->RTS transition if lap is 
not 'uninit'.  I don't know if the stack peeks ahead and sees the lap 
message before userland processes the rtu.

In any event, it's invalid to do RTR->RTR and this prevents the RTR->RTS 
transition from ever happening.  If I skip this check the first transition 
works as expected but I suspect subsequent lap updates will not.

Really it looks as if this check should be predicated on the actual QP 
state which we don't seem to have at this time.  The CM state also doesn't 
seem to be useful as it is already ESTABLISHED in this case.

Any suggestions?

Thanks,
Jeff

--
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:[~2009-12-01  0:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-09 23:30 LID reconfiguration Jeff Roberson
2009-11-09 23:45 ` Jason Gunthorpe
     [not found]   ` <20091109234547.GH6188-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-11-09 23:56     ` Jeff Roberson
2009-11-10  0:20       ` Jason Gunthorpe
     [not found]         ` <20091110002047.GJ6188-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-11-17  4:38           ` Jeff Roberson
2009-11-17  4:51             ` Jason Gunthorpe
2009-11-17  5:15             ` Sean Hefty
     [not found]               ` <6A30FB8CEED94D778E7CDAE4660458DA-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-11-24  3:57                 ` Jeff Roberson
2009-11-24 17:49                   ` Sean Hefty
     [not found]                     ` <10477AA8CF094F2F92E8792307982F66-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-11-24 19:54                       ` Jeff Roberson
2009-11-24 19:59                         ` Sean Hefty
     [not found]                           ` <65B503E4F968463B8D6D5D019E036ED7-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-12-01  0:28                             ` Jeff Roberson [this message]
2009-12-01 15:55                               ` Sean Hefty
2009-11-10  7:07 ` Or Gerlitz
     [not found]   ` <4AF91138.7000809-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2009-11-10  7:11     ` Jeff Roberson
2009-11-10  7:44       ` Or Gerlitz

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=alpine.BSF.2.00.0911301407180.1226@desktop \
    --to=jroberson-guag20swgfgcwvvvuxf20w@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@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