From f238a8df49e3b84cb7d3ea8b718f095a53c550b5 Mon Sep 17 00:00:00 2001 From: Darren Loher Date: Mon, 7 Oct 2024 16:08:25 -0700 Subject: [PATCH 1/3] Add aft encapsulation-headers (#1153) * Add aft encap-headers container for specifying arbitrary stacks of packet header encapsulations * Add aft encap header containers for existing encaps (ip-in-ip and gre) * Add aft encap header containers for new encaps (mpls, udpv4, udpv6) --- release/models/aft/openconfig-aft-common.yang | 334 +++++++++++++++++- .../models/aft/openconfig-aft-ethernet.yang | 8 +- release/models/aft/openconfig-aft-ipv4.yang | 8 +- release/models/aft/openconfig-aft-ipv6.yang | 8 +- release/models/aft/openconfig-aft-mpls.yang | 8 +- release/models/aft/openconfig-aft-pf.yang | 8 +- .../aft/openconfig-aft-state-synced.yang | 8 +- release/models/aft/openconfig-aft-types.yang | 12 +- release/models/aft/openconfig-aft.yang | 8 +- 9 files changed, 381 insertions(+), 21 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index c69587e0f..50eac8d8f 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -23,7 +23,13 @@ submodule openconfig-aft-common { "Submodule containing definitions of groupings that are re-used across multiple contexts within the AFT model."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.7.0"; + + revision "2024-09-05" { + description + "Add encap-headers to AFT model."; + reference "2.7.0"; + } revision "2024-04-25" { description @@ -217,38 +223,212 @@ submodule openconfig-aft-common { container ip-in-ip { description - "When specified, the packet has an IP-in-IP header applied to it before - forwarding to the specified next-hop."; + "When specified, the packet has an IP-in-IP header applied to it + before forwarding to the specified next-hop. + + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; container state { config false; description "State parameters relating to IP-in-IP encapsulation."; - uses aft-common-entry-nexthop-ipip-state; + + uses aft-common-entry-nexthop-ip-state; } } container gre { description "When specified, the packet has an GRE - (Generic Routing Encapsulation)header applied to + (Generic Routing Encapsulation) header applied to it before forwarding to the specified next-hop. encapsulate-header leaf should be set to GRE for this - to apply"; + to apply. + + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; container state { config false; description "State parameters relating to GRE encapsulation."; + uses aft-common-entry-nexthop-gre-state; } } + container encap-headers { + description + "Container for packet encapsulation headers. When leaves in this + container are populated, it indicates encapsulation of the packet + matching the next-hop is performed using a stack of one or more + headers defined in the list encap-header. + + Each entry in the list must indicate an encapsulation type and + populate a container with the parameters for that encapsulation + header."; + + list encap-header { + description + "A list of headers added on top of a packet ordered by the + index value. The inner-most header is the 0th value and is + adjacent to the original packet. Additional headers may be + added in index order. + + For example, in an encapsulation stack for MPLS in UDPv4, the + first index in the list is the MPLS header and the second + index is a UDPv4 header."; + + key "index"; + + leaf index { + type leafref { + path "../state/index"; + } + description + "A unique index identifying an encapsulation header in a stack + of encapsulation headers."; + } + + container state { + description + "State parameters relating to encapsulation headers."; + + uses aft-common-nexthop-encap-headers-state; + } + + container gre { + when "../state/type = 'oc-aftt:GRE'"; + description + "Container of nodes for GRE encapsulation."; + + container state { + description + "State parameters relating to GRE encapsulation headers."; + + uses aft-common-entry-nexthop-gre-state; + } + } + + container ipv4 { + when "../state/type = 'oc-aftt:IPV4'"; + description + "Container of nodes for UDP in IPv4 encapsulation. When this + container is used, an IPv4 packet with no transport header + is added to the encapsulation list."; + + container state { + description + "State parameters relating to IP encapsulation headers."; + + uses aft-common-entry-nexthop-ip-state; + } + } + + container ipv6 { + when "../state/type = 'oc-aftt:IPV6'"; + description + "Container of nodes for UDP in IPv6 encapsulation. When this + container is used, an IPv6 packet with no transport header + is added to the encapsulation list."; + + container state { + description + "State parameters relating to IP encapsulation headers."; + + uses aft-common-entry-nexthop-ip-state; + } + } + + container mpls { + when "../state/type = 'oc-aftt:MPLS'"; + description + "Container of nodes for MPLS encapsulation."; + + container state { + description + "State parameters relating to MPLS encapsulation headers."; + + uses aft-common-entry-nexthop-mpls-state; + } + } + + container udp-v4 { + when "../state/type = 'oc-aftt:UDPV4'"; + description + "Container of nodes for UDP in IPv4 encapsulation. When this + container is used, an IPv4 header with a UDP header is added + to the encapsulation list."; + + container state { + description + "State parameters relating to UDP in IPv4 encapsulation + headers."; + + uses aft-common-entry-nexthop-encap-udp-state; + } + } + + container udp-v6 { + when "../state/type = 'oc-aftt:UDPV6'"; + description + "Container of nodes for UDP in IPv6 encapsulation. When this + container is used, an IPv6 header with a UDP header is added + to the encapsulation list."; + + container state { + description + "State parameters relating to UDP in IPv6 encapsulation + headers."; + + uses aft-common-entry-nexthop-encap-udp-state; + } + } + + container vxlan { + when "../state/type = 'oc-aftt:VXLAN'"; + description + "Container of nodes for VXLAN encapsulation."; + + container state { + description + "State parameters relating to VXLAN encapsulation headers."; + + uses aft-common-entry-nexthop-vxlan-state; + } + } + + } + } + uses oc-if:interface-ref-state; } } } + grouping aft-common-nexthop-encap-headers-state { + description + "Operational state parameters relating to encapsulation headers."; + + leaf index { + type uint8; + description + "A pointer to an entry in an ordered list of encapsulation headers."; + } + + leaf type { + type oc-aftt:encapsulation-header-type; + description + "Defines which type of packet header should be used."; + } + + } + grouping aft-common-entry-state { description "Operational state parameters relating to a forwarding entry"; @@ -294,14 +474,24 @@ submodule openconfig-aft-common { "Where applicable, the next hop label representing the virtual network identifier (VNI) for the forwarding entry. This leaf is applicable only to next-hops which include VXLAN encapsulation - header information"; + header information. + + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } leaf tunnel-src-ip-address { type oc-inet:ip-address; description "Where applicable this represents the vxlan tunnel source ip address. - For VXLAN this represents the source VTEP ip address"; + For VXLAN this represents the source VTEP IP address. + + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } } @@ -348,7 +538,7 @@ submodule openconfig-aft-common { default false; description "Flag that controls pop action, i.e., the top-most MPLS label - should be popped from the packet when switched by the system. + should be popped from the packet when switched by the system. The top-most MPLS label associated with pop action is equal to the label key used in 'mpls' AFT 'label-entry' list."; @@ -372,8 +562,12 @@ submodule openconfig-aft-common { system re-ordering of leaves is permitted by the system. A swap operation is reflected by entries in the - popped-mpls-label-stack and pushed-mpls-label-stack nodes."; + popped-mpls-label-stack and pushed-mpls-label-stack nodes. + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } leaf encapsulate-header { @@ -381,7 +575,12 @@ submodule openconfig-aft-common { description "When forwarding a packet to the specified next-hop the local system performs an encapsulation of the packet - adding the - specified header type."; + specified header type. + + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } leaf decapsulate-header { @@ -399,9 +598,9 @@ submodule openconfig-aft-common { uses aft-common-install-protocol; } - grouping aft-common-entry-nexthop-ipip-state { + grouping aft-common-entry-nexthop-ip-state { description - "IP-in-IP encapsulation applied on a next-hop"; + "IP encapsulation applied on a next-hop"; leaf src-ip { type oc-inet:ip-address; @@ -444,6 +643,115 @@ submodule openconfig-aft-common { } } + grouping aft-common-entry-nexthop-mpls-state { + description + "MPLS encapsulation of a packet."; + + leaf traffic-class { + type oc-mplst:mpls-tc; + description + "The value of the MPLS traffic class (TC) bits, formerly known as the + EXP bits."; + } + + leaf-list mpls-label-stack { + type oc-mplst:mpls-label; + ordered-by user; + description + "A stack of MPLS label values. The first entry in the list is the + label at the bottom of the stack. The bottom of the stack is adjacent + to the MPLS payload. + + For example, a packet with a label stack of two labels, the bottom + label being 42 and the top label being 8072 will be represented with + a leaf-list of [42, 8072]. The resulting packet, starting with the + beginning of the packet will be '[8072][42][Payload]'. + + Note: a swap operation is reflected by entries in the + popped-mpls-label-stack and the pushed-mpls-label-stack"; + } + } + + + grouping aft-common-entry-nexthop-encap-udp-state { + description + "UDP encapsulation applied on top of a packet."; + + leaf src-ip { + type oc-inet:ip-address; + description + "The source IP address for IP/UDP encapsulation."; + } + + leaf dst-ip { + type oc-inet:ip-address; + description + "Destination IP address for IP/UDP encapsulation."; + } + + leaf dscp { + type oc-inet:dscp; + description + "DSCP value to use for the UDP header of the encapsulated + packet."; + } + + leaf src-udp-port { + type oc-inet:port-number; + description + "Source UDP port number to use for the UDP header of the encapsulated + packet. The source UDP port should be derived from the payload + packet entropy. The exact methodology is implementation dependent, + but for example, the port could be derived from an entropy hash of + the payload or the source port (if present) of the payload."; + } + + leaf dst-udp-port { + type oc-inet:port-number; + description + "Source UDP port number to use for the UDP header of the encapsulated + packet. + + When the payload packet is MPLS, then RFC 7510 - Encapsulating MPLS + in UDP should be followed."; + reference + "RFC 7510 - Encapsulating MPLS in UDP specifies that 6635 must be + used for MPLS-in-UDP and 6636 must be used for MPLS-in-UDP with DTLS. + Because of this condition, no default is defined in OpenConfig. The + system is expected to utilize the appropriate port."; + } + + leaf ip-ttl { + type uint8; + description + "This leaf reflects the configured/default IP TTL value that is used + in the outer header during packet encapsulation. When this leaf is + not set, the TTL value of the inner packet is copied over as the + outer packet's IP TTL value during encapsulation."; + } + } + + grouping aft-common-entry-nexthop-vxlan-state { + description + "VXLAN encapsulation applied on top of a packet."; + + leaf vni-label { + type oc-evpn-types:evi-id; + description + "Where applicable, the next hop label representing the virtual + network identifier (VNI) for the forwarding entry. This leaf is + applicable only to next-hops which include VXLAN encapsulation + header information"; + } + + leaf tunnel-src-ip-address { + type oc-inet:ip-address; + description + "Where applicable this represents the vxlan tunnel source ip address. + For VXLAN this represents the source VTEP ip address"; + } + } + grouping aft-common-install-protocol { description "Grouping for a common reference to the protocol which diff --git a/release/models/aft/openconfig-aft-ethernet.yang b/release/models/aft/openconfig-aft-ethernet.yang index b2c0758df..3fbe6edab 100644 --- a/release/models/aft/openconfig-aft-ethernet.yang +++ b/release/models/aft/openconfig-aft-ethernet.yang @@ -20,7 +20,13 @@ submodule openconfig-aft-ethernet { "Submodule containing definitions of groupings for the abstract forwarding tables for Ethernet."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.7.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/aft/openconfig-aft-ipv4.yang b/release/models/aft/openconfig-aft-ipv4.yang index d582b2ad7..87fb7e6fa 100644 --- a/release/models/aft/openconfig-aft-ipv4.yang +++ b/release/models/aft/openconfig-aft-ipv4.yang @@ -20,7 +20,13 @@ submodule openconfig-aft-ipv4 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv4."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.7.0"; + + revision "2024-09-05" { + description + "Add encapsulate-stack under aft next-hops."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/aft/openconfig-aft-ipv6.yang b/release/models/aft/openconfig-aft-ipv6.yang index c8aede635..765830cd5 100644 --- a/release/models/aft/openconfig-aft-ipv6.yang +++ b/release/models/aft/openconfig-aft-ipv6.yang @@ -20,7 +20,13 @@ submodule openconfig-aft-ipv6 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv6."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.7.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/aft/openconfig-aft-mpls.yang b/release/models/aft/openconfig-aft-mpls.yang index 2418a5a9e..c99e1c58f 100644 --- a/release/models/aft/openconfig-aft-mpls.yang +++ b/release/models/aft/openconfig-aft-mpls.yang @@ -21,7 +21,13 @@ submodule openconfig-aft-mpls { "Submodule containing definitions of groupings for the abstract forwarding table for MPLS label forwarding."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.7.0"; + + revision "2024-09-05" { + description + "Add encapsulate-stack under aft next-hops."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/aft/openconfig-aft-pf.yang b/release/models/aft/openconfig-aft-pf.yang index 8f0d5a243..9980ad5f0 100644 --- a/release/models/aft/openconfig-aft-pf.yang +++ b/release/models/aft/openconfig-aft-pf.yang @@ -28,7 +28,13 @@ submodule openconfig-aft-pf { fields other than the destination address that is used in other forwarding tables."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.7.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/aft/openconfig-aft-state-synced.yang b/release/models/aft/openconfig-aft-state-synced.yang index 3e0950826..fbe6eb5ca 100644 --- a/release/models/aft/openconfig-aft-state-synced.yang +++ b/release/models/aft/openconfig-aft-state-synced.yang @@ -16,7 +16,13 @@ submodule openconfig-aft-state-synced { "Submodule containing definitions of groupings for the state synced signals corresponding to various abstract forwarding tables."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.7.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/aft/openconfig-aft-types.yang b/release/models/aft/openconfig-aft-types.yang index 4b7fc8f64..56d920b5f 100644 --- a/release/models/aft/openconfig-aft-types.yang +++ b/release/models/aft/openconfig-aft-types.yang @@ -16,7 +16,13 @@ module openconfig-aft-types { "Types related to the OpenConfig Abstract Forwarding Table (AFT) model"; - oc-ext:openconfig-version "1.1.0"; + oc-ext:openconfig-version "1.2.0"; + + revision "2024-07-18" { + description + "Add MPLS in UDP enums for encapsulate-header."; + reference "1.2.0"; + } revision "2022-05-05" { description @@ -89,6 +95,10 @@ module openconfig-aft-types { description "The encapsulation header is a VXLAN packet header"; } + enum UDP { + description + "The encapsulation header is UDP packet header."; + } } description "Types of tunnel encapsulation that are supported by systems as either diff --git a/release/models/aft/openconfig-aft.yang b/release/models/aft/openconfig-aft.yang index d1af3e977..de3ce202e 100644 --- a/release/models/aft/openconfig-aft.yang +++ b/release/models/aft/openconfig-aft.yang @@ -42,7 +42,13 @@ module openconfig-aft { is referred to as an Abstract Forwarding Table (AFT), rather than the FIB."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.7.0"; + + revision "2024-09-05" { + description + "Add encapsulate-stack under aft next-hops."; + reference "2.7.0"; + } revision "2024-04-25" { description From 868ab347282a6772921ba06df50c3a2be667ceb4 Mon Sep 17 00:00:00 2001 From: Ravi Verman <80886094+raviv-arista@users.noreply.github.com> Date: Tue, 8 Oct 2024 22:41:23 +0530 Subject: [PATCH 2/3] Added PIM bidirectional mode to the PIM_MODE type (#1118). (#1119) Co-authored-by: Darren Loher --- .../models/multicast/openconfig-pim-types.yang | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/release/models/multicast/openconfig-pim-types.yang b/release/models/multicast/openconfig-pim-types.yang index a1fc515cf..9e2aeac1c 100644 --- a/release/models/multicast/openconfig-pim-types.yang +++ b/release/models/multicast/openconfig-pim-types.yang @@ -21,7 +21,13 @@ module openconfig-pim-types { description "This module defines types related to the PIM protocol model."; - oc-ext:openconfig-version "0.1.1"; + oc-ext:openconfig-version "0.1.2"; + + revision "2024-05-31" { + description + "Add PIM bidirectional mode."; + reference "0.1.2"; + } revision "2018-11-21" { description @@ -62,6 +68,13 @@ module openconfig-pim-types { reference "RFC3973"; } + identity PIM_MODE_BIDIR { + base PIM_MODE; + description + "PIM bidirectional mode."; + reference "RFC5015"; + } + // typedef statements typedef dr-priority-type { From b0ef7797a2f04bd2b4fe89782c09a538c72c6e1b Mon Sep 17 00:00:00 2001 From: Eric Breverman Date: Tue, 15 Oct 2024 09:16:21 -0700 Subject: [PATCH 3/3] Define how physical channel power leaves are used. (#1189) Co-authored-by: Darren Loher --- .../openconfig-platform-transceiver.yang | 51 ++++++++++--------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/release/models/platform/openconfig-platform-transceiver.yang b/release/models/platform/openconfig-platform-transceiver.yang index 81a6e7031..e60220563 100644 --- a/release/models/platform/openconfig-platform-transceiver.yang +++ b/release/models/platform/openconfig-platform-transceiver.yang @@ -66,7 +66,13 @@ module openconfig-platform-transceiver { specify a physical-channel within a TRANSCEIVER component (i.e. gray optic) that it is associated with."; - oc-ext:openconfig-version "0.14.0"; + oc-ext:openconfig-version "0.15.0"; + +revision "2024-09-21" { + description + "Clearly define how physical channel power leaves are used."; + reference "0.15.0"; + } revision "2023-08-30" { description @@ -204,7 +210,11 @@ revision "2023-08-30" { Values include the instantaneous, average, minimum, and maximum statistics. If avg/min/max statistics are not supported, the target is expected to just supply the - instant value"; + instant value. In some cases, such as when the physical + channel has a leafref to an optical channel component and the + module-functional-type is TYPE_DIGITAL_COHERENT_OPTIC this + grouping will NOT be used as the data will be within the + optical-channel"; uses oc-types:avg-min-max-instant-stats-precision2-dBm; } @@ -221,7 +231,12 @@ revision "2023-08-30" { Values include the instantaneous, average, minimum, and maximum statistics. If avg/min/max statistics are not supported, the target is expected to just supply the - instant value"; + instant value. When the physical channel has a leafref to + an optical channel component and the module-functional-type is + TYPE_DIGITAL_COHERENT_OPTIC this represents the aggregate + total optical power value (signal and noise) whereas + optical power value within the optical-channel represents + the signal power"; uses oc-types:avg-min-max-instant-stats-precision2-dBm; } @@ -233,7 +248,11 @@ revision "2023-08-30" { with up to two decimal precision. Values include the instantaneous, average, minimum, and maximum statistics. If avg/min/max statistics are not supported, the target is - expected to just supply the instant value"; + expected to just supply the instant value. In some cases, + such as when the physical channel has a leafref to an optical + channel component and the module-functional-type is + TYPE_DIGITAL_COHERENT_OPTIC this grouping will NOT be used + as the data will be within the optical-channel"; uses oc-types:avg-min-max-instant-stats-precision2-mA; } @@ -251,7 +270,11 @@ revision "2023-08-30" { "The frequency in MHz of the individual physical channel (e.g. ITU C50 - 195.0THz and would be reported as 195,000,000 MHz in this model). This attribute is not - configurable on most client ports."; + configurable on most client ports In some cases, such as when + the physical channel has a leafref to an optical channel + component and the module-functional-type is + TYPE_DIGITAL_COHERENT_OPTIC this grouping will NOT be used + as the data will be within the optical-channel."; } } @@ -384,24 +407,6 @@ revision "2023-08-30" { uses oc-opt-types:avg-min-max-instant-stats-precision2-pct; } - uses physical-channel-state-extended { - when "../../../state/module-functional-type = 'oc-opt-types:TYPE_STANDARD_OPTIC'" { - description - "When the physical channel is of TYPE_STANDARD_OPTIC, the - extended state will be used"; - } - } - } - - grouping physical-channel-state-extended { - description - "Extended operational state data for physical client channels - for applications where the full physical channel config and - state are used. In some cases, such as when the physical - channel has a leafref to an optical channel component and the - module-functional-type is TYPE_DIGITAL_COHERENT_OPTIC this - grouping will NOT be used."; - uses output-optical-frequency; uses optical-power-state; }