[ofa-general] librdmacm - okay to select on a cm channel's file descriptor?

Bryan Green bryan.d.green at nasa.gov
Sat Aug 15 15:55:38 PDT 2009


Hi,

I'm using librdmacm for connection management (on Linux).

In an attempt to get unexpected DISCONNECT notifications during
ib communication, I'm trying to use 'select()' on the cm channel's file
descriptor, testing it for readability.  I've found that this works some of
the time, but not all of the time.

Is this a legitimate way to test for disconnections, or am I required to
either make the descriptor nonblocking and just poll, or use a background
thread for receiving cm events?  I'd rather not use the nonblocking
approach, because I'd like to simultaneously select on the cm channel
descriptor and an ibv_comp_channel descriptor.  I'm not sure if
selecting on the ibv_comp_channel descriptor is acceptable either, but it
appears to work.

I'd appreciate it if anyone can enlighten me on this.

Thanks,
-bryan




More information about the general mailing list