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