Whamcloud - gitweb
de354fb60a2b0b3422ddce784abdee65ed267c88
[fs/lustre-release.git] / lnet / include / uapi / linux / lnet / lnet-nl.h
1 /*
2  * LGPL HEADER START
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library.
18  *
19  * LGPL HEADER END
20  *
21  */
22 /* Copyright (c) 2021,  UT-Battelle, LLC
23  *
24  * Author: James Simmons <jsimmons@infradead.org>
25  */
26
27 #ifndef __UAPI_LNET_NL_H__
28 #define __UAPI_LNET_NL_H__
29
30 #include <linux/types.h>
31
32 enum lnet_nl_key_format {
33         /* Is it FLOW or BLOCK */
34         LNKF_FLOW               = 1,
35         /* Is it SEQUENCE or MAPPING */
36         LNKF_MAPPING            = 2,
37         LNKF_SEQUENCE           = 4,
38 };
39
40 enum lnet_nl_scalar_attrs {
41         LN_SCALAR_ATTR_UNSPEC = 0,
42         LN_SCALAR_ATTR_LIST,
43
44         LN_SCALAR_ATTR_LIST_SIZE,
45         LN_SCALAR_ATTR_INDEX,
46         LN_SCALAR_ATTR_NLA_TYPE,
47         LN_SCALAR_ATTR_VALUE,
48         LN_SCALAR_ATTR_KEY_FORMAT,
49
50         __LN_SCALAR_ATTR_LAST,
51 };
52
53 #define LN_SCALAR_CNT (__LN_SCALAR_ATTR_LAST - 1)
54
55 struct ln_key_props {
56         char                    *lkp_values;
57         __u16                   lkp_key_format;
58         __u16                   lkp_data_type;
59 };
60
61 struct ln_key_list {
62         __u16                   lkl_maxattr;
63         struct ln_key_props     lkl_list[];
64 };
65
66 #endif /* __UAPI_LNET_NL_H__ */