blob: fb1a7c0ab2b00ca7d82278b0f67e571e9fe1f359 [file] [log] [blame]
Sean Condonfae8e662016-12-15 10:25:13 +00001module rfc-2544 {
2
3 /*** NAMESPACE / PREFIX DEFINITION ***/
4
5 namespace "http://www.microsemi.com/rfc2544";
6 prefix "rfc2544";
7
8 import svc-activation-types {
9 prefix sa;
10 }
11
12 import msea-types {
13 prefix msea;
14 revision-date 2016-02-29;
15 }
16
17 /*** META INFORMATION ***/
18
19 organization
20 "Microsemi Inc., FTD Division";
21
22 contact
23 "Web URL: http://www.microsemi.com/
24 E-mail: info@microsemi.com
25 Postal: Microsemi Corporation Corporate Headquarters
26 One Enterprise Aliso Viejo,
27 CA 92656
28 U.S.A.
29 Phone: +1 949 380 6100
30 Fax: +1 949 215-4996";
31
32 description
33 "This YANG module defines the interface for RFC 2544 Benchmarking Methodology for Network Interconnect Devices
34
35 Copyright 2015 Microsemi Inc.
36 All rights reserved.";
37
38 revision "2015-10-20" {
39 description
40 "Initial version - Sean Condon, Microsemi";
41 }
42
43 /*
44 * Typedefs
45 */
46
47
48 /*
49 * Groupings
50 */
51 grouping frame-size-group {
52
53 description "Frame sizes to use in the test";
54
55 leaf-list frame-size {
56 type sa:frame-size-type;
57 max-elements 8;
58 units "byte";
59 ordered-by user;
60 description "A range of frame sizes to use. 512 bytes will be used if nothing is specified";
61 }
62
63 reference "RFC 2544 Section 9
64 All of the described tests SHOULD be performed at a number of frame
65 sizes. Specifically, the sizes SHOULD include the maximum and minimum
66 legitimate sizes for the protocol under test on the media under test
67 and enough sizes in between to be able to get a full characterization
68 of the DUT performance. Except where noted, at least five frame
69 sizes SHOULD be tested for each test condition.";
70 }
71
72 grouping throughput-group {
73 description
74 "Configuration parameters for throughput test.";
75
76 leaf step-size {
77 type uint8 {
78 range 1..10|20|25|30|40|50|100;
79 }
80 must "current() <= ((../max-rate) - (../min-rate))" {
81 error-app-tag "msea-2544-must-1";
82 error-message "step-size must be less than or equal to the difference between min- and max-rate";
83 }
84 units "Mb/s";
85 default 10;
86 description "The throughput rate step size from 1Mb/s to 1,000Mb/s (1 Gbps)";
87 }
88
89 leaf min-rate {
90 type uint16 {
91 range 1..999;
92 }
93 must "current() < ../max-rate" {
94 error-app-tag "msea-2544-must-2";
95 error-message "min-rate must not equal or exceed max-rate";
96 }
97 units "Mb/s";
98 default 10;
99 description "The minimum throughput rate from 1Mb/s to 1,000Mb/s (1Gbps)
100 The test starts at the max-rate and reduces by step-size on each
101 iteration until it drops below min-rate. For example with
102 max-rate=10, step-size=2 and min-rate=1, tests will be
103 performed at 10,8,6,4 and 2 Mb/s";
104 }
105
106 leaf max-rate {
107 type uint16 {
108 range 2..1000;
109 }
110 units "Mb/s";
111 default 1000;
112 description "The maximum throughput rate from 1Mb/s to 1,000Mb/s (1Gbps)";
113 }
114
115 leaf trial-duration {
116 type uint32 {
117 range 1..max;
118 }
119 default 60;
120 units "s";
121 description "Trial duration";
122 reference "RFC 2544 Section 24
123 The duration of the test portion of each trial SHOULD be
124 at least 60 seconds.";
125 }
126 }
127
128 grouping afl-group {
129 description
130 "Extra configuration parameters for throughput and latency test.";
131
132 leaf accepted-frame-loss {
133 type uint32 {
134 range min..100000;
135 }
136 units "m%";
137 default 0;
138 description "The acceptable Frame Loss ratio in units of 0.001%";
139 }
140 }
141
142 grouping result-common-group {
143 description
144 "Common attributes of by-frame-size result set.";
145
146 leaf test-status {
147 type sa:test-status;
148 mandatory true;
149 description "The current status of the subset of tests";
150 }
151
152 leaf frame-size {
153 type sa:frame-size-type;
154 units "bytes";
155 description "The frame size used";
156 }
157
158 leaf elapsed-time {
159 type uint16;
160 units "s";
161 description "The number of seconds the test has been running";
162 }
163 }
164
165 /*
166 * Features
167 */
168 feature throughput {
169 description
170 "This feature indicates that the device supports throughput tests";
171 reference
172 "RFC 2544: Section 26.1";
173 }
174
175 feature latency {
176 description
177 "This feature indicates that the device supports Latency tests";
178 reference
179 "RFC 2544: Section 26.2";
180 }
181
182 feature frame-loss-rate {
183 description
184 "This feature indicates that the device supports Frame Loss Rate tests";
185 reference
186 "RFC 2544: Section 26.3";
187 }
188
189 feature back-to-back {
190 description
191 "This feature indicates that the device supports Back-to-Back (burst mode) tests";
192 reference
193 "RFC 2544: Section 26.4";
194 }
195
196 container rfc2544-test {
197 description
198 "A configured set of parameters for an RFC 2544 test";
199
200 container mep-config {
201 presence "Presence indicates that a MEP has been configured";
202
203 uses msea:mep-config-attribs-noref;
204
205 leaf remote-mep-id {
206 type msea:mep-id-type;
207 must "current()/../maintenance-association-end-point != current()" {
208 error-message "Remote MEP Id must not be the same as Local MEP Id";
209 error-app-tag "msea-svc-must-01";
210 }
211
212 //mandatory true; //Should not be mandatory in a top level container
213 description "The Id of the remote MEP";
214 }
215
216 container overwrite-pcp {
217 presence "Enables PCP Overwrite";
218 description "If present allows attributes to be
219 specified for the PCP overwrite";
220
221 uses sa:overwrite-pcp-attribs;
222
223 leaf overwrite-drop-eligible {
224 type boolean;
225 default false;
226 description
227 "The Drop Eligible flag in the MEP's TAG is replaced
228 with this value if overwrite-pcp is present.";
229 }
230 }
231 }
232
233 leaf binary-search-step-duration {
234 type uint16 {
235 range 1..10;
236 }
237 default 2;
238 units "s";
239 description
240 "The time in seconds for each step in the Throughput binary search. Range 1 to 10, default 2.";
241 reference "RFC 2544 Section 24";
242 }
243
244
245 container throughput {
246 if-feature throughput;
247 description "Configuration parameters for the Throughput part of the test";
248
249 uses throughput-group;
250 uses frame-size-group;
251 uses afl-group;
252 }
253
254 container latency {
255 if-feature latency;
256 description "Configuration parameters for the Latency part of the test";
257
258 uses throughput-group {
259 refine trial-duration {
260 default 120;
261 }
262 }
263 uses frame-size-group;
264 uses afl-group;
265 }
266
267 container frame-loss {
268 if-feature frame-loss-rate;
269 description "Configuration parameters for the Frame Loss part of the test";
270
271 uses throughput-group;
272 uses frame-size-group;
273 }
274
275 container back-to-back {
276 if-feature back-to-back;
277 description "Configuration parameters for the Back-to-Back part of the test";
278
279 leaf trial-duration {
280 type uint32 {
281 range 1..10000;
282 }
283 units "ms";
284 default 2000;
285 description "The duration of the Back-to-Back test in milliseconds";
286 }
287
288 leaf iterations {
289 type uint16 {
290 range 1..max;
291 }
292 default 50;
293 description "The number of times to run the test";
294 }
295
296 uses frame-size-group;
297 }
298 }
299
300 container rfc2544-result {
301 config false;
302
303 description "A collection of the results from the RFC 2544 tests";
304
305 container throughput {
306 if-feature throughput;
307
308 description "Results for the Throughput test";
309
310 uses sa:results-header-group;
311
312 list result-item {
313 key frame-size;
314
315 description "The list of results by frame size";
316
317 reference "RFC 2544: Section 26.1";
318
319 uses result-common-group;
320
321 leaf frame-rate {
322 type uint32;
323 units "Mb/s";
324 description "The throughput rate achieved for this packet size";
325 }
326 }
327 }
328
329 container latency {
330 if-feature latency;
331
332 description "Results for the Latency test";
333
334 uses sa:results-header-group;
335
336 list result-item {
337 key frame-size;
338
339 uses result-common-group;
340
341 leaf frame-rate {
342 type uint32;
343 units "Mb/s";
344 description "The throughput rate achieved for this frame size";
345 }
346
347 leaf frame-delay-min {
348 type uint32;
349 units "μs";
350 description "The Minimum Frame Delay measured at the throughput rate";
351 }
352
353 leaf frame-delay-max {
354 type uint32;
355 units "μs";
356 description "The Maximum Frame Delay measured at the throughput rate";
357 }
358
359 leaf frame-delay-avg {
360 type uint32;
361 units "μs";
362 description "The Average Frame Delay measured at the throughput rate";
363 }
364
365 leaf frame-delay-var-min {
366 type uint32;
367 units "μs";
368 description "The Minimum Frame Delay Variation measured at the throughput rate";
369 }
370
371 leaf frame-delay-var-max {
372 type uint32;
373 units "μs";
374 description "The Maximum Frame Delay Variation measured at the throughput rate";
375 }
376
377 leaf frame-delay-var-avg {
378 type uint32;
379 units "μs";
380 description "The Average Frame Delay Variation measured at the throughput rate";
381 }
382 }
383 }
384
385 container frame-loss {
386 if-feature frame-loss-rate;
387
388 description "Results for the Frame Loss test";
389 reference "RFC-2544 Section 26.3";
390
391 uses sa:results-header-group;
392
393 list result-item {
394 key frame-size;
395
396 description "The frame-loss result set for this frame-size";
397
398 uses result-common-group;
399
400 leaf frame-steps {
401 type uint8;
402 description "The number of steps recorded during Frame Loss test. Maximum is 8";
403 }
404
405 list frame-rate {
406 key rate;
407 description "A list of the losses at each rate step. This shows up to the 8 most recent steps";
408
409 leaf rate {
410 type uint32;
411 units "Mb/s";
412 description "The test rate used for this step";
413 }
414
415 leaf frame-loss {
416 type uint32;
417 units "m%";
418 description "The percentage frames lost for this rate step (in 0.001% units)";
419 }
420 }
421 }
422 }
423
424 container back-to-back {
425 if-feature back-to-back;
426
427 description "Results for the Back-to-Back (burst mode) test";
428
429 uses sa:results-header-group;
430
431 list result-item {
432 key frame-size;
433
434 leaf test-status {
435 type sa:test-status;
436 mandatory true;
437 description "The current status of the subset of tests";
438 }
439
440 leaf frame-size {
441 type sa:frame-size-type;
442 units "bytes";
443 description "The frame size used";
444 }
445
446 leaf burst-duration {
447 type uint16;
448 units "ms";
449 description "The duration of the burst in milliseconds";
450 }
451
452 leaf average-burst-frame-count {
453 type uint32;
454 description "An average of the count of received frames for the test for this frame size";
455 }
456 }
457
458 }
459
460 }
461
462
463
464 rpc run-rfc2544-test {
465
466 description
467 "Run the configured RFC 2544 test";
468
469 input {
470 leaf tests-enabled {
471 type bits {
472 bit throughput;
473 bit latency;
474 bit frameLoss;
475 bit backToBack;
476 }
477 default "throughput latency frameLoss backToBack";
478 description "Choose the test components to run - by default all are selected";
479 }
480
481
482 leaf send-subtest-event {
483 type boolean;
484 default true;
485 description "If true then send events for all of the state changes of tests at the 'frame size' level.
486 If false events are sent only for state changes in the top level tests e.g. throughput";
487 }
488 }
489 }
490
491 rpc stop-rfc2544-test {
492 description
493 "Stop the running RFC 2544 test";
494 }
495
496 notification rfc2544-test-updated {
497 description
498 "A rfc2544-test-updated notification is sent when the state of a test changes.";
499
500 uses sa:notification-group;
501
502 leaf frame-size {
503 type sa:frame-size-type;
504 units "bytes";
505 description "The frame size that is being tested. If not present then
506 the notification pertains to the overall test type";
507 }
508 }
509}