Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aft encapsulation-headers #1153

Merged
merged 48 commits into from
Oct 7, 2024
Merged

Add aft encapsulation-headers #1153

merged 48 commits into from
Oct 7, 2024

Conversation

dplore
Copy link
Member

@dplore dplore commented Jul 18, 2024

Change Scope

  • Add AFT container representing next-hop encapsulation headers. A list of encap-headers is defined which is used to represent a stack of one or more packets added to any packet matching a next-hop.

  • Add containers for GRE, IP, UDP and MPLS encapsulation

  • Later we will deprecate the existing AFT encapsulation containers for ip-in-ip and gre and MPLS.

  • Changes to decapsulation are not in scope of this PR as the operational use cases inspiring this PR are met with with existing decapsulation leaves.

Use cases

  • One operational use case for these nexthops is for an SDN controller to use gRIBI to program match and action rules that cause packets to be encapsulated in MPLS in UDP packets. The SDN controller chooses the encapsulation stack.
  • In another, future operational use case, policy-forwarding might be used to define encapsulations which are representing in the afts model upon instantiation into the forwarding tables of the system. (Note, at this moment, changes to the policy-forwarding model to support multiple, arbitrary encapsulations is not in scope for this PR.)

Platform Implementations

Regarding MPLS in UDP encapsulation (which is the operational use case inspiring this change) is defined by RFC and supported by the following implementations.

  • RFC 7510 defines the MPLS in UDP feature specification.
  • Cisco IOS XR supports MPLS in UDP.
  • JunOS nexthop-based-dynamic-tunnels supports MPLS in UDP.

Tree view

we are at: /network-instances/network-instance/afts/

diff -U 10 ~/master-tree.txt ~/aft-encap-tree.txt
[... snip ...]
         |  |     +--ro ip-in-ip
         |  |     |  +--ro state
         |  |     |     +--ro src-ip?   oc-inet:ip-address
         |  |     |     +--ro dst-ip?   oc-inet:ip-address
         |  |     +--ro gre
         |  |     |  +--ro state
         |  |     |     +--ro src-ip?   oc-inet:ip-address
         |  |     |     +--ro dst-ip?   oc-inet:ip-address
         |  |     |     +--ro ttl?      uint8
+        |  |     +--ro encap-headers
+        |  |     |  +--ro encap-header* [index]
+        |  |     |     +--ro index     -> ../state/index
+        |  |     |     +--ro state
+        |  |     |     |  +--ro index?   uint8
+        |  |     |     |  +--ro type?    oc-aftt:encapsulation-header-type
+        |  |     |     +--ro gre
+        |  |     |     |  +--ro state
+        |  |     |     |     +--ro src-ip?   oc-inet:ip-address
+        |  |     |     |     +--ro dst-ip?   oc-inet:ip-address
+        |  |     |     |     +--ro ttl?      uint8
+        |  |     |     +--ro ipv4
+        |  |     |     |  +--ro state
+        |  |     |     |     +--ro src-ip?   oc-inet:ip-address
+        |  |     |     |     +--ro dst-ip?   oc-inet:ip-address
+        |  |     |     +--ro ipv6
+        |  |     |     |  +--ro state
+        |  |     |     |     +--ro src-ip?   oc-inet:ip-address
+        |  |     |     |     +--ro dst-ip?   oc-inet:ip-address
+        |  |     |     +--ro mpls
+        |  |     |     |  +--ro state
+        |  |     |     |     +--ro traffic-class?      oc-mplst:mpls-tc
+        |  |     |     |     +--ro mpls-label-stack*   oc-mplst:mpls-label
+        |  |     |     +--ro udp-v4
+        |  |     |     |  +--ro state
+        |  |     |     |     +--ro src-ip?         oc-inet:ip-address
+        |  |     |     |     +--ro dst-ip?         oc-inet:ip-address
+        |  |     |     |     +--ro dscp?           oc-inet:dscp
+        |  |     |     |     +--ro src-udp-port?   oc-inet:port-number
+        |  |     |     |     +--ro dst-udp-port?   oc-inet:port-number
+        |  |     |     |     +--ro ip-ttl?         uint8
+        |  |     |     +--ro udp-v6
+        |  |     |     |  +--ro state
+        |  |     |     |     +--ro src-ip?         oc-inet:ip-address
+        |  |     |     |     +--ro dst-ip?         oc-inet:ip-address
+        |  |     |     |     +--ro dscp?           oc-inet:dscp
+        |  |     |     |     +--ro src-udp-port?   oc-inet:port-number
+        |  |     |     |     +--ro dst-udp-port?   oc-inet:port-number
+        |  |     |     |     +--ro ip-ttl?         uint8
+        |  |     |     +--ro vxlan
+        |  |     |        +--ro state
+        |  |     |           +--ro vni-label?               oc-evpn-types:evi-id
+        |  |     |           +--ro tunnel-src-ip-address?   oc-inet:ip-address
         |  |     +--ro interface-ref
         |  |        +--ro state
         |  |           +--ro interface?      -> /oc-if:interfaces/interface/name
         |  |           +--ro subinterface?   -> /oc-if:interfaces/interface[oc-if:name=current()/../

@OpenConfigBot
Copy link

OpenConfigBot commented Jul 18, 2024

No major YANG version changes in commit c47f0c8

@dplore dplore marked this pull request as ready for review July 18, 2024 19:52
@dplore dplore requested a review from a team as a code owner July 18, 2024 19:52
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
@dplore dplore added the last-call PR that is in final review before merging. label Sep 12, 2024
@dplore
Copy link
Member Author

dplore commented Sep 12, 2024

Last-call for comments! This is planned to merge on Sep 26,2024.

@rgwilton @nandanarista @earies @LimeHat for comments.

Copy link

@nandanarista nandanarista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall hierarchy LGTM.

Copy link

@vishnureddybadveli vishnureddybadveli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall changes looks good to me.

Copy link

@nachikethas nachikethas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Specifically, approving that the existing ip-in-ip encap/decap structures will be deprecated in a future release. Re-iterating that we fully expect all vendors to support this until we've completed the migration.

… as a grouping instead of typedef, fix comments
Copy link
Member Author

@dplore dplore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed comments

  • do not add pop-top-level to encap-header/mpls container
  • refactor mpls-label-stack to be a grouping instead of typdef
  • update descriptions

release/models/aft/openconfig-aft-common.yang Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
release/models/aft/openconfig-aft-common.yang Outdated Show resolved Hide resolved
Copy link
Contributor

@robshakir robshakir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing my comments!

LGTM.

@dplore dplore merged commit f238a8d into master Oct 7, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
last-call PR that is in final review before merging. non-breaking
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants