Skip to content

Add sent-path-count leaf#1463

Open
rgwilton wants to merge 1 commit intoopenconfig:masterfrom
rgwilton:sent-path-count
Open

Add sent-path-count leaf#1463
rgwilton wants to merge 1 commit intoopenconfig:masterfrom
rgwilton:sent-path-count

Conversation

@rgwilton
Copy link
Copy Markdown
Contributor

Change Scope

Introduces a new sent-path-count under BGP prefix container.

The sent-path-count represents the number of add-paths advertised to a neighbor after the post-policy Adj-RIB-Out. This value reflects the total number of paths present in the post-policy Adj-RIB-Out for the neighbor once add-path configuration is applied.

This change is backwards-compatible, and the version number has been updated appropriately.

Platform Implementations

  • Cisco IOS XR:

After enabling add-path:

Wed Mar  4 16:10:21.812 EST
Network                Next Hop        From            AS Path
1.1.0.0/16             13.13.30.6      13.13.30.6      6?
                       10.10.30.3      10.10.30.3      3?
192.168.0.3/32         10.10.30.3      10.10.30.3      3i
192.168.0.6/32         13.13.30.6      13.13.30.6      6i
 
Processed 3 prefixes, 4 paths  <- Number of prefixes and paths reported. 
RP/0/0/CPU0:R4#

Tree View

 module: openconfig-bgp
          |     |  |     |  +--rw afi-safi* [afi-safi-name]
          |     |  |     |     +--rw afi-safi-name           -> ../config/afi-safi-name
          |     |  |     |     +--rw config
          |     |  |     |     |  +--rw afi-safi-name?         identityref
          |     |  |     |     |  +--rw enabled?               boolean
          |     |  |     |     |  +--rw send-community-type*   oc-bgp-types:community-type
          |     |  |     |     +--ro state
          |     |  |     |     |  +--ro afi-safi-name?         identityref
          |     |  |     |     |  +--ro enabled?               boolean
          |     |  |     |     |  +--ro send-community-type*   oc-bgp-types:community-type
          |     |  |     |     |  +--ro active?                boolean
          |     |  |     |     |  +--ro prefixes
          |     |  |     |     |     +--ro received?              uint32
          |     |  |     |     |     +--ro received-pre-policy?   uint32
          |     |  |     |     |     +--ro sent?                  uint32
+         |     |  |     |     |     +--ro sent-path-count?       uint32
          |     |  |     |     |     +--ro installed?             uint32
          |     |  |     |     +--rw graceful-restart
          |     |  |     |     |  +--rw config
          |     |  |     |     |  |  +--rw enabled?   boolean
          |     |  |     |     |  +--ro state
          |     |  |     |     |     +--ro enabled?      boolean
          |     |  |     |     |     +--ro received?     boolean
          |     |  |     |     |     +--ro advertised?   boolean
          |     |  |     |     +--rw add-paths
          |     |  |     |     |  +--rw config
          |     |  |     |     |  |  +--rw receive?                  boolean
          |     |  |     |     |  |  +--rw send?                     boolean
          |     |  |     |     |  |  +--rw send-max?                 uint8
          |     |  |     |     |  |  +--rw eligible-prefix-policy?   -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name

Justification

This enhancement is driven by a requirement from an operator, where an additional metric is needed for better observability. In Add-Path scenarios, there is a need to track the total number of paths advertised (across all prefixes) to a specific neighbor.
Currently, there is an existing leaf “sent” under the prefixes container, which provides the number of prefixes advertised to a neighbor after policy application. Similarly, the proposed “sent-path-count” will provide visibility into the number of paths advertised after policy application.

Copy link
Copy Markdown

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

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 updates the OpenConfig BGP models to version 9.10.0 and adds a new sent-path-count leaf to the neighbor state to track advertised paths post-policy. A review comment suggests renaming this leaf to sent-paths and updating its description to maintain consistency with existing BGP model terminology and naming patterns.

Comment on lines +697 to +704
leaf sent-path-count {
type uint32;
description
"The number of add-paths advertised to a neighbor after
the post-policy Adj-RIB-Out. This value reflects the total
number of paths present in the post-policy Adj-RIB-Out for
the neighbor once add-path configuration is applied.";
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The leaf name sent-path-count is inconsistent with the existing total-paths leaf defined in openconfig-bgp-common.yang. Renaming it to sent-paths would improve consistency across the BGP model. Additionally, the description can be refined to refer to 'paths' generally, as the count applies to all advertised paths (including those from the add-paths feature), and should follow the phrasing used in the existing sent leaf for prefixes.

Suggested change
leaf sent-path-count {
type uint32;
description
"The number of add-paths advertised to a neighbor after
the post-policy Adj-RIB-Out. This value reflects the total
number of paths present in the post-policy Adj-RIB-Out for
the neighbor once add-path configuration is applied.";
}
leaf sent-paths {
type uint32;
description
"The number of paths that are advertised to the neighbor after
applying any policies. This count is the number of paths
present in the post-policy Adj-RIB-Out for the neighbor,
including additional paths advertised when add-paths is
enabled.";
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@romeyod, @earies, @jgcumming -please can you let me know if you implement a similar leaf and agree that we should add this into the core OC YANG model (rather than as a Cisco specific augmentation).

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.

@romeyod is on leave so I'm replying on behalf of him. EOS implements a similar leaf and we agree that it would be good to expose the leaf so that it can be used in the relevant use cases.

@dplore
Copy link
Copy Markdown
Member

dplore commented Apr 3, 2026

/gcbrun

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

No major YANG version changes in commit 18cae6a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready to discuss

Development

Successfully merging this pull request may close these issues.

4 participants