-
Notifications
You must be signed in to change notification settings - Fork 14
/
nvpd_rpc.h
156 lines (131 loc) · 4.56 KB
/
nvpd_rpc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/*
* Please do not edit this file.
* It was generated using rpcgen.
*/
#ifndef _NVPD_RPC_H_RPCGEN
#define _NVPD_RPC_H_RPCGEN
#include <rpc/rpc.h>
#ifdef __cplusplus
extern "C" {
#endif
enum NvPdStatus {
NVPD_SUCCESS = 0,
NVPD_ERR_DAEMON_NOT_PRESENT = 1,
NVPD_ERR_DEVICE_NOT_FOUND = 2,
NVPD_ERR_DRIVER = 3,
NVPD_ERR_INSUFFICIENT_RESOURCES = 4,
NVPD_ERR_INVALID_ARGUMENT = 5,
NVPD_ERR_IO = 6,
NVPD_ERR_PERMISSIONS = 7,
NVPD_ERR_RPC = 8,
NVPD_ERR_USER_NOT_FOUND = 9,
NVPD_ERR_NUMA_FAILURE = 10,
NVPD_ERR_UNKNOWN = 11,
};
typedef enum NvPdStatus NvPdStatus;
struct NvPciDevice {
int domain;
int bus;
int slot;
int function;
};
typedef struct NvPciDevice NvPciDevice;
enum NvPersistenceMode {
NV_PERSISTENCE_MODE_DISABLED = 0,
NV_PERSISTENCE_MODE_ENABLED = 1,
};
typedef enum NvPersistenceMode NvPersistenceMode;
enum NvUVMPersistenceMode {
NV_UVM_PERSISTENCE_MODE_DISABLED = 0,
NV_UVM_PERSISTENCE_MODE_ENABLED = 1,
};
typedef enum NvUVMPersistenceMode NvUVMPersistenceMode;
struct SetPersistenceModeArgs {
NvPciDevice device;
NvPersistenceMode mode;
};
typedef struct SetPersistenceModeArgs SetPersistenceModeArgs;
struct GetPersistenceModeArgs {
NvPciDevice device;
};
typedef struct GetPersistenceModeArgs GetPersistenceModeArgs;
struct GetPersistenceModeRes {
NvPdStatus status;
union {
NvPersistenceMode mode;
} GetPersistenceModeRes_u;
};
typedef struct GetPersistenceModeRes GetPersistenceModeRes;
enum NvNumaStatus {
NV_NUMA_STATUS_OFFLINE = 0,
NV_NUMA_STATUS_ONLINE = 1,
};
typedef enum NvNumaStatus NvNumaStatus;
struct SetNumaStatusArgs {
NvPciDevice device;
NvNumaStatus status;
};
typedef struct SetNumaStatusArgs SetNumaStatusArgs;
#define NVPD_PROG 35006
#define VersionOne 1
#if defined(__STDC__) || defined(__cplusplus)
#define nvPdSetPersistenceMode 1
extern NvPdStatus * nvpdsetpersistencemode_1(SetPersistenceModeArgs *, CLIENT *);
extern NvPdStatus * nvpdsetpersistencemode_1_svc(SetPersistenceModeArgs *, struct svc_req *);
#define nvPdGetPersistenceMode 2
extern GetPersistenceModeRes * nvpdgetpersistencemode_1(GetPersistenceModeArgs *, CLIENT *);
extern GetPersistenceModeRes * nvpdgetpersistencemode_1_svc(GetPersistenceModeArgs *, struct svc_req *);
extern int nvpd_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
#else /* K&R C */
#define nvPdSetPersistenceMode 1
extern NvPdStatus * nvpdsetpersistencemode_1();
extern NvPdStatus * nvpdsetpersistencemode_1_svc();
#define nvPdGetPersistenceMode 2
extern GetPersistenceModeRes * nvpdgetpersistencemode_1();
extern GetPersistenceModeRes * nvpdgetpersistencemode_1_svc();
extern int nvpd_prog_1_freeresult ();
#endif /* K&R C */
#define VersionTwo 2
#if defined(__STDC__) || defined(__cplusplus)
#define nvPdSetPersistenceModeOnly 1
extern NvPdStatus * nvpdsetpersistencemodeonly_2(SetPersistenceModeArgs *, CLIENT *);
extern NvPdStatus * nvpdsetpersistencemodeonly_2_svc(SetPersistenceModeArgs *, struct svc_req *);
#define nvPdSetNumaStatus 2
extern NvPdStatus * nvpdsetnumastatus_2(SetNumaStatusArgs *, CLIENT *);
extern NvPdStatus * nvpdsetnumastatus_2_svc(SetNumaStatusArgs *, struct svc_req *);
extern int nvpd_prog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
#else /* K&R C */
#define nvPdSetPersistenceModeOnly 1
extern NvPdStatus * nvpdsetpersistencemodeonly_2();
extern NvPdStatus * nvpdsetpersistencemodeonly_2_svc();
#define nvPdSetNumaStatus 2
extern NvPdStatus * nvpdsetnumastatus_2();
extern NvPdStatus * nvpdsetnumastatus_2_svc();
extern int nvpd_prog_2_freeresult ();
#endif /* K&R C */
/* the xdr functions */
#if defined(__STDC__) || defined(__cplusplus)
extern bool_t xdr_NvPdStatus (XDR *, NvPdStatus*);
extern bool_t xdr_NvPciDevice (XDR *, NvPciDevice*);
extern bool_t xdr_NvPersistenceMode (XDR *, NvPersistenceMode*);
extern bool_t xdr_NvUVMPersistenceMode (XDR *, NvUVMPersistenceMode*);
extern bool_t xdr_SetPersistenceModeArgs (XDR *, SetPersistenceModeArgs*);
extern bool_t xdr_GetPersistenceModeArgs (XDR *, GetPersistenceModeArgs*);
extern bool_t xdr_GetPersistenceModeRes (XDR *, GetPersistenceModeRes*);
extern bool_t xdr_NvNumaStatus (XDR *, NvNumaStatus*);
extern bool_t xdr_SetNumaStatusArgs (XDR *, SetNumaStatusArgs*);
#else /* K&R C */
extern bool_t xdr_NvPdStatus ();
extern bool_t xdr_NvPciDevice ();
extern bool_t xdr_NvPersistenceMode ();
extern bool_t xdr_NvUVMPersistenceMode ();
extern bool_t xdr_SetPersistenceModeArgs ();
extern bool_t xdr_GetPersistenceModeArgs ();
extern bool_t xdr_GetPersistenceModeRes ();
extern bool_t xdr_NvNumaStatus ();
extern bool_t xdr_SetNumaStatusArgs ();
#endif /* K&R C */
#ifdef __cplusplus
}
#endif
#endif /* !_NVPD_RPC_H_RPCGEN */