Interface MTU type adjustments and description updates#1469
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new YANG module, openconfig-if-types, which defines a max-frame-size typedef as a uint32. This new type is applied to the mtu leaf in openconfig-interfaces.yang, replacing the previous uint16 type to support larger MTU values for loopback and non-Ethernet interfaces, resulting in a major version bump to 4.0.0. Additionally, IPv6 MTU references in openconfig-if-ip.yang are updated to RFC 8200 and RFC 2675. Feedback was provided to include a meaningful description for the new openconfig-if-types module.
|
cc: @ElodinLaarz @dplore @rgwilton @jsterne for comment/review |
* (M) release/models/interfaces/openconfig-interfaces.yang
- Change interface MTU type from uint16 to max-frame-size (uint32)
- Increment to version 4.0.0
* (M) release/models/interfaces/openconfig-if-ip.yang
- Update IPv4/IPv6 MTU descriptions
- Increment to version 3.9.1
* (A) release/models/interfaces/openconfig-if-types.yang
- Initial version 0.1.0
- Introduction of max-frame-size typedef
|
Bumping for review - cc: @ElodinLaarz @dplore @rgwilton @jsterne |
|
What is the motivation to change this? Are there real operational use cases where uint16 is breaking? If there are, I think we have to introduce this as a non-breaking change. It is probably not practical to prove that making this change will affect real deployments. Conceptually this can break constraints for clients and servers: Client Constraints: Client applications that generate or validate configuration data strictly enforce YANG types. An older client might expect the value to fall within (0 \le x \le 65535). Upgrading the server schema can cause these clients to fail validation. Server/Device Implementation: On the backend, generated APIs or struct bindings (e.g., in C or Python) are tied to specific data types. A native 16-bit field in a driver or hardware is fundamentally changed to a 32-bit field, which requires software re-compilation and can disrupt encoding/decoding rules (like NETCONF/RESTCONF serialization). |
Motivation was discussed in our 2026-04-02 OC Community call w/ consensus to proceed w/ this PR from what is described in: #1449 Yes - type changes as such affect the cases you mention above, especially if client/servers (and other type aware downstream systems) are not in synchronization and any type change is backwards incompatible as such - blast radius can obviously differ. As we stand currently at |
|
A safer approach would be to follow the standard guidance to deprecate the existing and introduce a new leaf. Perhaps the new leaf name could be |
|
/gcbrun |
|
Major YANG version changes in commit 9fd8c62: |
We could most certainly take this approach but would like to solicit folks opinions here as to consistent nomenclature and how to reduce confusion between all List of |
|
OC review June 2nd. Thanks for looking into this. It would be better to follow this notion now onward so that our future changes are clear and concise and aligns to non breaking changes. |
Change Scope
Per discussion in the OC community call on 2026-04-02, this PR moves forward on
#1449.
max-frame-sizetypedef (uint32) in newopenconfig-if-types.yangwith L2 frame size semantics excluding FCS per IEEE802.3
mtuleaf type fromuint16tomax-frame-size(
openconfig-interfaces3.8.1->4.0.0)mtureferences from obsoleted RFC 2460 to RFC 8200, add RFC 2675(
openconfig-if-ip3.9.0->3.9.1)While this change is backwards incompatible per type changes, it is anticipated
that implementations and consumers can adjust to the larger space.
Platform Implementations
N/A
Tree View
module: openconfig-interfaces +--rw interfaces +--rw interface* [name] +--rw name -> ../config/name +--rw config | +--rw name? string | +--rw type identityref - | +--rw mtu? uint16 + | +--rw mtu? oc-ift:max-frame-size | +--rw loopback-mode? oc-opt-types:loopback-mode-type | +--rw description? string | +--rw enabled? boolean | +--rw oc-vlan:tpid? identityref | +--rw oc-if-sdn:forwarding-viable? boolean | +--rw oc-p4rt:id? uint32 | +--rw oc-hashing:hashing-policy? -> /oc-sys:system/hashing/hashing-policies/hashing-policy/name +--ro state | +--ro name? string | +--ro type identityref - | +--ro mtu? uint16 + | +--ro mtu? oc-ift:max-frame-size | +--ro loopback-mode? oc-opt-types:loopback-mode-type | +--ro description? string | +--ro enabled? boolean | +--ro ifindex? uint32 | +--ro admin-status enumeration | +--ro oper-status enumeration | +--ro last-change? oc-types:timeticks64 | +--ro logical? boolean | +--ro management? boolean | +--ro cpu? boolean | +--ro counters | | +--ro in-octets? oc-yang:counter64 | | +--ro in-pkts? oc-yang:counter64 | | +--ro in-unicast-pkts? oc-yang:counter64 | | +--ro in-broadcast-pkts? oc-yang:counter64 | | +--ro in-multicast-pkts? oc-yang:counter64 | | +--ro in-errors? oc-yang:counter64 | | +--ro in-discards? oc-yang:counter64 | | +--ro out-octets? oc-yang:counter64 | | +--ro out-pkts? oc-yang:counter64 | | +--ro out-unicast-pkts? oc-yang:counter64 | | +--ro out-broadcast-pkts? oc-yang:counter64 | | +--ro out-multicast-pkts? oc-yang:counter64 | | +--ro out-discards? oc-yang:counter64 | | +--ro out-errors? oc-yang:counter64 | | +--ro last-clear? oc-types:timeticks64 | | +--ro in-unknown-protos? oc-yang:counter64 | | +--ro in-fcs-errors? oc-yang:counter64 | | x--ro carrier-transitions? oc-yang:counter64 | | +--ro interface-transitions? oc-yang:counter64 | | +--ro link-transitions? oc-yang:counter64 | | +--ro resets? oc-yang:counter64 | +--ro oc-vlan:tpid? identityref | +--ro oc-atei:out-rate? oc-types:ieeefloat32 | +--ro oc-atei:in-rate? oc-types:ieeefloat32 | +--ro oc-if-sdn:forwarding-viable? boolean | +--ro oc-port:hardware-port? -> /oc-platform:components/component/name | +--ro oc-transceiver:transceiver? -> /oc-platform:components/component[oc-platform:name=current()/../oc-port:hardware-port]/oc-platform:subcomponents/subcomponent/name | +--ro oc-transceiver:physical-channel* -> /oc-platform:components/component[oc-platform:name=current()/../oc-transceiver:transceiver]/transceiver/physical-channels/channel/index | +--ro oc-p4rt:id? uint32 | +--ro oc-hashing:hashing-policy? -> /oc-sys:system/hashing/hashing-policies/hashing-policy/name +--rw hold-time | +--rw config | | +--rw up? uint32 | | +--rw down? uint32 | +--ro state | +--ro up? uint32 | +--ro down? uint32 +--rw penalty-based-aied | +--rw config @@ -13933,108 +13933,108 @@ | | +--ro key-type? identityref | | +--ro key-value? string | +--rw servers | +--rw server* [address] | +--rw address -> ../config/address | +--rw config | | +--rw address? oc-inet:host | | +--rw port? oc-inet:port-number | | +--rw version? uint8 | | +--rw association-type? enumeration | | +--rw iburst? boolean | | +--rw prefer? boolean | | +--rw network-instance? oc-ni:network-instance-ref | | +--rw source-address? oc-inet:ip-address | | +--rw key-id? -> ../../../../ntp-keys/ntp-key/key-id | +--ro state | +--ro address? oc-inet:host | +--ro port? oc-inet:port-number | +--ro version? uint8 | +--ro association-type? enumeration | +--ro iburst? boolean | +--ro prefer? boolean | +--ro network-instance? oc-ni:network-instance-ref | +--ro source-address? oc-inet:ip-address | +--ro key-id? -> ../../../../ntp-keys/ntp-key/key-id | +--ro stratum? uint8 | +--ro root-delay? int64 | +--ro root-dispersion? int64 | +--ro offset? int64 | +--ro poll-interval? uint32 +--rw assigned-ap-managers | +--rw ap-manager* [id] | +--rw id -> ../config/id | +--rw config | | +--rw id? string | | +--rw fqdn? oc-inet:domain-name | | +--rw ap-manager-ipv4-address? oc-inet:ipv4-address | | +--rw ap-manager-ipv6-address* oc-inet:ipv6-address | +--ro state | +--ro id? string | +--ro fqdn? oc-inet:domain-name | +--ro ap-manager-ipv4-address? oc-inet:ipv4-address | +--ro ap-manager-ipv6-address* oc-inet:ipv6-address | +--ro joined? boolean +--rw oc-ap-if:interfaces +--rw oc-ap-if:interface* [name] +--rw oc-ap-if:name -> ../config/name +--rw oc-ap-if:config | +--rw oc-ap-if:name? string | +--rw oc-ap-if:type identityref - | +--rw oc-ap-if:mtu? uint16 + | +--rw oc-ap-if:mtu? oc-ift:max-frame-size | +--rw oc-ap-if:loopback-mode? oc-opt-types:loopback-mode-type | +--rw oc-ap-if:description? string | +--rw oc-ap-if:enabled? boolean +--ro oc-ap-if:state | +--ro oc-ap-if:name? string | +--ro oc-ap-if:type identityref - | +--ro oc-ap-if:mtu? uint16 + | +--ro oc-ap-if:mtu? oc-ift:max-frame-size | +--ro oc-ap-if:loopback-mode? oc-opt-types:loopback-mode-type | +--ro oc-ap-if:description? string | +--ro oc-ap-if:enabled? boolean | +--ro oc-ap-if:ifindex? uint32 | +--ro oc-ap-if:admin-status enumeration | +--ro oc-ap-if:oper-status enumeration | +--ro oc-ap-if:last-change? oc-types:timeticks64 | +--ro oc-ap-if:logical? boolean | +--ro oc-ap-if:management? boolean | +--ro oc-ap-if:cpu? boolean | +--ro oc-ap-if:counters | +--ro oc-ap-if:in-octets? oc-yang:counter64 | +--ro oc-ap-if:in-pkts? oc-yang:counter64 | +--ro oc-ap-if:in-unicast-pkts? oc-yang:counter64 | +--ro oc-ap-if:in-broadcast-pkts? oc-yang:counter64 | +--ro oc-ap-if:in-multicast-pkts? oc-yang:counter64 | +--ro oc-ap-if:in-errors? oc-yang:counter64 | +--ro oc-ap-if:in-discards? oc-yang:counter64 | +--ro oc-ap-if:out-octets? oc-yang:counter64 | +--ro oc-ap-if:out-pkts? oc-yang:counter64 | +--ro oc-ap-if:out-unicast-pkts? oc-yang:counter64 | +--ro oc-ap-if:out-broadcast-pkts? oc-yang:counter64 | +--ro oc-ap-if:out-multicast-pkts? oc-yang:counter64 | +--ro oc-ap-if:out-discards? oc-yang:counter64 | +--ro oc-ap-if:out-errors? oc-yang:counter64 | +--ro oc-ap-if:last-clear? oc-types:timeticks64 | +--ro oc-ap-if:in-unknown-protos? oc-yang:counter64 | +--ro oc-ap-if:in-fcs-errors? oc-yang:counter64 | x--ro oc-ap-if:carrier-transitions? oc-yang:counter64 | +--ro oc-ap-if:interface-transitions? oc-yang:counter64 | +--ro oc-ap-if:link-transitions? oc-yang:counter64 | +--ro oc-ap-if:resets? oc-yang:counter64 +--rw oc-ap-if:ethernet | +--rw oc-ap-if:config | | +--rw oc-ap-if:mac-address? oc-yang:mac-address | | +--rw oc-ap-if:enable-flow-control? boolean | | +--rw oc-ap-if:auto-negotiate? boolean | | +--rw oc-ap-if:standalone-link-training? boolean | | +--rw oc-ap-if:duplex-mode? enumeration | | +--rw oc-ap-if:port-speed? identityref | | +--rw oc-ap-if:fec-mode? identityref | +--ro oc-ap-if:state | | +--ro oc-ap-if:mac-address? oc-yang:mac-address | | +--ro oc-ap-if:enable-flow-control? boolean | | +--ro oc-ap-if:auto-negotiate? boolean | | +--ro oc-ap-if:standalone-link-training? boolean | | +--ro oc-ap-if:duplex-mode? enumeration | | +--ro oc-ap-if:port-speed? identityref | | +--ro oc-ap-if:fec-mode? identityref | | +--ro oc-ap-if:hw-mac-address? oc-yang:mac-address