netconfcentral logo

ieee802-dot1q-stream-filters-gates@2017-12-20



  module ieee802-dot1q-stream-filters-gates {

    yang-version 1;

    namespace
      'urn:ieee:std:802.1Q:yang:ieee802-dot1q-stream-filters-gates';

    prefix sfsg;

    import ieee802-dot1q-bridge {
      prefix dot1q;
    }

    organization
      "Institute of Electrical and Electronics Engineers";

    contact
      "WG-URL: http://grouper.ieee.org/groups/802/1/
    WG-EMail: stds-802-1@ieee.org
    Contact: IEEE 802.1 Working Group Chair
    Postal: C/O IEEE 802.1 Working Group
            IEEE Standards Association
            445 Hoes Lane
            P.O. Box 1331
            Piscataway
            NJ 08855-1331
            USA
    
    E-mail: STDS-802-1-L@LISTSERV.IEEE.ORG";

    description
      "This module provides management of 802.1Q bridge components that
    support Stream Filters and Stream Gates. This experimental YANG
    module is an individual contribution, does not represent a
    formally sanctioned YANG module of IEEE. Therefore, this YANG
    module will change in incompatible ways from its current revision
    to the formally published YANG module for IEEE Std 802.1Q.";

    revision "2017-12-20" {
      description
        "Initial module for Stream Filters and Stream Gates, as
      specified in IEEE 802.1Qci and IEEE 802.1Qcr.";
      reference
        "IEEE 802.1Q, IEEE 802.1Qci, IEEE 802.1Qcr";

    }


    feature closed-gate-state {
      description
        "The bridge component supports gate state closed.";
      reference
        "IEEE 802.1Qci
        IEEE 802.1Qcr";

    }

    typedef ipv-type {
      type enumeration {
        enum "zero" {
          value 0;
          description "Priority 0";
        }
        enum "one" {
          value 1;
          description "Priority 1";
        }
        enum "two" {
          value 2;
          description "Priority 2";
        }
        enum "three" {
          value 3;
          description "Priority 3";
        }
        enum "four" {
          value 4;
          description "Priority 4";
        }
        enum "five" {
          value 5;
          description "Priority 5";
        }
        enum "six" {
          value 6;
          description "Priority 6";
        }
        enum "seven" {
          value 7;
          description "Priority 7";
        }
        enum "wildcard" {
          value 8;
          description "No Priority";
        }
      }
      description
        "An IPV can be either of the following:
         1) The null value. For a frame that passes through the gate,
            the priority value associated with theframe is used to
            determine the frame’s traffic class, using the Traffic
            Class Table as specified in 8.6.6.
         2) An internal priority value. For a frame that passes
            through the gate, the IPV is used, in place of the
            priority value associated with the frame, to determine the
            frame’s traffic class, using the Traffic Class Table as
            specified in 8.6.6.";
      reference
        "IEEE 802.1Qci:
          Clause 8.6.5.1.2";

    }

    typedef gate-state-value-type {
      type enumeration {
        enum "open" {
          value 0;
          description "Gate open";
        }
        enum "closed" {
          value 1;
          description "Gate closed";
        }
      }
      description
        "The PSFPgateStatesValue indicates the desired gate state, open
      or closed, for the stream gate.";
      reference
        "IEEE 802.1Qci:
          Clause 12.31.3.2.1";

    }

    typedef stream-gate-ref {
      type leafref {
        path "/dot1q:bridges/dot1q:bridge/dot1q:component/sfsg:stream-gates/sfsg:stream-gate-instance-table/sfsg:stream-gate-instance-id";
      }
      description
        "This type is used to refer to a stream gate instance.";
    }

    augment /dot1q:bridges/dot1q:bridge/dot1q:component {
      description
        "Augment the Bridge component with Stream Filters and Stream
      Gates.";
      container stream-filters {
        description
          "This container encapsulates all nodes related to Stream
        Filters.";
        reference
          "IEEE 802.1Qci:
            Clause 12.31.1
            Clause 12.31.2";

        list stream-filter-instance-table {
          key "stream-filter-instance-id";
          description
            "There is one Stream Filter Instance Table per Bridge
          component. Each table row contains a set of parameters that
          defines a single Stream Filter (8.6.5.1), as detailed in
          Table 12-31. The table rows form an ordered list of filter
          instances, the order being determined by the
          StreamFilterInstance parameter. Tables can be created or
          removed dynamically in implementations that support dynamic
          configuration of Bridge components. Rows in the table can be
          created or removed dynamically in implementations that
          support dynamic configuration of stream filters. The value
          of the stream-handle-spec and priority-spec parameters
          associated with a received frame determine which stream
          filter is selected by the frame, and therefore what
          combination of filtering and policing actions is applied to
          the frame. If the stream-handle-spec and priority-spec
          parameters associated with a received frame match more than
          one stream filter, the stream filter that is selected is the
          one that appears earliest in the ordered list. If a received
          frame’s stream-handle-spec and priority-spec does not match
          any of the stream filters in the table, the frame is
          processed as would be the case if Stream Filters and Stream
          Gates was not supported.";
          reference
            "IEEE 802.1Qci:
              Clause 12.31.2
              Clause 8.6.5.1.1";

          leaf stream-filter-instance-id {
            type uint32;
            mandatory true;
            description
              "An integer index value that determines the place of the
            stream filter in the ordered list of stream filter
            instances. The values are ordered according to their
            integer value; smaller values appear earlier in the
            ordered list.";
            reference
              "IEEE 802.1Qci:
                Clause 12.31.2.1";

          }

          choice stream-handle-spec {
            description
              "The stream_handle specification data type allows either
            of the following to be represented:
             a) A stream_handle value, represented as an integer.
             b) The wild card value, which matches any frame";
            reference
              "IEEE 802.1Qci:
                Clause 12.31.2.2";

            leaf wildcard {
              type empty;
              description
                "The stream handle specification represents a wild
                card value.";
            }
            leaf stream-handle {
              type uint32;
              mandatory true;
              description
                "The stream handle specification refers to a
                stram_handle.";
            }
          }  // choice stream-handle-spec

          leaf priority-spec {
            type ipv-type;
            mandatory true;
            description
              "The priority specification data type allows either of the
            following to be represented:
             a) A priority value, represented as an integer.
             b) The wild card value, which matches any priority.";
            reference
              "IEEE 802.1Qci:
                Clause 12.31.2.3";

          }

          leaf stream-gate-ref {
            type stream-gate-ref;
            mandatory true;
            description
              "The StreamGateInstance parameter identifies the stream
            gate (12.31.3) that is associated with the stream filter.
            The relationship between stream filters and stream gates
            is many to one; a given stream filter can be associated
            with only one stream gate, but there can be multiple
            stream filters associated with a given stream gate.";
            reference
              "IEEE 802.1Qci:
                Clause 12.31.2.4";

          }

          list filter-specification-list {
            key "index";
            description
              "The filter specification list contains one or more filter
            specifications that are assigned with this stream filter.";
            reference
              "IEEE 802.1Qci:
                Clause 12.31.2.5";

            leaf index {
              type uint8;
              description
                "The index of this filter specification.";
            }

            choice filter-specification {
              description
                "The filter specification type, and its parameters.";
              reference
                "IEEE 802.1Qci:
                  Clause 12.31.2.5";

              case maximum-sdu-size {
                description
                  "Maximum SDU size filer";
                leaf maximum-sdu-size {
                  type uint32;
                  mandatory true;
                  description
                    "The allowed maximum SDU size, in octets.";
                }

                leaf stream-blocked-due-to-oversize-frame-enabled {
                  type boolean;
                  default "false";
                  description
                    "A value of TRUE indicates that the
                  StreamBlockedDueToOversizeFrame function is enabled;
                  a value of FALSE indicates that the
                  StreamBlockedDueToOversizeFrame function is
                  disabled. The default value of
                  StreamBlockedDueToOversizeFrameEnable is FALSE.";
                  reference
                    "IEEE 802.1Qci:
                      Clause 8.6.5.1
                      Clause 8.6.5.1.1";

                }

                leaf stream-blocked-due-to-oversize-frame {
                  type boolean;
                  default "false";
                  config false;
                  description
                    "If StreamBlockedDueToOversizeFrameEnable is TRUE, a
                  value of TRUE in StreamBlockedDueToOversizeFrame
                  indicates that all frames are to be dropped (i.e.,
                  the stream filter behaves as it would if the maximum
                  SDU size were to be set to 0 octets). If
                  StreamBlockedDueToOversizeFrame is FALSE, it has no
                  effect. The default value of
                  StreamBlockedDueToOversizeFrame is FALSE; if any
                  frame is discarded because it exceeds the Maximum
                  SDU size for the stream, then
                  StreamBlockedDueToOversizeFrame is set TRUE.";
                  reference
                    "IEEE 802.1Qci:
                      Clause 8.6.5.1
                      Clause 8.6.5.1.1";

                }
              }  // case maximum-sdu-size
            }  // choice filter-specification
          }  // list filter-specification-list
        }  // list stream-filter-instance-table

        leaf max-stream-filter-instances {
          type uint32;
          config false;
          description
            "The maximum number of Stream Filter instances supported by
          this Bridge component.";
          reference
            "IEEE 802.1Qci:
              Clause 12.31.1.1";

        }
      }  // container stream-filters

      container stream-gates {
        description
          "This container encapsulates all nodes related to Stream
        Gates.";
        list stream-gate-instance-table {
          key "stream-gate-instance-id";
          description
            "There is one Stream Gate Instance Table per Bridge
          component. Each table row contains a set of parameters that
          defines a single Stream Gate (8.6.5.1.2), as detailed in
          Table 12-32. Tables can be created or removed dynamically in
          implementations that support dynamic configuration of Bridge
          components. Rows in the table can be created or removed
          dynamically in implementations that support dynamic
          configuration of stream gates.";
          reference
            "IEEE 802.1Qci:
              Clause 12.31.3";

          leaf stream-gate-instance-id {
            type uint32;
            description
              "An integer table index that allows the stream gate to be
            referenced from Stream Filter Instance Table entries.";
            reference
              "IEEE 802.1Qci:
                Clause 8.6.5.1
                Clause 8.6.5.1.2";

          }

          leaf gate-enable {
            type boolean;
            default "false";
            description
              "A Boolean variable that indicates whether the operation
            of the state machines is enabled (TRUE) or disabled
            (FALSE). This variable is set by management. The default
            value of this variable is FALSE.";
            reference
              "IEEE 802.1Qbv:
                Clause 8.6.9.4.14";

          }

          leaf admin-gate-states {
            type gate-state-value-type;
            default "open";
            description
              "The administrative state associated with this gate, as
            set by the management.";
            reference
              "IEEE 802.1Qci:
                Clause 12.31.3.2.1
                Clause 8.6.10.4";

          }

          leaf admin-ipv {
            type ipv-type;
            default "wildcard";
            description
              "The administrative internal priority value specification.";
            reference
              "IEEE 802.1Qci:
                Clause 12.31.3.3
                Clause 8.6.10.6
                Clause 8.6.5.1.2";

          }
        }  // list stream-gate-instance-table

        leaf max-stream-gate-instances {
          type uint32;
          config false;
          description
            "The maximum number of Stream Gate instances supported by
          this Bridge component.";
          reference
            "IEEE 802.1Qci:
              Clause 12.31.1.2";

        }
      }  // container stream-gates
    }
  }  // module ieee802-dot1q-stream-filters-gates