This module contains a collection of YANG definitions for supporting the Broadband Forum requirements on the management of Quali...
Version: 2023-12-15
module bbf-qos-classifiers { yang-version 1.1; namespace "urn:bbf:yang:bbf-qos-classifiers"; prefix bbf-qos-cls; import ietf-inet-types { prefix inet; } import bbf-yang-types { prefix bbf-yang; } import bbf-dot1q-types { prefix bbf-dot1qt; } import bbf-frame-classification { prefix bbf-classif; } import bbf-qos-types { prefix bbf-qos-t; } import bbf-frame-processing-types { prefix bbf-fpt; } 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:help@broadband-forum.org>. 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 Quality of Service (QoS) 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 a collection of classifiers that can be used to classify frames and assign actions to be applied to those frames. 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>"; } revision "2020-10-13" { description "Amendment 3. * Approval Date: 2020-10-13. * Publication Date: 2020-10-13."; reference "TR-383a3: Common YANG Modules <https://www.broadband-forum.org/technical/download/ TR-383_Amendment-3.pdf>"; } revision "2018-07-13" { description "Amendment 1. * Approval Date: 2018-06-04. * Publication Date: see revision date above."; reference "TR-383: Common YANG Modules <https://www.broadband-forum.org/technical/download/ TR-383_Amendment-1.pdf>"; } revision "2017-05-08" { description "Initial revision. * Approval Date: see revision date above. * Publication Date: 2017-06-02."; reference "TR-383: Common YANG Modules <https://www.broadband-forum.org/technical/download/ TR-383.pdf>"; } feature qos-action-permit { description "This feature indicates whether the system supports the action 'permit' for frames that are classified using a QoS classification mechanism."; } feature qos-configurable-defaults { description "This feature indicates whether the configuration of QoS default behaviors is supported."; } feature preserve-pbit-dei-from-frame-to-metadata { description "Indicates support for preserving p-bits and DEI fields from the frame into metadata."; } feature qos-bac-color-from-flow-color { description "Indicates support for copying the flow color into the Buffer Acceptance Control (BAC) color."; } typedef qos-pbit-marking-index { type bbf-fpt:qos-pbit-marking-index; status deprecated; description "An index to a Priority Code Point bits (p-bits) marking list. The marking list is a piece of metadata, i.e., it is data that belongs to the frame but is not a field of the frame itself. Once assigned to the frame, the metadata travels with the frame until the frame is transmitted or discarded. This is independent of all frame manipulations that take place prior to the final egress rewrite. The content of this marking list is generated via a QoS profile or via a copy from the frame's p-bits in a VLAN sub-interface ingress rewrite. Note that a frame has just one p-bits marking list, i.e., if multiple actions write to the same position in the list, then the last write overwrites the previous. As an example, it is possible to provide a metadata p-bits to a frame at the ingress side, this data travels with the frame through the switch, and the metadata is used at the egress side when a VLAN tag is pushed into the frame."; } typedef qos-dei-marking-index { type bbf-fpt:qos-dei-marking-index; status deprecated; description "An index to a Drop Eligibility Indicator (DEI) marking list. The marking list is a piece of metadata, i.e., it is data that belongs to the frame but is not a field of the frame itself. Once assigned to the frame, the metadata travels with the frame until the frame is transmitted or discarded. This is independent of all frame manipulations that take place prior to the final egress rewrite. The content of this marking list is generated via a QoS profile or via a copy from the frame's DEI in a VLAN sub-interface ingress rewrite. Note that a frame has just one DEI marking list, i.e., if multiple actions write to the same position in the list, then the last write overwrites the previous. As an example, it is possible to provide a metadata DEI to a frame at the ingress side, this data travels with the frame through the switch, and the metadata is used at the egress side when a VLAN tag is pushed into the frame."; } typedef write-bac-color { type union { type bbf-qos-t:qos-color; type enumeration { enum "copy-from-flow-color" { value 0; description "The BAC color of a frames is the same as its flow color."; } } } description "The BAC color to be written. Either this is a specific BAC color value, or it indicates where to take the BAC color from."; } identity classifier-entry-filter-operation-type { description "Classifier entry filter logical operation."; } identity match-any-filter { base classifier-entry-filter-operation-type; description "Classifier entry filter logical OR operation."; } identity match-all-filter { base classifier-entry-filter-operation-type; description "Classifier entry filter logical AND operation."; } identity action-type { description "This base identity type defines action-types."; } identity pbit-marking { base action-type; description "The action-type identity indicating the system shall generate one or more values for the priority bits (p-bits)."; } identity dei-marking { base action-type; description "The action-type identity indicating the system shall generate one or more values for the Drop Eligibility Indicator (DEI) bit."; } identity scheduling-traffic-class { base action-type; description "The action-type identity indicating a scheduling traffic class."; } identity dscp-marking { base action-type; description "The action-type identity indicating the system shall generate a value for the Differentiated Services Code Point (DSCP) bits."; } identity permit { base action-type; description "The action-type identity indicating the permit action. In other words, frames to which this action is assigned are permitted and will be subject to the next step of frame processing where further actions can be assigned."; } identity action-scope { description "This base identity type defines action scopes."; } identity vlan-sub-interface { base action-scope; description "The scope of the action is the VLAN sub-interface."; } identity ethernet-interface { base action-scope; description "The scope of the action is the Ethernet-like interface. This encompasses all VLAN sub-interfaces within the Ethernet-like interface in scope."; } typedef action-scope { type identityref { base action-scope; } description "The scope of the action."; } typedef qos-color { type bbf-qos-t:qos-color; status deprecated; description "Defines a frame color for QoS."; } grouping pbit-marking { description "Nodes used to define a list of p-bits metadata."; list pbit-marking-list { key "index"; description "Creates metadata which can be used to determine values of the p-bits to write to a VLAN tag or as match criteria for another classifier associated with another QoS policy with which the frame is to be processed. Each entry uses a unique numeric index associated with a value of the p-bits."; leaf index { type bbf-fpt:qos-pbit-marking-index; description "The index associated with a value of the p-bits."; } leaf pbit-value { type bbf-dot1qt:pbit; description "A value of the p-bits to be inserted in the p-bits of a frame's VLAN tag or as match criteria for another classifier associated with another QoS policy with which the frame is to be processed."; } leaf pbit-from-frame-tag { if-feature preserve-pbit-dei-from-frame-to-metadata; type bbf-fpt:tag-index; must "not(boolean(../pbit-value))" { error-message "The leaf 'pbit-from-frame-tag' cannot be configured when the leaf 'pbit-value' is configured."; description "Ensure that the leaf 'pbit-value' is not present when the leaf 'pbit-from-frame-tag' is present, and vice versa."; } description "Indicates that frames will get a metadata value of the p-bits by copying a value of the p-bits from a frame's VLAN tag. The VLAN tag from which to copy the value of the p-bits is identified by the value of this leaf."; } } // list pbit-marking-list } // grouping pbit-marking grouping dei-marking { description "Nodes used to define a list of DEI metadata."; list dei-marking-list { key "index"; description "Creates metadata which can be used to determine DEI values to write to a VLAN tag or as match criteria for another classifier associated with another QoS policy with which the frame is to be processed. Each entry uses a unique numeric index associated with a DEI value."; leaf index { type bbf-fpt:qos-dei-marking-index; description "The index associated with a DEI value."; } leaf dei-value { type bbf-dot1qt:dei; description "A DEI value to be inserted in the DEI bit of a frame's VLAN tag or as match criteria for another classifier associated with another QoS policy with which the frame is to be processed."; } leaf dei-from-frame-tag { if-feature preserve-pbit-dei-from-frame-to-metadata; type bbf-fpt:tag-index; must "not(boolean(../dei-value))" { error-message "The leaf 'dei-from-frame-tag' cannot be configured when the leaf 'dei-value' is configured."; description "Ensure that the leaf 'dei-value' is not present when the leaf 'dei-from-frame-tag' is present, and vice versa."; } description "Indicates that frames will get a metadata DEI value by copying a DEI value from a frame's VLAN tag. The VLAN tag from which to copy the DEI value is identified by the value of this leaf."; } } // list dei-marking-list } // grouping dei-marking grouping in-pbit-list { description "Ingress Priority Bits (p-bits) configuration."; leaf in-pbit-list { type bbf-dot1qt:pbit-list; description "Filter containing value(s) of the p-bits to be matched with the value of the corresponding frame field. The list of values form an OR condition: in case the value of the frame field matches with one of the values of the leaf then there is a match. In case the leaf specifies a set of values and none of them appear in the frame, then there is no match. In case the leaf specifies a value for a frame field that is not present, then no frames match the filter. For example, an untagged frame does not contain p-bits, hence this frame will not match a specified value of the p-bits. In case the leaf is an empty list, or not configured, then no match is required and all frames classify the filter, including untagged frames. An Ethernet frame can contain multiple VLAN tags or no VLAN tag. The 'vlan-tag-match-type/vlan-tagged/tag' is a list and the element with index 0 is used to match with the p-bits of outermost VLAN tag of the frame, the element with index 1 is used to match with the p-bits of the second VLAN tag of the frame."; } } // grouping in-pbit-list grouping in-dei { description "Ingress Drop Eligible Indicator (DEI) configuration."; leaf in-dei { type uint8 { range "0..1"; } description "Filter containing DEI bit value(s) to be matched with the values of the corresponding frame fields. In case the leaf specifies a value for a frame field that is not present, then no frames match the filter. For example, an untagged frame does not contain a DEI bit, hence this frame will not match a specified DEI bit value. In case the leaf is not configured, no match is required and all frames classify the filter, including untagged frames. An Ethernet frame can contain multiple VLAN tags or no VLAN tag. The 'vlan-tag-match-type/vlan-tagged/tag' is a list and the element with index 0 is used to match with the DEI bit of the outermost VLAN tag of the frame, the element with index 1 is used to match with the DEI bit of the second VLAN tag of the frame."; } } // grouping in-dei grouping dscp-marking { description "DSCP marking grouping."; leaf dscp { type inet:dscp; description "The value to be inserted in the DSCP field in the header of an IP packet."; } } // grouping dscp-marking grouping classifier-entry-inline-attr { description "Classifier inline attributes."; container match-criteria { status deprecated; description "Filter operations are performed on all match criteria with each having a default configuration. The 'match-all-filter' operation will logically AND each of the criteria. For example, configuring 'match-all' and dscp-range to 'any' will match on tagged and untagged frames that contain a DSCP field and contain any protocol as the default configuration for the protocol is 'any-protocol'. The 'match-any-filter' operation will logically OR each of the configured criteria. For example, configuring 'untagged' and dscp-range to '10-20' will match on all untagged frames as well as any IP packet containing a DSCP value of 10 to 20 as well as frames containing any protocol as the default configuration for the protocol is 'any-protocol'."; choice vlan-tag-match-type { status deprecated; description "Provides a choice of how the frames may be matched. If no case is configured, then it has the same meaning as if case 'match-all' has been configured."; case match-all { status deprecated; leaf match-all { type empty; status deprecated; description "Matches all traffic, i.e; irrespective of the frame being tagged or untagged."; } } // case match-all case untagged { status deprecated; leaf untagged { type empty; status deprecated; description "Untagged match. Matches all untagged traffic."; } } // case untagged case vlan-tagged { status deprecated; list tag { key "index"; min-elements 1; max-elements 2; status deprecated; description "The tags to match, with the outermost tag to match assigned index 0."; leaf index { type bbf-fpt:tag-index; must "count(../../tag[index = 0]) > 0" { error-message "An inner tag can only be matched on when also matching on an outer tag."; description "Only allow matching on an inner tag, if also matching on the outer tags at the same time."; } status deprecated; description "The index into the tag stack, outermost tag first."; } leaf in-pbit-list { type bbf-dot1qt:pbit-list; status deprecated; description "Filter containing value(s) of the p-bits to be matched with the value of the corresponding frame field. The list of values form an OR condition: in case the value of the frame field matches with one of the values of the leaf then there is a match. In case the leaf specifies a set of values and none of them appear in the frame, then there is no match. In case the leaf specifies a value for a frame field that is not present, then no frames match the filter. For example, an untagged frame does not contain p-bits, hence this frame will not match a specified value of the p-bits. In case the leaf 'in-pbit-list' is an empty list, or is not configured, then no match is required and all frames classify the filter, including untagged frames. An Ethernet frame can contain multiple VLAN tags or no VLAN tag. The 'vlan-tag-match-type/vlan-tagged/ tag' is a list and the element with index 0 is used to match with the p-bits of outermost VLAN tag of the frame, the element with index 1 is used to match with the p-bits of the second VLAN tag of the frame."; } leaf in-dei { type uint8 { range "0..1"; } status deprecated; description "Filter containing DEI bit value(s) to be matched with the values of the corresponding frame fields. In case the leaf specifies a value for a frame field that is not present, then no frames match the filter. For example, an untagged frame does not contain a DEI bit, hence this frame will not match a specified DEI bit value. In case the leaf is not configured, no match is required and all frames classify the filter, including untagged frames. An Ethernet frame can contain multiple VLAN tags or no VLAN tag. The 'vlan-tag-match-type/vlan-tagged/ tag' is a list and the element with index 0 is used to match with the DEI bit of the outermost VLAN tag of the frame, the element with index 1 is used to match with the DEI bit of the second VLAN tag of the frame."; } } // list tag } // case vlan-tagged } // choice vlan-tag-match-type leaf dscp-range { type bbf-classif:dscp-range-or-any; default "any"; status deprecated; description "String identifying the DSCP values and/or range."; } choice protocols { status deprecated; description "The choice allows to specify combinations of frame field values that identify a particular protocol or allows to indicate any protocol. If no case is configured, then it has the same meaning as if case 'any-protocol' has been configured."; case any-protocol { status deprecated; leaf any-protocol { type empty; status deprecated; description "Identifies any protocol, i.e., not match is specified for any protocol."; } } // case any-protocol case protocol { status deprecated; leaf-list protocol { type bbf-classif:protocols; status deprecated; description "Defines the protocols which will be matched."; } } // case protocol } // choice protocols } // container match-criteria } // grouping classifier-entry-inline-attr grouping classifier-action-entry-cfg { description "List of actions to be applied to a classified set of frames."; list classifier-action-entry-cfg { key "action-type"; ordered-by user; description "Configuration of classifier associated actions."; leaf action-type { type identityref { base action-type; } description "This defines the action type."; } choice action-cfg-params { description "Choice of action types."; container pbit-marking-cfg { when "../action-type='bbf-qos-cls:pbit-marking'" { description "Only applicable when the action-type is 'pbit-marking'."; } description "P-bits marking configuration container."; uses pbit-marking; } // container pbit-marking-cfg container dei-marking-cfg { when "../action-type='bbf-qos-cls:dei-marking'" { description "Only applicable when the action-type is dei-marking."; } description "DEI marking configuration container."; uses dei-marking; } // container dei-marking-cfg container dscp-marking-cfg { when "../action-type='bbf-qos-cls:dscp-marking'" { description "Only applicable when the action-type is dscp-marking."; } description "DSCP marking configuration container."; uses dscp-marking; } // container dscp-marking-cfg leaf scheduling-traffic-class { when "../action-type= 'bbf-qos-cls:scheduling-traffic-class'" { description "Only applicable when the action-type is scheduling-traffic-class."; } type bbf-qos-t:traffic-class-id; description "Defines the traffic class for scheduling."; } case permit { if-feature bbf-qos-cls:qos-action-permit; description "The action type for frames matching a classification criterion is that they are permitted and will be subject to further processing."; leaf permit { when "../bbf-qos-cls:action-type="bbf-qos-cls:permit"" { description "Only applicable when the action-type is 'permit'."; } type empty; description "The action type for frames matching a classification criterion is 'permit'."; } } // case permit } // choice action-cfg-params } // list classifier-action-entry-cfg } // grouping classifier-action-entry-cfg grouping classifier-entry-ref { description "A reference to a classifier entry."; leaf name { type leafref { path "/bbf-qos-cls:classifiers/bbf-qos-cls:classifier-entry/bbf-qos-cls:name"; } description "The name of the referenced classifier entry."; } } // grouping classifier-entry-ref container classifiers { description "Provides data nodes that allow to manage methods to classify frames and assign actions in the context of QoS."; container system-default-actions { config false; description "Reports the set of system defaults that apply when the application of QoS policies does not generate such data, but the processing of a frame requires this data. When a frame is received or to be transmitted on an interface, then it can be subject to QoS policies that are configured for this interface. The definition of QoS policies includes the assignment of metadata to frames which can then be used during the further processing of the frame. An example is the assignment of a traffic class. This traffic class is used, after the forwarding decision has been made and all QoS polices are applied, to identify the queue on the outgoing interface. If a traffic class is not explicitly configured, a default must be used for each matched ingress frame. This value is reported in 'scheduling-traffic-class'. And similar for the other data nodes."; leaf scheduling-traffic-class { type union { type bbf-qos-t:traffic-class-id; type enumeration { enum "discard" { value 0; description "The traffic class 'discard' means that frames will not get a traffic class by default. When the processing of the frame comes to a moment that a traffic class is needed, and none is assigned through having applied the QoS profiles, then the system shall discard the frame."; } } } description "Defines the traffic class assigned by default to frames."; } leaf flow-color { type union { type bbf-qos-t:qos-color; type enumeration { enum "discard" { value 0; description "The flow color 'discard' means that frames will not get a flow color by default. When the processing of the frame comes to a moment that a flow color is needed, and none is assigned through having applied the QoS profiles, then the system shall discard the frame."; } } } description "Defines the frame's flow color for when color-aware classification and/or actions are needed in the processing of a frame."; } leaf bac-color { type union { type write-bac-color; type enumeration { enum "discard" { value 0; description "The BAC color 'discard' means that frames will not get a BAC color by default. When the processing of the frame comes to a moment that a BAC color is needed, and none is assigned through having applied the QoS profiles, then the system shall discard the frame."; } } } description "Defines the frame's BAC color for when color-aware classification and/or actions are needed in the processing of a frame. More specific, when the frame is to be queued using a color aware BAC method."; } } // container system-default-actions container configurable-default-actions { if-feature qos-configurable-defaults; description "Defines data nodes that allow to configure the default behavior for when the processing of a frame requires data, and the former applying of QoS policies did not generate such data. The configured defaults overrule the system defaults provide in the container 'system-default-actions'. More in detail, when a frame is received or to be transmitted on an interface, then it can be subject to QoS policies that are configured for this interface. The definition of QoS policies includes the assignment of metadata to frames which can then be used during the further processing of the frame. An example is the assignment of a traffic class. This traffic class is used, after the forwarding decision has been made and all QoS polices are applied, to identify the queue on the outgoing interface. If a traffic class is not explicitly configured, a default must be used for each matched ingress frame. This value is configured in 'scheduling-traffic-class'. And similar for the other data nodes."; leaf scheduling-traffic-class { type union { type bbf-qos-t:traffic-class-id; type enumeration { enum "discard" { value 0; description "The traffic class 'discard' means that frames will not get a traffic class by default. When the processing of the frame comes to a moment that a traffic class is needed, and none is assigned through having applied the QoS profiles, then the system shall discard the frame."; } } } description "Defines the traffic class assigned by default to frames."; } leaf flow-color { type union { type bbf-qos-t:qos-color; type enumeration { enum "discard" { value 0; description "The flow color 'discard' means that frames will not get a flow color by default. When the processing of the frame comes to a moment that a flow color is needed, and none is assigned through having applied the QoS profiles, then the system shall discard the frame."; } } } description "Defines the frame's flow color for when color-aware classification and/or actions are needed in the processing of a frame."; } leaf bac-color { type union { type write-bac-color; type enumeration { enum "discard" { value 0; description "The BAC color 'discard' means that frames will not get a BAC color by default. When the processing of the frame comes to a moment that a BAC color is needed, and none is assigned through having applied the QoS profiles, then the system shall discard the frame."; } } } description "Defines the frame's BAC color for when color-aware classification and/or actions are needed in the processing of a frame. More specific, when the frame is to be queued using a color aware BAC method."; } } // container configurable-default-actions list classifier-entry { key "name"; description "Classifier entry template."; leaf name { type bbf-yang:string-ascii64; description "Classifier name."; } leaf description { type bbf-yang:string-ascii64-or-empty; description "Description of the class template."; } leaf filter-operation { type identityref { base classifier-entry-filter-operation-type; } default "bbf-qos-cls:match-any-filter"; status deprecated; description "Filters are applicable as any or all filters."; } choice filter-method { description "Configuration of filter methods."; case inline { description "The classifier criteria are directly configured here."; uses classifier-entry-inline-attr { status deprecated; } } // case inline case all-packets { description "The classifier applies to all frames that are in the scope of the flow on which the classifier applies."; leaf all-packets { type empty; description "Identifies all frames."; } } // case all-packets } // choice filter-method uses classifier-action-entry-cfg; } // list classifier-entry } // container classifiers } // module bbf-qos-classifiers
© 2023 YumaWorks, Inc. All rights reserved.