netconfcentral logo

ieee802-dot1q-stream-filters-gates@2020-02-15



  module ieee802-dot1q-stream-filters-gates {

    yang-version 1.1;

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

    prefix sfsg;

    import ieee802-dot1q-bridge {
      prefix dot1q;
    }

    organization "IEEE 802.1 Working Group";

    contact
      "WG-URL: https://1.ieee802.org/
    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
            Piscataway
            NJ 08855
            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.";

    revision "2020-02-15" {
      description
        "Initial revision from IEEE P802.1Qcr.";
      reference
        "IEEE Std 802.1Qcr-2020";

    }


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

    }

    typedef priority-spec-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 "wildcard value";
        }
      }
    }

    typedef ipv-spec-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 "null" {
          value 8;
          description "null value";
        }
      }
      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 the frame 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
        "8.6.5.2 of IEEE Std 802.1Qcr-2020";

    }

    typedef gate-state-value-type {
      type enumeration {
        enum "closed" {
          value 0;
          description "Gate closed";
        }
        enum "open" {
          value 1;
          description "Gate open";
        }
      }
      description
        "The gate-state-value-type indicates a gate state, open or closed,
      for the stream gate.";
      reference
        "12.31.3.2.1 of IEEE Std 802.1Qcr-2020";

    }

    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
        "Augments the Bridge component with stream filters and stream gates.";
      container stream-filters {
        description
          "This container encapsulates all nodes related to stream bilters.";
        reference
          "12.31.1 of IEEE Std 802.1Qcr-2020
          12.31.2 of IEEE Std 802.1Qcr-2020
          12.31.3 of IEEE Std 802.1Qcr-2020";

        list stream-filter-instance-table {
          key "stream-filter-instance-id";
          description
            "Each list entry contains a set of parameters that defines a
          single stream filter (8.6.5.1) with associated maximum SDU size
          filtering (8.6.5.3.1), as detailed in Table 12-32. Entries 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 list, the frame is
          processed as if stream filters and stream gates would not be
          supported.";
          reference
            "12.31.2 of IEEE Std 802.1Qcr-2020";

          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
              "12.31.2.1 of IEEE Std 802.1Qcr-2020";

          }

          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 wildcard value, which matches any frame";
            reference
              "12.31.2.2 of IEEE Std 802.1Qcr-2020";

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

          leaf priority-spec {
            type priority-spec-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 wildcard value, which matches any priority.";
            reference
              "12.31.2.3 of IEEE Std 802.1Qcr-2020";

          }

          leaf max-sdu-size {
            type uint32;
            units "octets";
            mandatory true;
            description
              "The allowed maximum SDU size, in octets. If set to 0, any SDU
            size is accepted.";
            reference
              "8.6.5.3.1 of IEEE Std 802.1Qcr-2020";

          }

          leaf stream-blocked-due-to-oversize-frame-enabled {
            type boolean;
            default "false";
            description
              "A value of true indicates that
            stream-blocked-due-to-oversize-frame is set to true as soon as
            a frame exceeds max-sdu-size.";
            reference
              "8.6.5.3.1 of IEEE Std 802.1Qcr-2020";

          }

          leaf stream-blocked-due-to-oversize-frame {
            type boolean;
            default "false";
            description
              "Indicates by value true that frames are permanently discarded
            as a result of an initial frame exceeding max-sdu-size. The
            value of stream-blocked-due-to-oversize-frame can be
            administratively reset to false.";
            reference
              "8.6.5.3.1 of IEEE Std 802.1Qcr-2020";

          }

          leaf stream-gate-ref {
            type stream-gate-ref;
            mandatory true;
            description
              "This node refers to 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
              "12.31.2.4 of IEEE Std 802.1Qcr-2020";

          }
        }  // 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
            "12.31.1.1 of IEEE Std 802.1Qcr-2020
            8.6.5.1 of IEEE Std 802.1Qcr-2020";

        }
      }  // 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
            "Each list entry contains a set of parameters that defines a
          single stream gate (8.6.5.2), as detailed in Table 12-33. Entries
          in the table can be created or removed dynamically in
          implementations that support dynamic configuration of stream
          gates.";
          reference
            "12.31.3 of IEEE Std 802.1Qcr-2020";

          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
              "12.31.2.4 of IEEE Std 802.1Qcr-2020
              8.6.5.3 of IEEE Std 802.1Qcr-2020
              8.6.5.4 of IEEE Std 802.1Qcr-2020";

          }

          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
              "8.6.9.4.14 of IEEE Std 802.1Q-2018";

          }

          leaf admin-gate-states {
            type gate-state-value-type;
            default "open";
            description
              "The administratively set gate state of this gate.";
            reference
              "12.31.3.2.1 of IEEE Std 802.1Qcr-2020
              8.6.10.4 of IEEE Std 802.1Qcr-2020";

          }

          leaf admin-ipv {
            type ipv-spec-type;
            default "null";
            description
              "The administratively set internal priority value
            specification.";
            reference
              "12.31.3.3 of IEEE Std 802.1Qcr-2020
              8.6.10.6 of IEEE Std 802.1Qcr-2020
              8.6.5.4 of IEEE Std 802.1Qcr-2020";

          }
        }  // 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
            "12.31.1.2 of IEEE Std 802.1Qcr-2020";

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