public icon indicating copy to clipboard operation
public copied to clipboard

Introduce MATCH_ACTION policy-forwarding

Open dplore opened this issue 3 months ago • 1 comments

Change Scope

  • Introduce MATCH_ACTION policy-forwarding type and associated actions.
  • The PR fulfills a portion of the model and use cases described by #1371 for documentation.
  • Additional PR's will define the next-rule, count and sample actions.

Platform Implementations

See #1371 which includes references to implementation.

Tree View

module: openconfig-network-instance
  +--rw network-instances
     +--rw network-instance* [name]
         +--rw policy-forwarding
         |  +--rw config
         |  |  +--rw global-decap-policy?   string
         |  +--ro state
         |  |  +--ro global-decap-policy?   string
         |  +--rw policies
         |  |  +--rw policy* [policy-id]
         |  |     +--rw policy-id    -> ../config/policy-id
         |  |     +--rw config
         |  |     |  +--rw policy-id?   string
         |  |     |  +--rw type?        enumeration
         |  |     +--ro state
         |  |     |  +--ro policy-id?   string
         |  |     |  +--ro type?        enumeration
         |  |     +--rw rules
         |  |        +--rw rule* [sequence-id]
         |  |           +--rw sequence-id        -> ../config/sequence-id
         |  |           +--rw config
         |  |           |  +--rw sequence-id?   uint32
+        |  |           |  +--rw address-family?   identityref
+        |  |           |  +--rw name?             string
         |  |           +--ro state
         |  |           |  +--ro sequence-id?      uint32
+        |  |           |  +--ro address-family?   identityref
+        |  |           |  +--ro name?             string
         |  |           |  +--ro matched-pkts?     oc-yang:counter64
         |  |           |  +--ro matched-octets?   oc-yang:counter64
         |  |           +--rw l2
         |  |           |  +--rw config
         |  |           |  |  +--rw source-mac?             oc-yang:mac-address
         |  |           |  |  +--rw source-mac-mask?        oc-yang:mac-address
         |  |           |  |  +--rw destination-mac?        oc-yang:mac-address
         |  |           |  |  +--rw destination-mac-mask?   oc-yang:mac-address
         |  |           |  |  +--rw ethertype?              oc-pkt-match-types:ethertype-type
         |  |           |  +--ro state
         |  |           |     +--ro source-mac?             oc-yang:mac-address
         |  |           |     +--ro source-mac-mask?        oc-yang:mac-address
         |  |           |     +--ro destination-mac?        oc-yang:mac-address
         |  |           |     +--ro destination-mac-mask?   oc-yang:mac-address
         |  |           |     +--ro ethertype?              oc-pkt-match-types:ethertype-type
         |  |           +--rw ipv4
         |  |           |  +--rw config
         |  |           |  |  +--rw source-address?                   oc-inet:ipv4-prefix
         |  |           |  |  +--rw source-address-prefix-set?        -> /oc-sets:defined-sets/ipv4-prefix-sets/ipv4-prefix-set/name
         |  |           |  |  +--rw destination-address?              oc-inet:ipv4-prefix
         |  |           |  |  +--rw destination-address-prefix-set?   -> /oc-sets:defined-sets/ipv4-prefix-sets/ipv4-prefix-set/name
         |  |           |  |  +--rw fragment-offsets*                 oc-pkt-match-types:fragment-offset-range
         |  |           |  |  +--rw dscp?                             oc-inet:dscp
         |  |           |  |  +--rw dscp-set*                         oc-inet:dscp
         |  |           |  |  +--rw length?                           uint16
         |  |           |  |  +--rw protocol?                         oc-pkt-match-types:ip-protocol-type
         |  |           |  |  +--rw hop-limit?                        uint8
         |  |           |  +--ro state
         |  |           |  |  +--ro source-address?                   oc-inet:ipv4-prefix
         |  |           |  |  +--ro source-address-prefix-set?        -> /oc-sets:defined-sets/ipv4-prefix-sets/ipv4-prefix-set/name
         |  |           |  |  +--ro destination-address?              oc-inet:ipv4-prefix
         |  |           |  |  +--ro destination-address-prefix-set?   -> /oc-sets:defined-sets/ipv4-prefix-sets/ipv4-prefix-set/name
         |  |           |  |  +--ro fragment-offsets*                 oc-pkt-match-types:fragment-offset-range
         |  |           |  |  +--ro dscp?                             oc-inet:dscp
         |  |           |  |  +--ro dscp-set*                         oc-inet:dscp
         |  |           |  |  +--ro length?                           uint16
         |  |           |  |  +--ro protocol?                         oc-pkt-match-types:ip-protocol-type
         |  |           |  |  +--ro hop-limit?                        uint8
         |  |           |  +--rw icmpv4
         |  |           |     +--rw config
         |  |           |     |  +--rw type?   identityref
         |  |           |     |  +--rw code?   identityref
         |  |           |     +--ro state
         |  |           |        +--ro type?   identityref
         |  |           |        +--ro code?   identityref
         |  |           +--rw ipv6
         |  |           |  +--rw config
         |  |           |  |  +--rw source-address?                   oc-inet:ipv6-prefix
         |  |           |  |  +--rw source-address-prefix-set?        -> /oc-sets:defined-sets/ipv6-prefix-sets/ipv6-prefix-set/name
         |  |           |  |  +--rw source-flow-label?                oc-inet:ipv6-flow-label
         |  |           |  |  +--rw destination-address?              oc-inet:ipv6-prefix
         |  |           |  |  +--rw destination-address-prefix-set?   -> /oc-sets:defined-sets/ipv6-prefix-sets/ipv6-prefix-set/name
         |  |           |  |  +--rw destination-flow-label?           oc-inet:ipv6-flow-label
         |  |           |  |  +--rw dscp?                             oc-inet:dscp
         |  |           |  |  +--rw dscp-set*                         oc-inet:dscp
         |  |           |  |  +--rw length?                           uint16
         |  |           |  |  +--rw protocol?                         oc-pkt-match-types:ip-protocol-type
         |  |           |  |  +--rw hop-limit?                        uint8
         |  |           |  +--ro state
         |  |           |  |  +--ro source-address?                   oc-inet:ipv6-prefix
         |  |           |  |  +--ro source-address-prefix-set?        -> /oc-sets:defined-sets/ipv6-prefix-sets/ipv6-prefix-set/name
         |  |           |  |  +--ro source-flow-label?                oc-inet:ipv6-flow-label
         |  |           |  |  +--ro destination-address?              oc-inet:ipv6-prefix
         |  |           |  |  +--ro destination-address-prefix-set?   -> /oc-sets:defined-sets/ipv6-prefix-sets/ipv6-prefix-set/name
         |  |           |  |  +--ro destination-flow-label?           oc-inet:ipv6-flow-label
         |  |           |  |  +--ro dscp?                             oc-inet:dscp
         |  |           |  |  +--ro dscp-set*                         oc-inet:dscp
         |  |           |  |  +--ro length?                           uint16
         |  |           |  |  +--ro protocol?                         oc-pkt-match-types:ip-protocol-type
         |  |           |  |  +--ro hop-limit?                        uint8
         |  |           |  +--rw icmpv6
         |  |           |     +--rw config
         |  |           |     |  +--rw type?   identityref
         |  |           |     |  +--rw code?   identityref
         |  |           |     +--ro state
         |  |           |        +--ro type?   identityref
         |  |           |        +--ro code?   identityref
         |  |           +--rw transport
         |  |           |  +--rw config
         |  |           |  |  +--rw source-port?                  oc-pkt-match-types:port-num-range
         |  |           |  |  +--rw source-port-set?              -> /oc-sets:defined-sets/port-sets/port-set/name
         |  |           |  |  +--rw destination-port?             oc-pkt-match-types:port-num-range
         |  |           |  |  +--rw destination-port-set?         -> /oc-sets:defined-sets/port-sets/port-set/name
         |  |           |  |  +--rw detail-mode?                  enumeration
         |  |           |  |  +--rw explicit-detail-match-mode?   enumeration
         |  |           |  |  +--rw explicit-tcp-flags*           identityref
         |  |           |  |  +--rw builtin-detail?               enumeration
         |  |           |  +--ro state
         |  |           |     +--ro source-port?                  oc-pkt-match-types:port-num-range
         |  |           |     +--ro source-port-set?              -> /oc-sets:defined-sets/port-sets/port-set/name
         |  |           |     +--ro destination-port?             oc-pkt-match-types:port-num-range
         |  |           |     +--ro destination-port-set?         -> /oc-sets:defined-sets/port-sets/port-set/name
         |  |           |     +--ro detail-mode?                  enumeration
         |  |           |     +--ro explicit-detail-match-mode?   enumeration
         |  |           |     +--ro explicit-tcp-flags*           identityref
         |  |           |     +--ro builtin-detail?               enumeration
         |  |           +--rw action
         |  |           |  +--rw config
-        |  |           |  |  +--rw discard?                           boolean
+        |  |           |  |  x--rw discard?                           boolean
         |  |           |  |  +--rw decapsulate-gre?                   boolean
         |  |           |  |  +--rw decap-network-instance?            -> /network-instances/network-instance/config/name
         |  |           |  |  +--rw decap-fallback-network-instance?   -> /network-instances/network-instance/config/name
+        |  |           |  |  +--rw dscp?                              oc-inet-types:dscp
+        |  |           |  |  +--rw forwarding-action?                 identityref
+        |  |           |  |  +--rw forwarding-group?                  -> /oc-qos:qos/forwarding-groups/forwarding-group/config/name
+        |  |           |  |  +--rw log?                               boolean
+        |  |           |  |  +--rw mpls-traffic-class?                oc-mplst:mpls-tc
         |  |           |  |  +--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 next-hop-group?                    -> ../../../../../../../../static/next-hop-groups/next-hop-group/config/name
         |  |           |  |  +--rw decapsulate-mpls-in-udp?           boolean
         |  |           |  |  +--rw decapsulate-gue?                   boolean
         |  |           |  |  +--rw ip-ttl?                            uint8
         |  |           |  +--ro state
-        |  |           |  |  +--ro discard?                           boolean
+        |  |           |  |  x--ro discard?                           boolean
         |  |           |  |  +--ro decapsulate-gre?                   boolean
         |  |           |  |  +--ro decap-network-instance?            -> /network-instances/network-instance/config/name
         |  |           |  |  +--ro decap-fallback-network-instance?   -> /network-instances/network-instance/config/name
+        |  |           |  |  +--rw dscp?                              oc-inet-types:dscp
+        |  |           |  |  +--rw forwarding-action?                 identityref
+        |  |           |  |  +--rw forwarding-group?                  -> /oc-qos:qos/forwarding-groups/forwarding-group/config/name
+        |  |           |  |  +--rw log?                               boolean
+        |  |           |  |  +--rw mpls-traffic-class?                oc-mplst:mpls-tc
         |  |           |  |  +--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 next-hop-group?                    -> ../../../../../../../../static/next-hop-groups/next-hop-group/config/name
         |  |           |  |  +--rw decapsulate-mpls-in-udp?           boolean
         |  |           |  |  +--rw decapsulate-gue?                   boolean
         |  |           |  |  +--rw ip-ttl?                            uint8
         |  |           |  +--ro state
-        |  |           |  |  +--ro discard?                           boolean
+        |  |           |  |  x--ro discard?                           boolean
         |  |           |  |  +--ro decapsulate-gre?                   boolean
         |  |           |  |  +--ro decap-network-instance?            -> /network-instances/network-instance/config/name
         |  |           |  |  +--ro decap-fallback-network-instance?   -> /network-instances/network-instance/config/name
+        |  |           |  |  +--ro dscp?                              oc-inet-types:dscp
+        |  |           |  |  +--ro forwarding-action?                 identityref
+        |  |           |  |  +--ro forwarding-group?                  -> /oc-qos:qos/forwarding-groups/forwarding-group/config/name
+        |  |           |  |  +--ro log?                               boolean
+        |  |           |  |  +--ro mpls-traffic-class?                oc-mplst:mpls-tc
         |  |           |  |  +--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 next-hop-group?                    -> ../../../../../../../../static/next-hop-groups/next-hop-group/config/name
         |  |           |  |  +--ro decapsulate-mpls-in-udp?           boolean
         |  |           |  |  +--ro decapsulate-gue?                   boolean
         |  |           |  |  +--ro ip-ttl?                            uint8

dplore avatar Dec 16 '25 21:12 dplore