freebsd-nq/contrib/ofed/libsdp/README
2011-03-21 09:58:24 +00:00

69 lines
3.3 KiB
Plaintext

LIBSDP - A User Level Socket Switch for Seemless Migration to SDP
-----------------------------------------------------------------
OVERVIEW:
---------
libsdp is a LD_PRELOAD-able library that can be used to migrate existing
applications use InfiniBand Sockets Direct Protocol (SDP) instead of
TCP sockets, transparently and without recompilations. To setup libsdp
please follow the instructions below.
SETUP:
------
libsdp.so isn't setup automatically. it can be used in one of 2 ways:
1) LD_PRELOAD environment variable. Setting this to the name of the
library you want to use will cause it to be preloaded.
2) Adding the name of the library into /etc/ld.so.preload. This will
cause the library to be preloaded for every executable that is linked
with libc.
The library should be installed in a directory in which the dynamic loader
searches for shared libraries (as specified by LD_LIBRARY_PATH,
/etc/ld.so.conf, etc). Alternatively, you can specify the full path to the
library that you want to use in LD_PRELOAD or /etc/ld.so.preload as described
above.
The last option cant be used if you have multiple library versions
(e.g. 64/32 bit) and want the linker to select between them automatically.
The best way to handle such case is to use LD_LIBRARY_PATH to point to both the
lib (the 32 bit version) and lib64 directories and LD_RELOAD the libsdp.so.
This way the correct 32/64bit libsdp.so will be selected.
For example running ssh over SDP with OFED distribution from bash this can be written:
LD_LIBRARY_PATH=/usr/local/ofed/lib64:/usr/local/ofed/lib LD_PRELOAD=libsdp.so ssh
CONFIGURATION:
--------------
libsdp supports two modes of configuration:
* simple operation where it converts all calls to socket(2) with a family
of AF_INET(6) and a type of SOCK_STREAM into family of AF_INET_SDP.
* selective mode where it uses a configuration file to select which sockets
will be using SDP and which will not.
For real world applications where communication with X, authentication,
DNS and other servers connected through TCP is required the selective mode
is required.
Simple mode will be selected in one of the following conditions:
* the environment variable SIMPLE_LIBSDP to a non-empty value
* no configuration file is defined or is un-readble
* the configuration file does not include any address family rule
For information on how to configure libsdp, see libsdp.conf, which is installed
in $(sysconfdir) (usually /usr/local/etc or /etc). The user can further control
the file to be used for configuration by setting the environment variable:
LIBSDP_CONFIG_FILE
LIMITATIONS:
------------
1. Applications statically linked with libc will not allow dynamic pre-loading
to port these applications to use SDP one needs to replace specific socket
calls (within the application) with AF_INET_SDP and recompile.
2. If for some reason the dynamic linker fail to pre-load libc before the
libsdp.so is initialized or it does not support RTDL_NEXT, libsdp will
fail to find the libc socket API. To overcome this situation a simple
implementation of hijacking "socket" call is provided in libsdp_sys.
This partial implementation does not support any configuration and is
limited to i386 architecture.
3. Non-blocking connect in "both" mode defaults to SDP. Specific rules might be
needed for applications to operate properly.