Whamcloud - gitweb
LU-17744 ldiskfs: mballoc stats fixes
[fs/lustre-release.git] / lnet / include / uapi / linux / lnet / lnet-nl.h
1 // SPDX-License-Identifier: LGPL-2.0
2
3 /* Copyright (c) 2021,  UT-Battelle, LLC
4  *
5  * Author: James Simmons <jsimmons@infradead.org>
6  */
7
8 #ifndef __UAPI_LNET_NL_H__
9 #define __UAPI_LNET_NL_H__
10
11 #include <linux/types.h>
12
13 enum lnet_nl_key_format {
14         /* Is it FLOW or BLOCK */
15         LNKF_FLOW               = 1,
16         /* Is it SEQUENCE or MAPPING */
17         LNKF_MAPPING            = 2,
18         LNKF_SEQUENCE           = 4,
19 };
20
21 /**
22  * enum lnet_nl_scalar_attrs            - scalar LNet netlink attributes used
23  *                                        to compose messages for sending or
24  *                                        receiving.
25  *
26  * @LN_SCALAR_ATTR_UNSPEC:              unspecified attribute to catch errors
27  * @LN_SCALAR_ATTR_PAD:                 padding for 64-bit attributes, ignore
28  *
29  * @LN_SCALAR_ATTR_LIST:                List of scalar attributes (NLA_NESTED)
30  * @LN_SCALAR_ATTR_LIST_SIZE:           Number of items in scalar list (NLA_U16)
31  * @LN_SCALAR_ATTR_INDEX:               True Netlink attr value (NLA_U16)
32  * @LN_SCALAR_ATTR_NLA_TYPE:            Data format for value part of the pair
33  *                                      (NLA_U16)
34  * @LN_SCALAR_ATTR_VALUE:               String value of key part of the pair.
35  *                                      (NLA_NUL_STRING)
36  * @LN_SCALAR_ATTR_INT_VALUE:           Numeric value of key part of the pair.
37  *                                      (NLA_S64)
38  * @LN_SCALAR_ATTR_KEY_FORMAT:          LNKF_* format of the key value pair.
39  */
40 enum lnet_nl_scalar_attrs {
41         LN_SCALAR_ATTR_UNSPEC = 0,
42         LN_SCALAR_ATTR_PAD = LN_SCALAR_ATTR_UNSPEC,
43
44         LN_SCALAR_ATTR_LIST,
45         LN_SCALAR_ATTR_LIST_SIZE,
46         LN_SCALAR_ATTR_INDEX,
47         LN_SCALAR_ATTR_NLA_TYPE,
48         LN_SCALAR_ATTR_VALUE,
49         LN_SCALAR_ATTR_INT_VALUE,
50         LN_SCALAR_ATTR_KEY_FORMAT,
51
52         __LN_SCALAR_ATTR_MAX_PLUS_ONE,
53 };
54
55 #define LN_SCALAR_MAX (__LN_SCALAR_ATTR_MAX_PLUS_ONE - 1)
56
57 struct ln_key_props {
58         char                    *lkp_value;
59         __u16                   lkp_key_format;
60         __u16                   lkp_data_type;
61 };
62
63 struct ln_key_list {
64         __u16                   lkl_maxattr;
65         struct ln_key_props     lkl_list[];
66 };
67
68 #endif /* __UAPI_LNET_NL_H__ */