-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbbf-frame-processing-profiles.yang
625 lines (598 loc) · 23.7 KB
/
bbf-frame-processing-profiles.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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
module bbf-frame-processing-profiles {
yang-version 1.1;
namespace "urn:bbf:yang:bbf-frame-processing-profiles";
prefix bbf-fpprof;
import bbf-yang-types {
prefix bbf-yang;
}
import bbf-dot1q-types {
prefix bbf-dot1qt;
}
import bbf-frame-processing-types {
prefix bbf-fpt;
}
import bbf-frame-classification {
prefix bbf-classif;
}
import bbf-frame-editing {
prefix bbf-fedit;
}
import ietf-interfaces {
prefix if;
}
import bbf-sub-interfaces {
prefix bbf-subif;
}
import bbf-sub-interface-tagging {
prefix bbf-subif-tag;
}
organization
"Broadband Forum <https://www.broadband-forum.org>
Common YANG Work Area";
contact
"Comments or questions about this Broadband Forum YANG module
should be directed to <mailto:[email protected]>.
Editor: Nick Hancock, Adtran
Editor: Ludwig Pauwels, Nokia
PS Leader: Joey Boyd, Adtran
WA Director: Joey Boyd, Adtran
WA Director: Sven Ooghe, Nokia";
description
"This module contains a collection of YANG definitions for
supporting the Broadband Forum requirements on the management of
sub-interfaces as applicable to access network equipment. As
such, this module is specific to access network equipment (e.g.,
BBF-specified Access Nodes and FTTdp DPUs).
Specifically, this module contains the definition of a profile
for classifying frames and performing ingress- and egress-rewrite
actions, and it augments the frame processing configuration of a
(VLAN sub-)interface for using this profile
Copyright (c) 2017-2023, Broadband Forum
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The above license is used as a license under copyright only.
Please reference the Forum IPR Policy for patent licensing terms
<https://www.broadband-forum.org/ipr-policy>.
Any moral rights which are necessary to exercise under the above
license grant are also deemed granted under this license.
This version of this YANG module is part of TR-383a7; see
the TR itself for full legal notices.";
revision 2023-12-15 {
description
"Amendment 7.
* Approval Date: 2023-12-15.
* Publication Date: 2023-12-15.";
reference
"TR-383a7: Common YANG Modules
<https://www.broadband-forum.org/technical/download/
TR-383_Amendment-7.pdf>";
}
revision 2023-03-07 {
description
"Amendment 6.
* Approval Date: 2023-03-07.
* Publication Date: 2023-03-07.";
reference
"TR-383a6: Common YANG Modules
<https://www.broadband-forum.org/technical/download/
TR-383_Amendment-6.pdf>";
}
revision 2022-03-01 {
description
"Amendment 5.
* Approval Date: 2022-03-01.
* Publication Date: 2022-03-01.";
reference
"TR-383a5: Common YANG Modules
<https://www.broadband-forum.org/technical/download/
TR-383_Amendment-5.pdf>";
}
revision 2021-06-02 {
description
"Amendment 4.
* Approval Date: 2021-06-02.
* Publication Date: 2021-06-02.";
reference
"TR-383a4: Common YANG Modules
<https://www.broadband-forum.org/technical/download/
TR-383_Amendment-4.pdf>";
}
feature vlan-id-translation {
description
"Indicates support for using the frame processing profile in
combination with VLAN ID translation.";
}
feature dscp-match-criteria {
description
"Indicates support for the use of DSCP values as match
criteria.";
}
container frame-processing-profiles {
description
"Configuration of frame processing profiles.";
list frame-processing-profile {
key "name";
description
"A profile providing a mechanism to configure frame processing
behavior. The frame processing behavior refers to both
directions:
- Ingress, refers to frames received from the lower-layer
interface of an interface referencing this profile into the
interface referencing this profile.
- Egress, refers to frames received from a higher-layer of
the interface stack, or from a forwarder, and that are to
be transmitted to the lower-layer of the interface
referencing this profile.
- In the ingress direction, classification criteria identify
whether a frame received on the lower-layer interface shall
be offered to the interface referencing this profile.
- For both the ingress and egress direction, rewrite
configuration provides the tag manipulations to be
performed.";
leaf name {
type bbf-yang:string-ascii64;
description
"The name of the profile.";
}
leaf priority {
type uint16 {
range "1..max";
}
mandatory true;
description
"This field indicates the priority for applying the match
criteria of this rule against the priority of match
criteria of other rules of this or of other interfaces on
the same lower-layer interface.
The higher the value, the lower the priority, i.e.,
priority 1 is the highest priority.";
}
container match-criteria {
presence
"The presence of this container indicates that the profile
will be configured with positive match criteria.";
description
"This container collects match criteria for various frame
fields.
The match criteria are unambiguous in case a frame field
is unique. This is not the case for the match criteria
defined via leaf 'ethernet-frame-type'. The value is to be
compared with the first Ethertype of an untagged Ethernet
frame; or for frames that contain one or more VLAN tags it
is the value to be compared with the Ethertype that is the
first after the VLAN tags for which a matching criteria is
specified via the leafs in the case 'vlan-tagged'.
For example, if matching criteria are specified for one
outer VLAN tag, and a received IPoE frame is single tagged,
then the leaf 'ethernet-frame-type' refers to the Ethertype
0x0800 being the Ethertype that identifies the frame as
IPoE. While the same configuration applied to a received
IPoE frame that is double tagged, then the leaf
'ethernet-frame-type' refers to the Ethertype 0x8100 being
the Ethertype that identifies the frame contains an inner
VLAN tag.";
leaf any-frame {
type empty;
description
"Any frame.
Configuring the 'any-frame' case is equivalent to not
configuring any match-criteria and means that 'all frames
match'. This permits explicit configuration, e.g., in
case of the Transparent LAN Service (TLS).";
}
container vlans {
presence
"The presence of this container enables configuration of a
filter on VLAN tags.
If the container is not present, then the presence or
absence of VLAN tags in the frame is not a filter
criterion and then, as to this filter, 'all frames
match'.";
description
"Match criteria associated with VLAN tags.";
choice vlan-tag-match-type {
mandatory true;
description
"Provides a choice of how the frames may be matched.";
case untagged {
leaf untagged {
type empty;
description
"Untagged match. Matches all untagged traffic.";
}
}
case vlan-tagged {
list tag {
key "index";
min-elements 1;
max-elements 2;
description
"The tags to match, with the outermost tag to match
assigned index 0.";
leaf index {
type bbf-classif:tag-index;
must 'count(../../tag[index = 0]) > 0' {
error-message
"An inner tag has been specified without an "
+ "outer tag";
description
"Only allow matching on an inner tag, if also
matching on the outer tags at the same time.";
}
description
"The index into the tag stack, outermost tag
first.";
}
leaf tag-type {
type union {
type bbf-dot1qt:dot1q-tag-type;
type bbf-dot1qt:ether-type;
type bbf-dot1qt:ether-type-hex;
}
mandatory true;
description
"VLAN tag type.";
}
leaf vlan-id {
type union {
type bbf-dot1qt:vlan-id;
type enumeration {
enum priority-tagged {
description
"Priority-tagged frames are frames with a
VLAN tag present and that match VLAN ID
0.";
}
enum vlan-id-is-a-parameter {
description
"The VLAN ID to classify frames for is not
specified inside this profile but has to be
specified at the place where this profile
is referenced.";
}
}
}
mandatory true;
description
"Allowed VLAN IDs.";
}
leaf pbit {
type union {
type bbf-dot1qt:pbit-list;
type enumeration {
enum any {
description
"Matches any value of the p-bits in the
range of 0 to 7.";
}
}
}
default "any";
description
"Allowed value of the p-bits.";
}
leaf dei {
type union {
type bbf-dot1qt:dei;
type enumeration {
enum any {
description
"Matches any Drop Eligible Indicator (DEI)
value, i.e., value 0 or 1.";
}
}
}
default "any";
description
"Allowed DEI values.";
}
}
}
}
}
uses bbf-classif:frame-destination-match-specific;
uses bbf-classif:ethertype-match-no-default;
uses bbf-classif:protocol-match-specific;
uses bbf-classif:dscp-match-specific {
if-feature "dscp-match-criteria";
}
}
container exclude-criteria {
if-feature "bbf-subif-tag:exclude-criteria";
presence
"The presence of this container indicates that the profile
will be configured with exclude criteria.";
description
"Exclude criteria extend the match criteria defined within
the container 'match-criteria'. In other words, a frame
matches in the interface referencing this profile when it
matches the criteria defined in 'match-criteria' container
AND if it does not match the criteria defined in the
'exclude-criteria' container. A non-existing
'exclude-criteria' container means it does not provide
additional criteria and all frames match that part of the
classification.";
uses bbf-classif:frame-destination-match-specific;
uses bbf-classif:ethertype-match-no-default;
uses bbf-classif:protocol-match-specific;
uses bbf-classif:dscp-match-specific {
if-feature "dscp-match-criteria";
}
}
container ingress-rewrite {
presence
"The presence of this container indicates that ingress
frames will be subject to VLAN tag manipulations.";
description
"Ingress rewrite refers to the supported tag manipulations
before the frame is offered to a higher-layer interface or
to a forwarder.";
list copy-from-tags-to-marking-list {
key "tag-index";
description
"Input VLAN tag from which p-bits and/or DEI bits will be
preserved.";
leaf tag-index {
type bbf-classif:tag-index;
description
"Specifies from which input VLAN tag fields must be
copied to the frame's marking list.";
}
leaf pbit-marking-index {
type union {
type enumeration {
enum not-preserved {
description
"The p-bits are not preserved.";
}
}
type bbf-fpt:qos-pbit-marking-index;
}
default "not-preserved";
description
"Specifies the index of the frame's p-bit marking list
to which the p-bits shall be copied.";
}
leaf dei-marking-index {
type union {
type enumeration {
enum not-preserved {
description
"The DEI bit is not preserved.";
}
}
type bbf-fpt:qos-dei-marking-index;
}
default "not-preserved";
description
"Specifies the index of the frame's DEI marking list to
which the DEI bit shall be copied.";
}
}
uses bbf-fedit:pop-and-push-vlan-tags {
refine "push-tag" {
if-feature "bbf-fpprof:vlan-id-translation";
description
"Makes the push-tag data node feature dependent.";
}
refine "push-tag/pbit/write-pbit-value" {
if-feature "bbf-subif-tag:write-pbit-value-in-vlan-tag";
}
}
}
container egress-rewrite {
presence
"The presence of this container indicates that egress frames
will be subject to VLAN tag manipulations.";
description
"Egress refers to frames sent from the interface from which
this profile is referenced towards the the lower-layer in
the interface stack, i.e., in the direction of the physical
interface. Rewrite refers to the supported tag
manipulations.";
uses bbf-fedit:pop-and-push-vlan-tags-framework {
refine "pop-tags" {
if-feature "bbf-fpprof:vlan-id-translation";
description
"Makes the 'pop-tags' data node feature dependent.";
}
refine "push-tag/pbit/write-pbit-value" {
if-feature "bbf-subif-tag:write-pbit-value-in-vlan-tag";
}
augment "push-tag" {
description
"Augments data nodes that provide values to be set in
the frames' tag.";
leaf tag-type {
type union {
type bbf-dot1qt:dot1q-tag-type;
type bbf-dot1qt:ether-type;
type bbf-dot1qt:ether-type-hex;
type enumeration {
enum tag-type-from-match {
description
"The same value that is used in the
match-criteria tag's list element with the same
index is pushed into the frame.";
}
}
}
default "tag-type-from-match";
description
"VLAN tag type.";
}
leaf vlan-id {
type union {
type bbf-dot1qt:vlan-id-or-0;
type enumeration {
enum vlan-id-from-match {
description
"The same value that is used in the
match-criteria tag's list element with the same
index is pushed into the frame.";
}
}
}
default "vlan-id-from-match";
description
"The VLAN ID value to write in the sent frames'
identified VLAN tag.";
}
}
}
}
}
}
augment "/if:interfaces/if:interface/bbf-subif:frame-processing" {
description
"Augments the choice 'frame-processing' with an additional
case.";
case frame-processing-profile {
leaf frame-processing-profile {
type leafref {
path "/bbf-fpprof:frame-processing-profiles/bbf-fpprof:"
+ "frame-processing-profile/bbf-fpprof:name";
}
description
"A reference to a frame processing profile that contains
frame classification criteria.";
}
container tag-0 {
presence
"Indicates that the 'vlan-id' within the profile's match
criteria is configured to use a parameter defined outside
of the profile at the point the profile is referenced.";
description
"Match criteria for the outer VLAN tag of a frame that
overrules the match criteria provided through the
referenced profile.";
leaf vlan-id {
when '/bbf-fpprof:frame-processing-profiles/'
+ 'bbf-fpprof:frame-processing-profile[bbf-fpprof:'
+ 'name = current()/../../frame-processing-profile]/'
+ 'match-criteria/vlans/tag[index = 0]/vlan-id = '
+ '"vlan-id-is-a-parameter" ' {
description
"Only applicable when the 'vlan-id' within the profile's
match criteria is configured to use a parameter defined
outside of the profile at the point the profile is
referenced.";
}
type bbf-dot1qt:vlan-id-or-0;
mandatory true;
description
"Allowed VLAN ID.";
}
}
container tag-1 {
presence
"Indicates that the 'vlan-id' within the profile's match
criteria is configured to use a parameter defined outside
of the profile at the point the profile is referenced.";
description
"Match criteria for the inner VLAN tag of a frame that
overrules the match criteria provided through the
referenced profile.";
leaf vlan-id {
when '/bbf-fpprof:frame-processing-profiles/'
+ 'bbf-fpprof:frame-processing-profile[bbf-fpprof:'
+ 'name = current()/../../frame-processing-profile]/'
+ 'match-criteria/vlans/tag[index = 1]/vlan-id = '
+ '"vlan-id-is-a-parameter" ' {
description
"Only applicable when the 'vlan-id' within the profile's
match criteria is configured to use a parameter defined
outside of the profile at the point the profile is
referenced.";
}
type bbf-dot1qt:vlan-id-or-0;
mandatory true;
description
"Allowed VLAN ID.";
}
}
container ingress-rewrite-tag-0 {
if-feature "bbf-fpprof:vlan-id-translation";
presence
"Indicates that the 'vlan-id' within the profile's ingress
rewrite is configured to use a parameter defined outside of
the profile at the point the profile is referenced.";
description
"Frame field values to be put in the outer VLAN tag of a
frame that overrules the ingress rewrite data provided
through the referenced profile.";
leaf vlan-id {
when '/bbf-fpprof:frame-processing-profiles/'
+ 'bbf-fpprof:frame-processing-profile[bbf-fpprof:'
+ 'name = current()/../../frame-processing-profile]/'
+ 'ingress-rewrite/push-tag[index = 0]/vlan-id = '
+ '"vlan-id-is-a-parameter" ' {
description
"Only applicable when the 'vlan-id' within the profile's
ingress rewrite is configured to use a parameter
defined outside of the profile at the point the profile
is referenced.";
}
type bbf-dot1qt:vlan-id-or-0;
mandatory true;
description
"VLAN ID to be put in the VLAN tag that is pushed in the
frame.";
}
}
container ingress-rewrite-tag-1 {
if-feature "bbf-fpprof:vlan-id-translation";
presence
"Indicates that the 'vlan-id' within the profile's ingress
rewrite is configured to use a parameter defined outside of
the profile at the point the profile is referenced.";
description
"Frame field values to be put in the inner VLAN tag of a
frame that overrules the ingress rewrite data provided
through the referenced profile.";
leaf vlan-id {
when '/bbf-fpprof:frame-processing-profiles/'
+ 'bbf-fpprof:frame-processing-profile[bbf-fpprof:'
+ 'name = current()/../../frame-processing-profile]/'
+ 'ingress-rewrite/push-tag[index = 1]/vlan-id = '
+ '"vlan-id-is-a-parameter" ' {
description
"Only applicable when the 'vlan-id' within the profile's
ingress rewrite is configured to use a parameter
defined outside of the profile at the point the profile
is referenced.";
}
type bbf-dot1qt:vlan-id-or-0;
mandatory true;
description
"VLAN ID to be put in the VLAN tag that is pushed in the
frame.";
}
}
}
}
}