Skip to content

Commit

Permalink
decap-then-lookup OC schema (openconfig#727)
Browse files Browse the repository at this point in the history
* Add policy actions for packet decapsulation controlled by SDN controllers populated network-instance (e.g. via gRIBI).
* Add policy action for decap-then-lookup
  • Loading branch information
xw-g authored Apr 12, 2023
1 parent 5af88f1 commit 671855f
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ submodule openconfig-pf-forwarding-policies {
"This submodule contains configuration and operational state
relating to the definition of policy-forwarding policies.";

oc-ext:openconfig-version "0.5.0";
oc-ext:openconfig-version "0.6.0";

revision "2023-03-27" {
description
"Add support for decap in one NI and further actions in other NIs.";
reference "0.6.0";
}

revision "2022-01-25" {
description
Expand Down Expand Up @@ -264,14 +270,74 @@ submodule openconfig-pf-forwarding-policies {
according to the IP destination).";
}

leaf decap-network-instance {
type leafref {
// this must be an absolute reference to allow another NI
// to be referenced.
path "/network-instances/network-instance/config/name";
}
description
"This leaf is mutually exclusive with ../network-instance.
This leaf should be used along with
../decap-fallback-network-instance and ../post-decap-network-instance.
This leaf is normally used with NIs (network instances) that are
populated by SDN controllers (e.g. via gRIBI), where we want:
- The decapsulation decision to be controlled by the
controllers.
- The new header after decapsulation is to be looked up in
another NI, and the NI is chosen by fields (e.g. source IP,
DSCP, etc) that are not used for route resolution.
When this leaf is set, packets matching the match criteria for
the forwarding rule should be looked up in the specified NI.
It is expected that the NI should only contain routes that have
next hop action as decapsulation.
- If there is a match, the packet should be decapsulated.
The route lookup on the new header should happen in the
../post-decap-network-instance.
- If there is no match, the packet should be looked up in the
NI set by ../decap-fallback-network-instance.";
}

leaf decap-fallback-network-instance {
type leafref {
// this must be an absolute reference to allow another NI
// to be referenced.
path "/network-instances/network-instance/config/name";
}
description
"This leaf has to be set when ../decap-network-instance is set.
When this leaf is set, the specified NI should be used as a
fallback instance for lookup when
../decap-network-instance produces no match for the packet.
NI specified by this leaf might contain different mixed next hop
actions (e.g. next hop IP, decapsulation, redirect to another NI,
etc).";
}

leaf post-decap-network-instance {
type leafref {
// this must be an absolute reference to allow another NI
// to be referenced.
path "/network-instances/network-instance/config/name";
}
description
"This leaf can only be set when ../decap-network-instance is set.
When this leaf is set, the specified NI should be used for lookup
on the new header after ../decap-network-instance does decap for
the matched packet. NI specified by this leaf might contain different
mixed next hop actions (e.g. next hop IP, decapsulation,
redirect to another NI, etc).";
}

leaf network-instance {
type leafref {
// this must be an absolute reference to allow another NI to be
// referenced.
path "/network-instances/network-instance/config/name";
}
description
"When this leaf is set, packets matching the match criteria
"This leaf is mutually exclusive with ../decap-network-instance.
When this leaf is set, packets matching the match criteria
for the forwarding rule should be looked up in the
network-instance that is referenced rather than the
network-instance with which the interface is associated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ submodule openconfig-pf-interfaces {
"This submodule contains groupings related to the association
between interfaces and policy forwarding rules.";

oc-ext:openconfig-version "0.5.0";
oc-ext:openconfig-version "0.6.0";

revision "2023-03-27" {
description
"Add support for decap in one NI and further actions in other NIs.";
reference "0.6.0";
}

revision "2022-01-25" {
description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ submodule openconfig-pf-path-groups {
forwarding entities together to be used as policy forwarding
targets.";

oc-ext:openconfig-version "0.5.0";
oc-ext:openconfig-version "0.6.0";

revision "2023-03-27" {
description
"Add support for decap in one NI and further actions in other NIs.";
reference "0.6.0";
}
revision "2022-01-25" {
description
"Add GUE and MPLS-in-UDP decapsulation actions.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ module openconfig-policy-forwarding {
The forwarding action of the corresponding policy is set to
PATH_GROUP and references the configured group of LSPs.";

oc-ext:openconfig-version "0.5.0";
oc-ext:openconfig-version "0.6.0";

revision "2023-03-27" {
description
"Add support for decap in one NI and further actions in other NIs.";
reference "0.6.0";
}

revision "2022-01-25" {
description
Expand Down

0 comments on commit 671855f

Please sign in to comment.