This module contains a collection of YANG definitions for supporting the Broadband Forum requirements on the management of sub-i...
Version: 2023-12-15
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: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 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."; leaf untagged { type empty; description "Untagged match. Matches all untagged traffic."; } 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" { value 0; description "Priority-tagged frames are frames with a VLAN tag present and that match VLAN ID 0."; } enum "vlan-id-is-a-parameter" { value 1; 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" { value 0; 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" { value 0; description "Matches any Drop Eligible Indicator (DEI) value, i.e., value 0 or 1."; } } } default "any"; description "Allowed DEI values."; } } // list tag } // choice vlan-tag-match-type } // container vlans 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; } // container 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; } // container exclude-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" { value 0; 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" { value 0; 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."; } } // list copy-from-tags-to-marking-list 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 ingress-rewrite 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" { value 0; 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" { value 0; 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."; } } } } // container egress-rewrite } // list frame-processing-profile } // container frame-processing-profiles 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-0 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 tag-1 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-0 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."; } } // container ingress-rewrite-tag-1 } // case frame-processing-profile } } // module bbf-frame-processing-profiles
© 2024 YumaWorks, Inc. All rights reserved.