Whamcloud - gitweb
a4ea39b11d95446f22de7127a21223eda809e13a
[fs/lustre-release.git] / lnet / include / lnet / p30.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  */
4 #ifndef _P30_H_
5 #define _P30_H_
6
7 /*
8  * p30.h
9  *
10  * User application interface file
11  */
12
13 #if defined (__KERNEL__)
14 #include <linux/uio.h>
15 #include <linux/types.h>
16 #else
17 #include <sys/types.h>
18 #include <sys/uio.h>
19 #endif
20
21 #include <portals/types.h>
22 #include <portals/nal.h>
23 #include <portals/api.h>
24 #include <portals/errno.h>
25 #include <portals/nalids.h>
26
27 extern int __p30_initialized;   /* for libraries & test codes  */
28 extern int __p30_myr_initialized;       /*   that don't know if p30    */
29 extern int __p30_ip_initialized;        /*   had been initialized yet  */
30 extern ptl_handle_ni_t __myr_ni_handle, __ip_ni_handle;
31
32 extern int __p30_myr_timeout;   /* in seconds, for PtlNIBarrier,     */
33 extern int __p30_ip_timeout;    /* PtlReduce_all, & PtlBroadcast_all */
34
35 /*
36  * Debugging flags reserved for the Portals reference library.
37  * These are not part of the API as described in the SAND report
38  * but are for the use of the maintainers of the reference implementation.
39  *
40  * It is not expected that the real implementations will export
41  * this functionality.
42  */
43 #define PTL_DEBUG_NONE          0ul
44 #define PTL_DEBUG_ALL           (0x0FFFul)      /* Only the Portals flags */
45
46 #define __bit(x)                ((unsigned long) 1<<(x))
47 #define PTL_DEBUG_PUT           __bit(0)
48 #define PTL_DEBUG_GET           __bit(1)
49 #define PTL_DEBUG_REPLY         __bit(2)
50 #define PTL_DEBUG_ACK           __bit(3)
51 #define PTL_DEBUG_DROP          __bit(4)
52 #define PTL_DEBUG_REQUEST       __bit(5)
53 #define PTL_DEBUG_DELIVERY      __bit(6)
54 #define PTL_DEBUG_UNLINK        __bit(7)
55 #define PTL_DEBUG_THRESHOLD     __bit(8)
56 #define PTL_DEBUG_API           __bit(9)
57
58 /*
59  * These eight are reserved for the NAL to define
60  * It should probably give them better names...
61  */
62 #define PTL_DEBUG_NI_ALL        (0xF000ul)      /* Only the NAL flags */
63 #define PTL_DEBUG_NI0           __bit(24)
64 #define PTL_DEBUG_NI1           __bit(25)
65 #define PTL_DEBUG_NI2           __bit(26)
66 #define PTL_DEBUG_NI3           __bit(27)
67 #define PTL_DEBUG_NI4           __bit(28)
68 #define PTL_DEBUG_NI5           __bit(29)
69 #define PTL_DEBUG_NI6           __bit(30)
70 #define PTL_DEBUG_NI7           __bit(31)
71
72 #endif