Add tunnel-processing-mode leaves for dscp and ttl - #1506
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request introduces tunnel header-field processing modes and default TTL/DSCP values for UDP encapsulation within the OpenConfig AFT models. The feedback recommends specifying TUNNEL_HEADER_FIELD_MODE_UNIFORM as the default for both dscp-processing-mode and ttl-processing-mode to maintain backward compatibility. Additionally, since these models support both IPv4 and IPv6, the reviewer suggests updating the descriptions of ttl-processing-mode, ip-ttl, and the base identity TUNNEL_HEADER_FIELD_MODE to refer generically to 'IP TTL / Hop Limit' instead of 'IPv4 TTL'.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Cancel this change. Stick to the current model and update the description of the |
Change Scope
TTL, Hop Limit, and DSCP/Traffic Class can be viewed as tunnel header fields whose values are processed according to defined tunnel conceptual models, most notably Uniform and Pipe modes.
These changes have been discussed as part of PR review #1492
Overview of tunnel header processing modes
These conceptual tunnel models are used across multiple specifications and header fields. Since the same tunnel processing concept applies to multiple header fields (IPv4 TTL, IPv6 Hop Limit, and DSCP/Traffic Class), it is preferable to model this as a generic reusable identity that can be set explicitly by configuration leaves rather than encoding it implicitly.
Proposed Configuration Leaves
We suggest explicit configurable leaves to set the tunnel processing models:
ttl-processing-modedscp-processing-modeThese leaves are of type
tunnel-header-field-mode-type, defined as follows:typedef tunnel-header-field-mode-type {
type identityref {
base TUNNEL_HEADER_FIELD_MODE;
}
}
Derived Identities
TUNNEL_HEADER_FIELD_MODE_UNIFORMTUNNEL_HEADER_FIELD_MODE_PIPEWe also suggest setting a default value for the
ip-ttlanddscpleaves. This terminology is aligned with RFC 3270, RFC 2983, RFC 3443, and RFC 2473.Generic Behavior Table
References
Tree View
| +--ro udp-v4 | | +--ro state | | +--ro src-ip? oc-inet:ipv4-address | | +--ro dst-ip? oc-inet:ipv4-address + | | +--ro dscp-processing-mode? oc-aftt:tunnel-header-field-mode-type | | +--ro dscp? oc-inet:dscp | | +--ro src-udp-port? oc-inet:port-number | | +--ro dst-udp-port? oc-inet:port-number + | | +--ro ttl-processing-mode? oc-aftt:tunnel-header-field-mode-type | | +--ro ip-ttl? uint8 | +--ro udp-v6 | | +--ro state | | +--ro src-ip? oc-inet:ipv6-address | | +--ro dst-ip? oc-inet:ipv6-address + | | +--ro dscp-processing-mode? oc-aftt:tunnel-header-field-mode-type | | +--ro dscp? oc-inet:dscp | | +--ro src-udp-port? oc-inet:port-number | | +--ro dst-udp-port? oc-inet:port-number + | | +--ro ttl-processing-mode? oc-aftt:tunnel-header-field-mode-type | | +--ro ip-ttl? uint8