Whamcloud - gitweb
* removed a diff that crept in somehow
[fs/lustre-release.git] / lnet / klnds / lolnd / lolnd.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  *  Copyright (C) 2004 Cluster File Systems, Inc.
5  *
6  *   This file is part of Lustre, http://www.lustre.org.
7  *
8  *   Lustre is free software; you can redistribute it and/or
9  *   modify it under the terms of version 2 of the GNU General Public
10  *   License as published by the Free Software Foundation.
11  *
12  *   Lustre is distributed in the hope that it will be useful,
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *   GNU General Public License for more details.
16  *
17  *   You should have received a copy of the GNU General Public License
18  *   along with Lustre; if not, write to the Free Software
19  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21
22 #ifndef _LONAL_H
23 #define _LONAL_H
24 #ifndef EXPORT_SYMTAB
25 # define EXPORT_SYMTAB
26 #endif
27
28 #include <linux/config.h>
29 #include <linux/module.h>
30 #include <linux/kernel.h>
31 #include <linux/mm.h>
32 #include <linux/string.h>
33 #include <linux/stat.h>
34 #include <linux/errno.h>
35 #include <linux/uio.h>
36 #include <linux/init.h>
37
38 #define DEBUG_SUBSYSTEM S_LONAL
39
40 #include <linux/kp30.h>
41 #include <portals/p30.h>
42 #include <portals/lib-p30.h>
43 #include <portals/nal.h>
44
45 #define KLOD_IOV        153401
46 #define KLOD_KIOV       153402
47
48 typedef struct
49 {
50         unsigned int     klod_type;
51         unsigned int     klod_niov;
52         size_t           klod_offset;
53         size_t           klod_nob;
54         union {
55                 struct iovec  *iov;
56                 ptl_kiov_t    *kiov;
57         }                klod_iov;
58 } klo_desc_t;
59
60 typedef struct
61 {
62         char               klo_init;            /* what's been initialised */
63 }  klonal_data_t;
64
65 /* kqn_init state */
66 #define KLO_INIT_NOTHING        0               /* MUST BE ZERO so zeroed state is initialised OK */
67 #define KLO_INIT_LIB            1
68 #define KLO_INIT_ALL            2
69
70 extern lib_nal_t           klonal_lib;
71 extern nal_t               klonal_api;
72 extern klonal_data_t       klonal_data;
73
74 #endif /* _LONAL_H */