Skip to content

Add ingress link-down discard counter to interface and subinterface counters - #1528

Open
ostromart wants to merge 3 commits into
openconfig:masterfrom
ostromart:feature/eth-in-link-down-discards
Open

Add ingress link-down discard counter to interface and subinterface counters#1528
ostromart wants to merge 3 commits into
openconfig:masterfrom
ostromart:feature/eth-in-link-down-discards

Conversation

@ostromart

@ostromart ostromart commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

This change introduces a new operational state counter in-link-down-discards under interface counters (/interfaces/interface/state/counters/in-link-down-discards and /interfaces/interface/subinterfaces/subinterface/state/counters/in-link-down-discards) to track ingress packets dropped due to egress link-down forwarding conditions.
The version has been bumped to 3.10.0 in openconfig-interfaces.yang.

Change-Id: I38c19a483b18e47f583c81a0b98597888405892f

Change Scope

  • Description: This PR introduces in-link-down-discards to interface-common-counters-state in openconfig-interfaces.yang to count ingress packets discarded because the resolved egress interface or next-hop link selected by forwarding or routing was down.
  • Backwards Compatibility: This change is fully backward compatible as it only adds a new read-only operational state leaf counter to the existing interface-common-counters-state grouping.

Use case

This counter is designed for production network debugging and automated failure pinpointing. Silent packet discards in large-scale fabrics are difficult to diagnose using generic discard counters alone. Providing an explicit counter for inbound packet drops due to egress link-down forwarding failures (in-link-down-discards) allows network operators and SRE tools to distinguish forwarding blackholes caused by downstream link failures from normal traffic discards.

Platform Implementations

  • SAI specification defines an explicit debug drop reason for egress link down conditions: SAI_IN_DROP_REASON_EGRESS_LINK_DOWN (SAI Debug Counters Proposal).
  • Nvidia 1 (nvswitch_interface_discards_egress_link_down for tx and nvswitch_interface_discards_ingress_tx_link_down for rx).
  • Nvidia 2 (tx_discards_phy).
  • Google network switches export granular ingress link-down drop telemetry via UMF and SAI debug counters.
  • Broadcom / SONiC ASIC telemetry pipelines support per-port ingress drop counting for egress link-down events.

Tree View

module: openconfig-interfaces

  +--rw interfaces
     +--rw interface* [name]
        +--ro state
        |  +--ro counters
        |     +--ro in-errors?               oc-yang:counter64
        |     +--ro in-discards?             oc-yang:counter64
+       |     +--ro in-link-down-discards?    oc-yang:counter64
        |     +--ro out-octets?              oc-yang:counter64
        +--rw subinterfaces
           +--rw subinterface* [index]
              +--ro state
                 +--ro counters
                    +--ro in-errors?             oc-yang:counter64
                    +--ro in-discards?           oc-yang:counter64
+                   +--ro in-link-down-discards?  oc-yang:counter64
                    +--ro out-octets?            oc-yang:counter64

@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 updates the openconfig-if-ethernet.yang model to version 2.19.0 and introduces a new ingress counter, in-link-down-discards, to track packets dropped due to a down egress interface or next-hop link. The reviewer pointed out that this counter represents a generic Layer 3 forwarding plane discard rather than an Ethernet-specific issue, and suggested moving it to openconfig-interfaces.yang so it can be reused across all interface types.

Comment thread release/models/interfaces/openconfig-if-ethernet.yang Outdated
@navaneethyv

Copy link
Copy Markdown
Contributor

Please handle the Gemini review comments before it arrives for discussion.

@ostromart

Copy link
Copy Markdown
Contributor Author

Ack, will rework this, unfortunately there was not enough time to do so before today's meeting so we can present it next week.

This change introduces a new operational state counter in-link-down-discards under interface counters (/interfaces/interface/state/counters/in-link-down-discards and /interfaces/interface/subinterfaces/subinterface/state/counters/in-link-down-discards) to track ingress packets dropped due to egress link-down forwarding conditions.

The version has been bumped to 3.9.0 in openconfig-interfaces.yang.

Change-Id: I38c19a483b18e47f583c81a0b98597888405892f
@ostromart
ostromart force-pushed the feature/eth-in-link-down-discards branch from 4cc054e to b7c977e Compare July 29, 2026 18:31
@ostromart ostromart changed the title Add ingress link-down discard counter to Ethernet interface counters Add ingress link-down discard counter to interface counters Jul 29, 2026
@ostromart ostromart changed the title Add ingress link-down discard counter to interface counters Add ingress link-down discard counter to interface and subinterface counters Jul 31, 2026
@ostromart
ostromart force-pushed the feature/eth-in-link-down-discards branch from ae229bb to 2ae7d82 Compare July 31, 2026 00:33
@ostromart

Copy link
Copy Markdown
Contributor Author

This PR is intended to merge after #1527 and the version reflects that.

This change bumps openconfig-version to 3.10.0 and updates revision history in openconfig-interfaces.yang to reflect sequential merge order after PR 1527 (3.9.0).

Change-Id: I38c19a483b18e47f583c81a0b98597888405892f
@ostromart
ostromart force-pushed the feature/eth-in-link-down-discards branch from 2ae7d82 to c72e467 Compare July 31, 2026 00:49
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.

2 participants