Whamcloud - gitweb
Landing b_hd_newconfig on HEAD
[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 /* Explicit NULL function pointer for EQ handler */
42 #define PTL_EQ_HANDLER_NONE                     0
43
44 /* NIDs are integers on Cray Portals */
45 #define FMT_NID "%u"
46 #define FMT_PID "%d"
47
48 /* When using Cray Portals this is defined in the Cray Portals Header*/
49 /*#define PTL_MD_LUSTRE_COMPLETION_SEMANTICS */
50
51 /* Can compare handles directly on Cray Portals */
52 #define PtlHandleIsEqual(a,b) ((a) == (b))
53
54 /* Diffrent error types on Cray Portals*/
55 #define ptl_err_t ptl_ni_fail_t
56
57 /*
58  * The Cray Portals has no maximum number of IOVs.  The
59  * maximum is limited only my memory and size of the
60  * int parameters (2^31-1).
61  * Lustre only really require that the underyling
62  * implemenation to support at least LNET_MAX_IOV,
63  * so for Cray portals we can safely just use that
64  * value here.
65  *
66  */
67 #define PTL_MD_MAX_IOV          LNET_MAX_IOV
68
69 #endif
70
71 #define FMT_PTLID "ptlid:"FMT_PID"-"FMT_NID
72
73 /* Align incoming small request messages to an 8 byte boundary if this is
74  * supported to avoid alignment issues on some architectures */
75 #ifndef PTL_MD_LOCAL_ALIGN8
76 # define PTL_MD_LOCAL_ALIGN8 0
77 #endif