]> git.openfabrics.org - ~shefty/libibverbs.git/commit
Implement new method for finding and loading device-specific drivers
authorRoland Dreier <rolandd@cisco.com>
Mon, 11 Dec 2006 01:34:18 +0000 (17:34 -0800)
committerRoland Dreier <rolandd@cisco.com>
Mon, 11 Dec 2006 01:34:18 +0000 (17:34 -0800)
commit05e10de540a082198fb25b077012170dc5572f2f
tree2df9ff7d0310caa3fd12cf70c1d0e2c4bd0d11ff
parentd5b9ab3d7009b77ee45e98827e803205d322ce7d
Implement new method for finding and loading device-specific drivers

Export an ibv_register_driver() entry point, and expect plugins to
call it from __attribute__((constructor)) code.  This will allow
multiple drivers to be statically linked in.

Also read config files and then use dlopen() with a relative path to
find drivers (rather than searching a specific lib/infiniband/
directory for .so files).  This allows multiple versions of a driver
to be installed in parallel, and also allows for optimized drivers in
places like /lib/i686.

Drivers should no longer export an ibv_driver_init() function any
more.  Instead, they should add a function (which can be static) with
__attribute__((constructor)) that calls ibv_register_driver() to
register the driver's probe function.  Also, drivers should install a
file with a line "driver <driver name>" under ${sysconfdir}/libibverbs.d.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Makefile.am
README
include/infiniband/driver.h
src/ibverbs.h
src/init.c
src/libibverbs.map