bbf-qos-policing

This module contains a collection of YANG definitions for supporting the Broadband Forum requirements on the management of Quali...

  • Version: 2023-12-15

    bbf-qos-policing@2023-12-15


    
      module bbf-qos-policing {
    
        yang-version 1.1;
    
        namespace
          "urn:bbf:yang:bbf-qos-policing";
    
        prefix bbf-qos-plc;
    
        import bbf-yang-types {
          prefix bbf-yang;
        }
        import bbf-qos-classifiers {
          prefix bbf-qos-cls;
        }
        import bbf-qos-policies {
          prefix bbf-qos-pol;
        }
        import bbf-qos-policing-types {
          prefix bbf-qos-plc-tp;
        }
        import bbf-dot1q-types {
          prefix bbf-dot1qt;
        }
        import bbf-qos-types {
          prefix bbf-qos-t;
        }
        import ietf-interfaces {
          prefix if;
        }
        import ietf-yang-types {
          prefix yang;
        }
        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 augments classifiers to manage the
         policing of flows.
    
         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>";
    
        }
    
    
        feature single-rate-two-color-marker {
          description
            "Indicates support of the single rate two color policer, also
           called single bucket policer.";
        }
    
        feature single-rate-three-color-marker {
          description
            "Indicates support of the single rate three color policer.";
        }
    
        feature single-rate-three-color-marker-color-mode {
          if-feature single-rate-three-color-marker;
          description
            "Indicates support of the configuration of a color mode for the
           single rate three color policer.";
        }
    
        feature two-rate-three-color-marker {
          description
            "Indicates support of the two rate three color policer.";
        }
    
        feature two-rate-three-color-marker-color-mode {
          if-feature two-rate-three-color-marker;
          description
            "Indicates support of the configuration of a color mode for the
           two rate three color policer.";
        }
    
        feature two-rate-three-color-marker-mef {
          description
            "Indicates support of the two rate three color policer.";
          reference
            "MEF 10.2 Section 7.11.1";
    
        }
    
        feature two-rate-three-color-marker-color-promotion {
          description
            "Indicates support of the two rate three color policer with
           color promotion.";
        }
    
        feature interface-policing-management {
          if-feature bbf-qos-pol:interface-policy-management;
          description
            "Indicates support of managing policing per interface.";
        }
    
        feature policing-statistics {
          description
            "Indicates support of reporting statistics associated with
           policing.";
        }
    
        feature counts-per-ingress-and-egress-color {
          if-feature policing-statistics;
          description
            "Indicates support of reporting byte and frame counts per
           ingress color and egress color.";
        }
    
        feature policing-action-profiles {
          description
            "Indicates support of policing action profiles.";
        }
    
        feature policing-action-in-policer {
          description
            "Indicates support of policing actions inline in the policer
           profile.";
        }
    
        identity policing {
          base bbf-qos-cls:action-type;
          description
            "The action-type identity indicating policing.";
        }
    
        identity flow-color {
          base bbf-qos-cls:action-type;
          description
            "The action-type identity indicating a flow class. This is a
           classification that can be assigned to a frame and multiple
           QoS decisions can be coupled to this action type.";
        }
    
        identity bac-color {
          base bbf-qos-cls:action-type;
          description
            "The action-type identity indicating the color used in the
           buffer acceptance control (BAC) process.";
        }
    
        identity discard {
          base bbf-qos-cls:action-type;
          description
            "The action-type identity indicating the discard action.";
        }
    
        typedef qos-color {
          type bbf-qos-t:qos-color;
          status deprecated;
          description
            "Defines a frame color for QoS.";
        }
    
        container policing-profiles {
          description
            "Configuration associated with policing profiles.";
          list policing-profile {
            key "name";
            description "A policing profile.";
            leaf name {
              type bbf-yang:string-ascii64;
              description
                "The name of the policing profile.";
            }
    
            leaf scope {
              type bbf-qos-cls:action-scope;
              description
                "Identifies the scope of the policer instance sharing is
               within Ethernet interface or VLAN sub-interface.";
            }
    
            choice policing-type {
              mandatory true;
              description
                "This defines the type of the policer.
    
               Note that a policer takes as input a stream of frames (the
               real frame possibly accompanied by meta data such as a
               color), then polices the stream according to the policer's
               configuration, and as a result assigns or modifies the
               color of the frames.
    
               The policer on its own does not take other actions on the
               frame. Taking further actions such as for example
               discarding the frame or assigning a DEI in the marking list
               is to be configured as another action.";
              case single-rate-two-color-marker-type {
                if-feature single-rate-two-color-marker;
                description
                  "This represents the policer type of single rate two color
                 marker.";
                container single-rate-two-color-marker {
                  description
                    "Single rate two color policer, also called single bucket
    policer.";
                  leaf cir {
                    type bbf-qos-plc-tp:information-rate;
                    description
                      "Committed Information Rate (CIR) is used to define the
    average rate of traffic that respect the guarantees of
    bandwidth. This traffic is defined as green traffic, and
    its transmission is guaranteed across the network.";
                  }
    
                  leaf cbs {
                    type bbf-qos-plc-tp:burst-size;
                    description
                      "Committed Burst Size (CBS) defines the amount of traffic
    that can be admitted above the CIR and is considered
    green. Traffic beyond the configured CIR and CBS is
    defined as red.";
                  }
                }  // container single-rate-two-color-marker
              }  // case single-rate-two-color-marker-type
    
              case single-rate-three-color-marker-type {
                if-feature single-rate-three-color-marker;
                description
                  "This represents the policer type of single rate three
                 color marker.";
                container single-rate-three-color-marker {
                  description
                    "Single rate three color policer.";
                  reference
                    "RFC 2697 Section 2";
    
                  leaf cir {
                    type bbf-qos-plc-tp:information-rate;
                    description
                      "Committed Information Rate (CIR) is used to define the
    average rate of traffic that respect the guarantees of
    bandwidth. This traffic is defined as green traffic, and
    its transmission is guaranteed across the network.";
                  }
    
                  leaf cbs {
                    type bbf-qos-plc-tp:burst-size;
                    description
                      "Committed Burst Size (CBS) defines the amount of traffic
    that can be admitted above the CIR and is considered
    green.";
                  }
    
                  leaf ebs {
                    type bbf-qos-plc-tp:burst-size;
                    description
                      "Excess Burst Size (EBS) defines the amount of excessive
    traffic that can be admitted above the CBS and is
    considered yellow.";
                  }
    
                  leaf color-mode {
                    if-feature bbf-qos-plc:single-rate-three-color-marker-color-mode;
                    type bbf-qos-plc-tp:color-mode;
                    description
                      "Configures the color mode of the policer. The color mode
    leaf indicates whether the color-aware or color-blind
    property is employed by the policer profile.
    
    The color mode applied in case the leaf is not configured
    is system dependent.";
                  }
                }  // container single-rate-three-color-marker
              }  // case single-rate-three-color-marker-type
    
              case two-rate-three-color-marker-type {
                if-feature two-rate-three-color-marker;
                description
                  "This represents the policer type of two rate three color
                 marker.";
                container two-rate-three-color-marker {
                  description
                    "Two rate three color policer.";
                  reference
                    "RFC 2698 Section 2";
    
                  leaf cir {
                    type bbf-qos-plc-tp:information-rate;
                    description
                      "Committed Information Rate (CIR) is used to define the
    average rate of traffic that respect the guarantees of
    bandwidth. This traffic is defined as green traffic, and
    its transmission is guaranteed across the network.";
                  }
    
                  leaf cbs {
                    type bbf-qos-plc-tp:burst-size;
                    description
                      "Committed Burst Size (CBS) defines the amount of traffic
    that can be admitted above the CIR and is considered
    green.";
                  }
    
                  leaf pir {
                    type bbf-qos-plc-tp:information-rate;
                    description
                      "Peak Information Rate (PIR) is used to define the average
    rate of traffic that is admitted in the network with the
    assurance that it will not be discarded directly by the
    policer, the traffic in excess to the green one can be
    discarded in case of congestion and is considered yellow.";
                  }
    
                  leaf pbs {
                    type bbf-qos-plc-tp:burst-size;
                    description
                      "Peak Burst Size (PBS) defines the amount of traffic that
    can be admitted above the PIR (burst) without being
    discarded directly by the policer (yellow).";
                  }
    
                  leaf color-mode {
                    if-feature bbf-qos-plc:two-rate-three-color-marker-color-mode;
                    type bbf-qos-plc-tp:color-mode;
                    description
                      "Configures the color mode of the policer. The color mode
    leaf indicates whether the color-aware or color-blind
    property is employed by the policer profile.
    
    The color mode applied in case the leaf is not configured
    is system dependent.";
                  }
                }  // container two-rate-three-color-marker
              }  // case two-rate-three-color-marker-type
    
              case two-rate-three-color-marker-mef-type {
                if-feature two-rate-three-color-marker-mef;
                description
                  "This represents the policer type of MEF standard.";
                container two-rate-three-color-marker-mef {
                  description
                    "MEF standard two rate three color policer.";
                  reference
                    "MEF 10.2 Section 7.11.1";
    
                  leaf cir {
                    type bbf-qos-plc-tp:information-rate;
                    description
                      "Committed Information Rate (CIR) is used to define the
    average rate of traffic that respect the guarantees of
    bandwidth. This traffic is defined as green traffic, and
    its transmission is guaranteed across the network.";
                  }
    
                  leaf cbs {
                    type bbf-qos-plc-tp:burst-size;
                    description
                      "Committed Burst Size (CBS) defines the amount of traffic
    that can be admitted above the CIR and is considered
    green.";
                  }
    
                  leaf eir {
                    type bbf-qos-plc-tp:information-rate;
                    description
                      "Excess Information Rate (EIR) is used to define how much
    traffic exceeding the CIR can be admitted in the network
    with the assurance that it will not be discarded directly
    by the policer, this traffic can be discarded in case of
    congestion and is considered yellow.";
                  }
    
                  leaf ebs {
                    type bbf-qos-plc-tp:burst-size;
                    description
                      "Excess Burst Size (EBS) defines the amount of excessive
    traffic that can be admitted above the EIR without being
    discarded directly by the policer (yellow).";
                  }
    
                  leaf couple-flag {
                    type bbf-qos-plc-tp:coupling-flag;
                    description
                      "The Coupling Flag CF controls the volume of the frames
    that are declared Yellow.
    
    When the CF is set to 0, the long term average rate of
    service frames that are declared yellow is bound by the
    Excess Information Rate (EIR) which is then the equivalent
    of the Peak Information Rate (PIR).
    
    When the CF is set to 1, the long term average rate of
    service frames that are declared yellow is bound by the sum
    of the Committed Information Rate (CIR) and Excess
    Information Rate (EIR), i.e., CIR+EIR, depending on the
    volume of offered service frames that are declared green.
    
    This sum is also the equivalent of the Peak Information
    Rate (PIR).";
                  }
    
                  leaf color-mode {
                    type bbf-qos-plc-tp:color-mode;
                    description
                      "Configures the color mode of the policer. The color mode
    leaf indicates whether the color-aware or color-blind
    property is employed by the policer profile.
    
    The color mode applied in case the leaf is not configured
    is system dependent.";
                  }
                }  // container two-rate-three-color-marker-mef
              }  // case two-rate-three-color-marker-mef-type
    
              case two-rate-three-color-marker-color-promotion-type {
                if-feature two-rate-three-color-marker-color-promotion;
                description
                  "This represents the policer type of two rate three color
                 with color promotion.";
                container two-rate-three-color-marker-color-promotion {
                  description
                    "Two rate three color policer with color promotion. This
    policer behaves similar to the
    'two-rate-three-color-marker-mef' policer with 'color-mode'
    equal to 'color-aware' and 'couple-flag' set to 1 albeit with
    one exception.
    
    If the CIR is not fully utilized with green traffic, yellow
    traffic entering the policer may be promoted to green in
    order to satisfy a Service Level Agreement (SLA) which may
    guarantee a certain CIR.";
                  leaf cir {
                    type bbf-qos-plc-tp:information-rate;
                    description
                      "Committed Information Rate (CIR) is used to define the
    average rate of traffic that respect the guarantees of
    bandwidth. This traffic is defined as green traffic its
    transmission is guaranteed across the network.";
                  }
    
                  leaf cbs {
                    type bbf-qos-plc-tp:burst-size;
                    description
                      "Committed Burst Size (CBS) defines the amount of traffic
    that can be admitted above the CIR and is considered
    green.";
                  }
    
                  leaf eir {
                    type bbf-qos-plc-tp:information-rate;
                    description
                      "Excess Information Rate (EIR) is used to define how much
    traffic exceeding the CIR can be admitted in the network
    with the assurance that it will not be discarded directly
    by the policer, this traffic can be discarded in case of
    congestion and is considered yellow.";
                  }
    
                  leaf ebs {
                    type bbf-qos-plc-tp:burst-size;
                    description
                      "Excess Burst Size (EBS) defines the amount of excessive
    traffic that can be admitted above the EIR without being
    discarded directly by the policer (yellow).";
                  }
                }  // container two-rate-three-color-marker-color-promotion
              }  // case two-rate-three-color-marker-color-promotion-type
            }  // choice policing-type
    
            leaf policing-action-profile {
              if-feature bbf-qos-plc:policing-action-profiles;
              if-feature policing-action-in-policer;
              type leafref {
                path "/bbf-qos-plc:policing-action-profiles/bbf-qos-plc:policing-action-profile/bbf-qos-plc:name";
              }
              description
                "The name of the referenced policing action profile.";
            }
    
            container hierarchical-policing {
              description
                "Hierarchical policing is the concept in which frames are
               evaluated against multiple policers. These multiple
               policers encompass one another. In other words, traffic
               processed in the scope of a first policer is also processed
               in the scope of a second policer.";
              leaf policing-profile {
                type leafref {
                  path "/bbf-qos-plc:policing-profiles/bbf-qos-plc:policing-profile/bbf-qos-plc:name";
                }
                description
                  "The name of the referenced policing profile.";
              }
            }  // container hierarchical-policing
          }  // list policing-profile
        }  // container policing-profiles
    
        container policing-action-profiles {
          if-feature bbf-qos-plc:policing-action-profiles;
          description
            "Provides data nodes to manage a set of actions together as a
           profile.
    
           All actions within the profile are independent of each other
           and are not overlapping.";
          list policing-action-profile {
            key "name";
            description
              "A policing action profile.";
            leaf name {
              type bbf-yang:string-ascii64;
              description
                "The name of a policing action profile.";
            }
    
            list action {
              key "flow-color";
              description
                "Configuration of actions per flow color.
    
               The absence of configuration for a particular color has a
               color dependent meaning:
               - green or yellow: the frame continues further processing,
                 without being subject to immediate actions,
               - red: the frame will be discarded.";
              leaf flow-color {
                type bbf-qos-t:qos-color;
                description
                  "The frames that have this flow color will be subject to
                 the actions configured in the referenced profile.";
              }
    
              choice action {
                description
                  "Choice of the set of actions.";
                case assign-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
    
                  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
    
                  leaf bac-color {
                    type bbf-qos-cls:write-bac-color;
                    description
                      "Defines the frame color for color aware BAC
                     queuing.";
                  }
                }  // case assign-metadata
                leaf discard {
                  type empty;
                  description
                    "Defines that the frame shall be discarded.";
                }
              }  // choice action
            }  // list action
          }  // list policing-action-profile
        }  // container policing-action-profiles
      }  // module bbf-qos-policing
    

© 2023 YumaWorks, Inc. All rights reserved.