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