-
Notifications
You must be signed in to change notification settings - Fork 4
/
netgate-vhost-user.yang
228 lines (186 loc) · 4.64 KB
/
netgate-vhost-user.yang
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
module netgate-vhost-user {
yang-version "1.1";
namespace "urn:netgate:xml:yang:netgate-vhost-user";
prefix "ngvhostuser";
import netgate-cli-extensions {
prefix "ngcliext";
}
import netgate-interface {
prefix "ngif";
}
organization "Netgate";
contact "Web: <http://www.netgate.com>";
description
"This YANG module provides a Netgate-defined data-model
for vhost-user data.
Copyright 2023 Rubicon Communications, LLC.";
revision 2023-06-01 {
description
"TNSR Release 23.06.";
}
augment "/ngif:interfaces-config" {
description
"Augments interface configuration with vhost-user interfaces.";
container vhost-user-interfaces {
description
"Data of the vhost-user interfaces.";
ngcliext:context "intf-vhost-user";
ngcliext:parent-fmt "interface vhost-user";
list vhost-user-interface {
key "instance";
description
"vhost-user interface configuration.";
ngcliext:node-fmt "$< @{instance}$n";
ngcliext:pre-children-op "push";
unique "sock-filename";
leaf instance {
type uint16;
description
"The interface identifier that will be present in the
last segment of its name.";
}
leaf sock-filename {
type string {
length "1..255";
pattern "[a-zA-Z0-9_./-]*";
}
mandatory true;
description
"Unix socket filename that the interface uses to
communicate with frontend.";
ngcliext:node-fmt "^$% @@$n";
}
leaf is-server {
type boolean;
default "false";
description
"If true, enable server mode. The interface will create
the socket if it does not already exist. If false,
enable client mode, hypervisor will create the socket
if it does not already exist";
ngcliext:node-fmt "|^server-mode$n";
ngcliext:node-op "bool";
}
leaf disable-merge-rx-buf {
type boolean;
default "false";
description
"Disable the use of merge receive buffers.";
ngcliext:node-fmt "|^disable merge-rx-buffers$n";
ngcliext:node-op "bool";
}
leaf disable-indirect-desc {
type boolean;
default "false";
description
"Disable the use of indirect descriptors.";
ngcliext:node-fmt "|^disable indirect-descriptors$n";
ngcliext:node-op "bool";
}
leaf enable-gso {
type boolean;
default "false";
description
"Enable the use of GSO.";
ngcliext:node-fmt "|^enable gso$n";
ngcliext:node-op "bool";
}
leaf enable-packed-ring {
type boolean;
default "false";
description
"Enable the use of packed ring.";
ngcliext:node-fmt "|^enable packed-ring$n";
ngcliext:node-op "bool";
}
leaf enable-event-index {
type boolean;
default "false";
description
"Enable the use of event index.";
ngcliext:node-fmt "|^enable event-index$n";
ngcliext:node-op "bool";
}
}
}
}
augment "/ngif:interfaces-state" {
description
"Augments interface state with vhost-user interfaces.";
container vhost-user-interfaces {
description
"State of the vhost-user interfaces.";
list vhost-user-interface {
key "instance";
description
"vhost-user interface state.";
unique "sock-filename";
leaf instance {
type uint16;
description
"The interface identifier that will be present in the
last segment of its name.";
}
leaf if-name {
type string;
description
"The interface name.";
}
leaf sock-filename {
type string;
description
"Unix socket filename that the interface uses to
communicate with frontend.";
}
leaf sock-errno {
type int32;
description
"Socket error number.";
}
leaf is-server {
type boolean;
description
"If true, enable server mode. The interface will create
the socket if it does not already exist. If false,
enable client mode, hypervisor will create the socket
if it does not already exist";
}
leaf virtio-net-header-size {
type uint32;
description
"Virtio net header size.";
}
leaf features {
type uint64;
description
"Interface features.";
}
container feature-table {
description
"Details on set bits in interface features.";
list feature-entry {
key "bit-position";
description
"Details on a single set bit in interface
features.";
leaf bit-position {
type uint8;
description
"Bit position.";
}
leaf bit-title {
type string;
description
"Bit title.";
}
}
}
leaf num-regions {
type uint32;
description
"Number of used memory regions.";
}
}
}
}
}