RE: LID reconfiguration

Jeff Roberson
2009-11-24T03:57:16Z

On Mon, 16 Nov 2009, Sean Hefty wrote:

>> Is there an opensource example of using APM? When I call ib_cm_send_lap()
>> the QP goes to some error state and my connections die. Do I need to set
>> some QP attributes first? I found a paper that describes the process but
>> does not contain sample code or any real details.
>
> Sending the LAP/APR only exchanges CM protocol messages. You still need to
> modify the QP. There's an old example program for the kernel that did APM, but
> it shouldn't be too hard to see what it did and convert it to a userspace app.
>
> See the cmpost sample in the test-apps branch of my rdma-dev.git tree.

Thank you. This worked for me. However, there seems to be some kind of
race when the connection is first set up. On the client if I call
ib_cm_send_lap() immediately after ib_cm_send_rtu() returns successfully I
get an EINVAL error. If I delay for one second it works just fine.
According to the spec the passive/server side can not send the lap so I
can't send it in the rtu handler. Presumably the call fails immediately
after send_rtu because the server hasn't received that message yet? Is
this right? Is there a way to do this cleanly without a delay?

I notice that if I create the initial attributes for the connection
request with an alternate path specified the alt_path_state is still
MIGRATED when I send rtu. If I load a path after the connection is
established I can fail back and forth without issue.

Thanks,
Jeff

>
http://www.openfabrics.org/git/?p=~shefty/rdma-dev.git;a=blob;f=drivers/infiniba
nd/util/cmpost/cmpost.c;h=99f1446af841fd34b50b7bdfce1360f741e10a63;hb=b5e668a9b6
d0f24d1a92e604e67c44f1452ea1e4
>
> - Sean