Whamcloud - gitweb
b=5498
[fs/lustre-release.git] / lnet / ulnds / socklnd / README
1 This library implements two NAL interfaces, both running over IP.
2 The first, tcpnal, creates TCP connections between participating
3 processes in order to transport the portals requests. The second,
4 ernal, provides a simple transport protocol which runs over
5 UDP datagrams.
6
7 The interface functions return both of these values in host order for
8 convenience and readability. However this means that addresses
9 exchanged in messages between hosts of different orderings will not
10 function properly.
11
12 Both NALs use the same support functions in order to schedule events
13 and communicate with the generic portals implementation.
14
15              -------------------------
16              |         api           |
17              |_______________________|
18              |         lib           |
19              |_______________________|
20              | ernal  |   |tcpnal    |
21              |--------|   |----------|
22              | udpsock|   |connection|
23              |-----------------------|
24              |     timer/select      |
25              -------------------------
26
27
28   These NALs uses the framework from fdnal of a pipe between the api
29 and library sides. This is wrapped up in the select on the library
30 side, and blocks on the api side. Performance could be severely
31 enhanced by collapsing this aritificial barrier, by using shared
32 memory queues, or by wiring the api layer directly to the library.
33
34
35 nid is defined as the low order 24-bits of the IP address of the
36 physical node left shifted by 8 plus a virtual node number of 0
37 through 255 (really only 239).  The virtual node number of a tcpnal
38 application should be specified using the environment variable
39 PTL_VIRTNODE.  pid is now a completely arbitrary number in the
40 range of 0 to 255.  The IP interface used can be overridden by
41 specifying the appropriate hostid by setting the PTL_HOSTID
42 environment variable.  The value can be either dotted decimal
43 (n.n.n.n) or hex starting with "0x".
44 TCPNAL:
45   As the NAL needs to try to send to a particular nid/pid pair, it
46   will open up connections on demand. Because the port associated with
47   the connecting socket is different from the bound port, two
48   connections will normally be established between a pair of peers, with
49   data flowing from the anonymous connect (active) port to the advertised
50   or well-known bound (passive) port of each peer.
51
52   Should the connection fail to open, an error is reported to the
53   library component, which causes the api request to fail.