Skip to content

Introduce recurse action in policy-forwarding - #1520

Open
amitarista wants to merge 4 commits into
openconfig:masterfrom
amitarista:ph-nh-recurse-action
Open

Introduce recurse action in policy-forwarding#1520
amitarista wants to merge 4 commits into
openconfig:masterfrom
amitarista:ph-nh-recurse-action

Conversation

@amitarista

Copy link
Copy Markdown
Contributor

Change Scope

  • Introduce recurse within /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/
  • This change is backwards compatible.

Platform Implementations

Arista implementation document - https://www.arista.com/en/support/toi/eos-4-20-5f/14550#redirect-next-hop

Example config:

traffic-policies
   traffic-policy foo
      match m1 ipv4
         source prefix 10.0.0.0/24
         actions
            redirect next-hop recursive 20.0.0.1 <-- EXCLUDE_DEFAULT_RT
      match m2 ipv4
         source prefix 30.0.0.0/24
         actions
            redirect next-hop recursive include default 40.0.0.1 <-- INCLUDE_DEFAULT_RT

Tree View

         +--rw policy-forwarding
         |  +--rw policies
         |  |  +--rw policy* [policy-id]
         |  |     +--rw rules
         |  |        +--rw rule* [sequence-id]
         |  |           +--rw action
         |  |           |  +--rw config
         |  |              |  +--rw log?                               boolean
         |  |              |  +--rw post-decap-network-instance?       -> /network-instances/network-instance/config/name
         |  |              |  +--rw network-instance?                  -> /network-instances/network-instance/config/name
         |  |              |  +--rw path-selection-group?              -> ../../../../../../../path-selection-groups/path-selection-group/config/group-id
         |  |              |  +--rw next-hop?                          oc-inet:ip-address
+        |  |              |  +--rw recurse?                           enumeration
         |  |              |  +--rw next-hop-group?                    -> ../../../../../../../../static/next-hop-groups/next-hop-group/config/name
         |  |              |  +--rw decapsulate-mpls-in-udp?           boolean
         |  |              |  +--rw decapsulate-gue?                   boolean
         |  |              |  x--rw ip-ttl?                            uint8
         |  |              +--ro state
@@ -1569,10 +1570,11 @@
         |  |              |  +--ro log?                               boolean
         |  |              |  +--ro post-decap-network-instance?       -> /network-instances/network-instance/config/name
         |  |              |  +--ro network-instance?                  -> /network-instances/network-instance/config/name
         |  |              |  +--ro path-selection-group?              -> ../../../../../../../path-selection-groups/path-selection-group/config/group-id
         |  |              |  +--ro next-hop?                          oc-inet:ip-address
+        |  |              |  +--ro recurse?                           enumeration
         |  |              |  +--ro next-hop-group?                    -> ../../../../../../../../static/next-hop-groups/next-hop-group/config/name
         |  |              |  +--ro decapsulate-mpls-in-udp?           boolean
         |  |              |  +--ro decapsulate-gue?                   boolean
         |  |              |  x--ro ip-ttl?                            uint8
         |  |              +--rw encapsulate-gre

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new recurse leaf to the policy-forwarding action configuration, allowing recursive next-hop resolution via longest prefix match in the FIB. Feedback was provided to clarify the description of the recurse leaf, suggesting to replace 'If not enabled' with 'If this leaf is not configured' to avoid ambiguity since it is an optional enumeration rather than a boolean.

Comment thread release/models/policy-forwarding/openconfig-pf-forwarding-policies.yang Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant