Whamcloud - gitweb
* 12299 - fixed spurious timeout on userspace ptllnd NOOP messages.
[fs/lustre-release.git] / lnet / include / lnet / ptllnd.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  * Copyright (C) 2005 Cluster File Systems, Inc. All rights reserved.
5  *   Author: PJ Kirner <pjkirner@clusterfs.com>
6  *
7  *   This file is part of the Lustre file system, http://www.lustre.org
8  *   Lustre is a trademark of Cluster File Systems, Inc.
9  *
10  *   This file is confidential source code owned by Cluster File Systems.
11  *   No viewing, modification, compilation, redistribution, or any other
12  *   form of use is permitted except through a signed license agreement.
13  *
14  *   If you have not signed such an agreement, then you have no rights to
15  *   this file.  Please destroy it immediately and contact CFS.
16  *
17  */
18  
19 /*
20  * The PTLLND was designed to support Portals with
21  * Lustre and non-lustre UNLINK semantics.
22  * However for now the two targets are Cray Portals
23  * on the XT3 and Lustre Portals (for testing) both
24  * have Lustre UNLINK semantics, so this is defined
25  * by default.
26  */
27 #define LUSTRE_PORTALS_UNLINK_SEMANTICS
28  
29  
30 #ifdef _USING_LUSTRE_PORTALS_
31
32 /* NIDs are 64-bits on Lustre Portals */
33 #define FMT_NID LPU64
34 #define FMT_PID "%d"
35
36 /* When using Lustre Portals Lustre completion semantics are imlicit*/
37 #define PTL_MD_LUSTRE_COMPLETION_SEMANTICS      0
38
39 #else /* _USING_CRAY_PORTALS_ */
40
41 /* NIDs are integers on Cray Portals */
42 #define FMT_NID "%u"
43 #define FMT_PID "%d"
44
45 /* When using Cray Portals this is defined in the Cray Portals Header*/
46 /*#define PTL_MD_LUSTRE_COMPLETION_SEMANTICS */
47
48 /* Can compare handles directly on Cray Portals */
49 #define PtlHandleIsEqual(a,b) ((a) == (b))
50
51 /* Diffrent error types on Cray Portals*/
52 #define ptl_err_t ptl_ni_fail_t
53
54 /*
55  * The Cray Portals has no maximum number of IOVs.  The
56  * maximum is limited only my memory and size of the
57  * int parameters (2^31-1).
58  * Lustre only really require that the underyling
59  * implemenation to support at least LNET_MAX_IOV,
60  * so for Cray portals we can safely just use that
61  * value here.
62  *
63  */
64 #define PTL_MD_MAX_IOV          LNET_MAX_IOV
65
66 #endif
67
68 #define FMT_PTLID "ptlid:"FMT_PID"-"FMT_NID
69
70 /* Align incoming small request messages to an 8 byte boundary if this is
71  * supported to avoid alignment issues on some architectures */
72 #ifndef PTL_MD_LOCAL_ALIGN8
73 # define PTL_MD_LOCAL_ALIGN8 0
74 #endif