Skip to content

Add support for duplicates in NH AFT state MPLS label stack#1435

Merged
dplore merged 12 commits intoopenconfig:masterfrom
romeyod:aft-mpls-label
Apr 7, 2026
Merged

Add support for duplicates in NH AFT state MPLS label stack#1435
dplore merged 12 commits intoopenconfig:masterfrom
romeyod:aft-mpls-label

Conversation

@romeyod
Copy link
Copy Markdown
Contributor

@romeyod romeyod commented Feb 9, 2026

Change Scope

  • Deprecate popped-mpls-label-stack and AFT NH pushed-mpls-label-stack and mpls-label-stack leafs as they do not support duplicates.
  • Add decap-mpls-label-stack and AFT NH encah-mpls-label-stack and encap-mpls-label-stack leafs that support duplicates.
  • This change is backwards compatible

Context:
NH AFT state MPLS label stack doesn't support duplicates

Tree View

module: openconfig-network-instance
  +--rw network-instances
     +--rw network-instance* [name]
           +--rw segment-routing
           |  +--ro te-policies
           |     +--ro te-policy* [color endpoint]
           |        +--ro candidate-paths
           |           +--ro candidate-path* [protocol-origin originator-asn originator-addr discriminator]
           |              +--ro segment-lists
           |                 +--ro segment-list* [id]
           |                    +--ro next-hops
           |                       +--ro next-hop* [index]
           |                          +--ro index            -> ../state/index
           |                          +--ro state
           |                          |  +--ro index?                     uint64
           |                          |  +--ro programmed-index?          uint64
           |                          |  +--ro ip-address?                oc-inet:ip-address
           |                          |  +--ro mac-address?               oc-yang:mac-address
           |                          |  +--ro pop-top-label?             boolean
  -        |                          |  +--ro pushed-mpls-label-stack*   oc-mplst:mpls-label
  +        |                          |  x--ro pushed-mpls-label-stack*   oc-mplst:mpls-label
  +        |                          +--ro encap-mpls-label-stacks
  +        |                          |  +--ro encap-mpls-label-stack* [id]
  +        |                          |     +--ro id       -> ../state/id
  +        |                          |     +--ro state
  +        |                          |        +--ro id?      uint8
  +        |                          |        +--ro label?   oc-mplst:mpls-label
           |                          |  +--ro encapsulate-header?        oc-aftt:encapsulation-header-type
           |                          |  +--ro decapsulate-header?        oc-aftt:encapsulation-header-type
           |                          |  +--ro origin-protocol?           identityref
module: openconfig-network-instance
  +--rw network-instances
     +--rw network-instance* [name]
           +--ro afts
           |  +--ro mpls
           |  |  +--ro label-entry* [label]
           |  |     +--ro label    -> ../state/label
           |  |     +--ro state
           |  |        +--ro label?                                      oc-mplst:mpls-label
           |  |        +--ro counters
           |  |        |  x--ro packets-forwarded?   oc-yang:counter64
           |  |        |  x--ro octets-forwarded?    oc-yang:counter64
           |  |        +--ro entry-metadata?                             binary
  -        |  |        +--ro popped-mpls-label-stack*                    oc-mplst:mpls-label
  +        |  |        x--ro popped-mpls-label-stack*                    oc-mplst:mpls-label
  +        |  |     +--ro decap-mpls-label-stacks
  +        |  |     |  +--ro decap-mpls-label-stack* [id]
  +        |  |     |     +--ro id       -> ../state/id
  +        |  |     |     +--ro state
  +        |  |     |        +--ro id?      uint8
  +        |  |     |        +--ro label?   oc-mplst:mpls-label
           |  |        +--ro oc-aftni:next-hop-group?                    -> /oc-ni:network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/id
           |  |        +--ro oc-aftni:next-hop-group-network-instance?   oc-ni:network-instance-ref
           |  |
           |  |
           |  +--ro next-hops
           |  |  +--ro next-hop* [index]
           |  |     +--ro index            -> ../state/index
           |  |     +--ro state
           |  |     |  +--ro index?                       uint64
           |  |     |  +--ro programmed-index?            uint64
           |  |     |  +--ro ip-address?                  oc-inet:ip-address
           |  |     |  +--ro mac-address?                 oc-yang:mac-address
           |  |     |  +--ro pop-top-label?               boolean
  -        |  |     |  +--ro pushed-mpls-label-stack*     oc-mplst:mpls-label
  +        |  |     |  x--ro pushed-mpls-label-stack*     oc-mplst:mpls-label
           |  |     |  +--ro encapsulate-header?          oc-aftt:encapsulation-header-type
           |  |     |  +--ro decapsulate-header?          oc-aftt:encapsulation-header-type
           |  |     |  +--ro origin-protocol?             identityref
           |  |     |  +--ro lsp-name?                    string
           |  |     | 
           |  |     | 
           |  |     +--ro encap-headers
           |  |     |  +--ro encap-header* [index]
           |  |     |     +--ro index     -> ../state/index
           |  |     |     +--ro state
           |  |     |     |  +--ro index?   uint8
           |  |     |     |  +--ro type?    oc-aftt:encapsulation-header-type
           |  |     |     +--ro mpls
           |  |     |     |  +--ro state
           |  |     |     |     +--ro traffic-class?      oc-mplst:mpls-tc
  -        |  |     |     |     +--ro mpls-label-stack*   oc-mplst:mpls-label
  +        |  |     |     |     x--ro mpls-label-stack*         oc-mplst:mpls-label
  +        |  |     |     |  +--ro encap-mpls-label-stacks
  +        |  |     |     |     +--ro encap-mpls-label-stack* [id]
  +        |  |     |     |        +--ro id       -> ../state/id
  +        |  |     |     |        +--ro state
  +        |  |     |     |           +--ro id?      uint8
  +        |  |     |     |           +--ro label?   oc-mplst:mpls-label
           |  |     |     +--ro udp-v4
           |  |     |     |  +--ro state
           |  |     |     |     +--ro src-ip?         oc-inet:ipv4-address

and mpls-label-stack leafs as they do not support duplicates.
Add decap-mpls-label-stack and AFT NH encah-mpls-label-stack
and encap-mpls-label-stack leafs that support duplicates.
and mpls-label-stack leafs as they do not support duplicates.
Add decap-mpls-label-stack and AFT NH encah-mpls-label-stack
and encap-mpls-label-stack leafs that support duplicates.
@dplore
Copy link
Copy Markdown
Member

dplore commented Feb 9, 2026

/gcbrun

@dplore dplore moved this to Ready to discuss in OC Operator Review Feb 9, 2026
@OpenConfigBot
Copy link
Copy Markdown

OpenConfigBot commented Feb 9, 2026

No major YANG version changes in commit f75ab76

Comment thread release/models/aft/openconfig-aft-common.yang
Comment thread release/models/aft/openconfig-aft-mpls.yang
and mpls-label-stack leafs as they do not support duplicates.
Add decap-mpls-label-stack and AFT NH encah-mpls-label-stack
and encap-mpls-label-stack leafs that support duplicates.
@dplore
Copy link
Copy Markdown
Member

dplore commented Feb 10, 2026

/gcbrun

@dplore
Copy link
Copy Markdown
Member

dplore commented Feb 10, 2026

In each case, the new list encap-mpls-label-stack should be moved up one level. For example:

module: openconfig-network-instance
  +--rw network-instances
     +--rw network-instance* [name]
           +--rw segment-routing
           |  +--ro te-policies
           |     +--ro te-policy* [color endpoint]
           |        +--ro candidate-paths
           |           +--ro candidate-path* [protocol-origin originator-asn originator-addr discriminator]
           |              +--ro segment-lists
           |                 +--ro segment-list* [id]
           |                    +--ro next-hops
           |                       +--ro next-hop* [index]
           |                          +--ro index            -> ../state/index
  +        |                          +--ro encap-mpls-label-stack* [index]
  +        |                          |  +--ro index    -> ../state/index
  +        |                          |  +--ro state
  +        |                          |     +--ro index?   uint8
  +        |                          |     +--ro label?   oc-mplst:mpls-label

@dplore dplore moved this from Ready to discuss to Waiting for author in OC Operator Review Feb 10, 2026
and mpls-label-stack leafs as they do not support duplicates.
Add decap-mpls-label-stack and AFT NH encah-mpls-label-stack
and encap-mpls-label-stack leafs that support duplicates.
@romeyod
Copy link
Copy Markdown
Contributor Author

romeyod commented Feb 10, 2026

In each case, the new list encap-mpls-label-stack should be moved up one level. For example:

module: openconfig-network-instance
  +--rw network-instances
     +--rw network-instance* [name]
           +--rw segment-routing
           |  +--ro te-policies
           |     +--ro te-policy* [color endpoint]
           |        +--ro candidate-paths
           |           +--ro candidate-path* [protocol-origin originator-asn originator-addr discriminator]
           |              +--ro segment-lists
           |                 +--ro segment-list* [id]
           |                    +--ro next-hops
           |                       +--ro next-hop* [index]
           |                          +--ro index            -> ../state/index
  +        |                          +--ro encap-mpls-label-stack* [index]
  +        |                          |  +--ro index    -> ../state/index
  +        |                          |  +--ro state
  +        |                          |     +--ro index?   uint8
  +        |                          |     +--ro label?   oc-mplst:mpls-label

@dplore I don't fully understand this feedback. Maybe I am missing some OC coding guideline.
encap-mpls-label-stack needs to be under next-hop/state or mpls/state since its a status container

NOTE: I renamed new index leaf and references to id in latest diffs

@dplore
Copy link
Copy Markdown
Member

dplore commented Feb 10, 2026

/gcbrun

@romeyod
Copy link
Copy Markdown
Contributor Author

romeyod commented Feb 24, 2026

In each case, the new list encap-mpls-label-stack should be moved up one level. For example:

module: openconfig-network-instance
  +--rw network-instances
     +--rw network-instance* [name]
           +--rw segment-routing
           |  +--ro te-policies
           |     +--ro te-policy* [color endpoint]
           |        +--ro candidate-paths
           |           +--ro candidate-path* [protocol-origin originator-asn originator-addr discriminator]
           |              +--ro segment-lists
           |                 +--ro segment-list* [id]
           |                    +--ro next-hops
           |                       +--ro next-hop* [index]
           |                          +--ro index            -> ../state/index
  +        |                          +--ro encap-mpls-label-stack* [index]
  +        |                          |  +--ro index    -> ../state/index
  +        |                          |  +--ro state
  +        |                          |     +--ro index?   uint8
  +        |                          |     +--ro label?   oc-mplst:mpls-label

@dplore I don't fully understand this feedback. Maybe I am missing some OC coding guideline. encap-mpls-label-stack needs to be under next-hop/state or mpls/state since its a status container

NOTE: I renamed new index leaf and references to id in latest diffs

@dplore do let me know what your thoughts are. Also OC linter is not happy with this change

@dplore
Copy link
Copy Markdown
Member

dplore commented Mar 3, 2026

Opps, my earlier comment was not correct.

OC style requires a container to encapsulate a list. I think this is why the linter check is failing. For example:

module: openconfig-network-instance
  +--rw network-instances
     +--rw network-instance* [name]
           +--rw segment-routing
           |  +--ro te-policies
           |     +--ro te-policy* [color endpoint]
           |        +--ro candidate-paths
           |           +--ro candidate-path* [protocol-origin originator-asn originator-addr discriminator]
           |              +--ro segment-lists
           |                 +--ro segment-list* [id]
           |                    +--ro next-hops
           |                       +--ro next-hop* [index]
           |                          +--ro index            -> ../state/index
  +        |                          +--ro encap-stack-mpls-labels
  +        |                             +--ro encap-stack-mpls-label* [index]
  +        |                             |  +--ro index    -> ../state/index
  +        |                             |  +--ro state
  +        |                             |     +--ro index?   uint8
  +        |                             |     +--ro label?   oc-mplst:mpls-label

@ElodinLaarz
Copy link
Copy Markdown
Contributor

Discussed in the OC Operators Meeting on March 3rd, 2026:

Seems like the lists are not contained in a specific container. (E.g. interfaces/interface[...] or network-instances/network-instance[...] etc.)

In this case, encap-mpls-label-stack should be in a container encap-mpls-label-stacks first.

Will re-review once the lint errors are addressed.

romeyod and others added 2 commits March 4, 2026 01:04
and mpls-label-stack leafs as they do not support duplicates.
Add decap-mpls-label-stack and AFT NH encah-mpls-label-stack
and encap-mpls-label-stack leafs that support duplicates.
@romeyod
Copy link
Copy Markdown
Contributor Author

romeyod commented Mar 4, 2026

@dplore @ElodinLaarz Thanks for the feedback and update. I have updates the latest diffs as per @dplore inputs.

@dplore
Copy link
Copy Markdown
Member

dplore commented Mar 4, 2026

/gcbrun

@dplore
Copy link
Copy Markdown
Member

dplore commented Mar 4, 2026

/gcbrun

@dplore
Copy link
Copy Markdown
Member

dplore commented Mar 4, 2026

/gcbrun

@dplore
Copy link
Copy Markdown
Member

dplore commented Mar 5, 2026

/gcbrun

@romeyod
Copy link
Copy Markdown
Contributor Author

romeyod commented Mar 16, 2026

@dplore @ElodinLaarz seems like there are no objections as we had tabled this in OC public meeting earlier this month. Can you please move this to Last Call if there is no other feedback? Thanks!

@dplore
Copy link
Copy Markdown
Member

dplore commented Mar 17, 2026

/gcbrun

@dplore dplore moved this from Waiting for author to last-call in OC Operator Review Mar 17, 2026
@dplore
Copy link
Copy Markdown
Member

dplore commented Mar 17, 2026

Setting to last call for March 31, 2026

@dplore
Copy link
Copy Markdown
Member

dplore commented Apr 7, 2026

/gcbrun

Copy link
Copy Markdown
Member

@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.

Reviewed in Apr 7, 2026 OC operators meeting without objection

@dplore dplore merged commit 187b120 into openconfig:master Apr 7, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants