[stgt] [PATCH] dynamically link libibverbs and librdma

Or Gerlitz ogerlitz at voltaire.com
Tue Sep 23 08:26:08 CEST 2008


Pete Wyckoff wrote:
> I like the idea, but the implementation is quite ugly.  Is there any better way to do it?  What other projects do dynamic linking to IB like this?
I am aware of at least one commercial MPI implementation that uses this 
method. In the open-MPI project they took a different approach of having 
a shared object that uses IB through the verbs api, this object is 
linked with libibverbs and the mpi core does dlopen to the object if the 
user wants to use verbs, but bottom the user can't --install-- openmpi 
if they don't have the IB stack installed on the machine, that is if you 
do rpm -qR on the mpi package you will see that it requires libibverbs, 
and this is the exact problem we wanted to solve here...
>> +typedef void (*ibv_ack_cq_events_t)(struct ibv_cq *cq, unsigned int nevents);
>
> This particularly feels wrong.  We have to duplicate the function declarations from verbs.h inside tgt?

As far as I know, you can't avoid it.

> What about compiling libtgt-rdma.so using existing verbs, then figure out if you can dlopen() that successfully.  Maybe if you say RTLD_NOW and libverbs.so is not present, the dlopen will fail and you can fall back to non-IB mode.

This is possible, that I still don't think your suggestion will relax 
the package dependency between tgt to the verbs.

Or


--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list