Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion release/models/interfaces/openconfig-interfaces.yang
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module openconfig-interfaces {
import openconfig-types { prefix oc-types; }
import openconfig-extensions { prefix oc-ext; }
import openconfig-transport-types { prefix oc-opt-types; }
import openconfig-platform-integrated-circuit { prefix oc-ic; }

// meta
organization "OpenConfig working group";
Expand Down Expand Up @@ -51,7 +52,13 @@ module openconfig-interfaces {
Section 4.c of the IETF Trust's Legal Provisions Relating
to IETF Documents (http://trustee.ietf.org/license-info).";

oc-ext:openconfig-version "3.8.1";
oc-ext:openconfig-version "3.9.0";

revision "2026-04-30" {
description
"Add port level packet trimming counters.";
reference "3.9.0";
}

revision "2026-01-06" {
description
Expand Down Expand Up @@ -1366,6 +1373,7 @@ module openconfig-interfaces {

uses interface-common-counters-state;
uses interface-counters-state;
uses oc-ic:trim-pkts-counters-top;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module openconfig-platform-integrated-circuit {

import openconfig-platform { prefix oc-platform; }
import openconfig-extensions { prefix oc-ext; }
import openconfig-yang-types { prefix oc-yang; }

organization "OpenConfig working group";
contact
Expand All @@ -19,7 +20,13 @@ module openconfig-platform-integrated-circuit {
These components are generically forwarding NPUs or ASICs within
the system for which configuration or state is applicable.";

oc-ext:openconfig-version "0.3.1";
oc-ext:openconfig-version "0.4.0";

revision "2026-04-30" {
description
"Add counters for packet trimming.";
reference "0.4.0";
}

revision "2022-04-20" {
description
Expand Down Expand Up @@ -171,6 +178,43 @@ module openconfig-platform-integrated-circuit {
}
}

grouping trim-pkts-counters-top {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Defining trim-pkts-counters-top / trim-pkts-common-counters-top in openconfig-platform-integrated-circuit.yang and then importing them from openconfig-interfaces.yang and openconfig-qos-interfaces.yang seems like awkward layering.

Packet trimming is a QoS feature, and its config already lives in qos (/qos/packet-trim/ in openconfig-qos.yang rev 2026-03-25). A more natural home is openconfig-qos-elements.yang, or a dedicated openconfig-packet-trim.yang submodule of qos.

description
"Structural grouping for packet trimming counters.";

leaf out-trim-pkts {
type oc-yang:counter64;
description
"The number of packets that were trimmed and successfully
transmitted.";
}

uses trim-pkts-common-counters-top;
}

grouping trim-pkts-common-counters-top {
description
"Structural grouping for packet trimming counters.
Counters collected at port level, queue level and
switch level.";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

port level, queue level and switch level

The "switch" level statement is inaccurate. The counters are added to "integrated-circuit" component. Multi asic devices will have multiple records.


leaf trim-pkts {
type oc-yang:counter64;
description
"The total number of packets that were trimmed.
This counter includes both packets that were
transmitted after trimming and those that were
subsequently dropped.";
}
Comment thread
sallylsy marked this conversation as resolved.

leaf dropped-trim-pkts {
type oc-yang:counter64;
description
"The number of packets that were trimmed but dropped due to a
failed shared buffer admission on the trim queue.";
}
Comment thread
sallylsy marked this conversation as resolved.
}

augment "/oc-platform:components/oc-platform:component/oc-platform:integrated-circuit" {
description
"Augment integrated circuit components with backplane-facing capacity and memory errors.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module openconfig-platform-pipeline-counters {
import openconfig-types { prefix oc-types; }
import openconfig-extensions { prefix oc-ext; }
import openconfig-platform { prefix oc-platform; }
import openconfig-platform-integrated-circuit { prefix oc-ic; }

organization
"OpenConfig working group";
Expand Down Expand Up @@ -65,10 +66,16 @@ module openconfig-platform-pipeline-counters {
5 blocks, is to have the abililty to receive all drop counters from
all 5 blocks, for example, with one request.";

oc-ext:openconfig-version "0.5.1";
oc-ext:openconfig-version "0.6.0";
oc-ext:catalog-organization "openconfig";
oc-ext:origin "openconfig";

revision "2026-04-30" {
description
"Add switch level packet trimming counters.";
reference "0.6.0";
}

revision "2023-10-08" {
description
"More detail description of pipe-line aggregated drop counters";
Expand Down Expand Up @@ -203,6 +210,20 @@ module openconfig-platform-pipeline-counters {
uses pipeline-counters-packet-host-interface-block-state;
}
}

container trim {
description
"Packet trimming counters for entire device.";
container state {
description
Copy link
Copy Markdown

@schornig schornig May 13, 2026

Choose a reason for hiding this comment

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

The IC-level trim container and the grouping it uses are inconsistent. The description says:

Total number of trimmed packets is not included as it can be calculated by sum the sent trimmed packets and dropped trimmed packets.

But trim-pkts-common-counters-top contains { trim-pkts, dropped-trim-pkts }, the total is included, and the missing counter is out-trim-pkts -> "The number of packets that were trimmed and successfully transmitted").

Suggest exposing the same three counters at all three levels (interface, queue, IC). NVIDIA hardware will expose all 3 counters at all 3 levels. The missing out-trim-pkts in IC would need to be handled by a vendor specific augmentation otherwise.

"State counters for packet trimming. Total
number of trimmed packets is not included
as it can be calculated by sum the sent
trimmed packets and dropped trimmed packets.";

uses oc-ic:trim-pkts-common-counters-top;
}
}
}

container drop {
Expand Down
8 changes: 7 additions & 1 deletion release/models/qos/openconfig-qos-elements.yang
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ submodule openconfig-qos-elements {
packets for transmission, including policer and shaper
functions";

oc-ext:openconfig-version "2.1.0";
oc-ext:openconfig-version "2.2.0";

revision "2026-04-30" {
description
"Bump version to 2.2.0";
reference "2.2.0";
}

revision "2026-03-25" {
description
Expand Down
71 changes: 64 additions & 7 deletions release/models/qos/openconfig-qos-interfaces.yang
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ submodule openconfig-qos-interfaces {
import openconfig-extensions { prefix oc-ext; }
import openconfig-interfaces { prefix oc-if; }
import openconfig-yang-types { prefix oc-yang; }
import openconfig-platform-integrated-circuit { prefix oc-ic; }

include openconfig-qos-elements;
include openconfig-qos-mem-mgmt;
Expand All @@ -25,8 +26,13 @@ submodule openconfig-qos-interfaces {
configuration and operational state associated with
interfaces.";

oc-ext:openconfig-version "2.1.0";
oc-ext:openconfig-version "2.2.0";

revision "2026-04-30" {
description
"Add queue level packet trimming counters.";
reference "2.2.0";
}
revision "2026-03-25" {
description
"Add parameters for packet trimming configuration";
Expand Down Expand Up @@ -421,7 +427,7 @@ submodule openconfig-qos-interfaces {
description
"Number of packets dropped by the queue due to overrun, that is tail-drop
or AMQ (RED, WRED, etc) induced drops as indicated by the attached
queue-management-profile";
queue-management-profile.";
}

leaf dropped-octets {
Expand Down Expand Up @@ -516,11 +522,61 @@ submodule openconfig-qos-interfaces {
}
}

grouping qos-interface-queue-root-top {
grouping qos-interface-input-queue-root-top {
description
"Top-level grouping for the queue associated with the
interface - used only for /qos/interfaces/interface/input
rather than in multiple contexts.";

container queues {
description
"Surrounding container for a list of queues that are
instantiated on an interface.";

list queue {
key "name";

description
"Top-level container for the queue associated with this
interface";

leaf name {
type leafref {
path "../config/name";
}
description
"Reference to the name of the queue
instantiated on the interface.";
}

container config {
description
"Configuration data for the queue associated with the
interface";

uses qos-interface-queue-config;
uses qos-interface-queue-root-config;
}

container state {
config false;
description
"Operational state data for the queue associated with the
interface";

uses qos-interface-queue-config;
uses qos-interface-queue-root-config;
uses qos-interface-queue-state;
}
}
}
}

grouping qos-interface-output-queue-root-top {
description
"Top-level grouping for the queue associated with the
interface - used only for /qos/interfaces/interface rather
than in multiple contexts.";
interface - used only for /qos/interfaces/interface/output
rather than in multiple contexts.";

container queues {
description
Expand Down Expand Up @@ -561,6 +617,7 @@ submodule openconfig-qos-interfaces {
uses qos-interface-queue-config;
uses qos-interface-queue-root-config;
uses qos-interface-queue-state;
uses oc-ic:trim-pkts-counters-top;
}
}
}
Expand Down Expand Up @@ -888,7 +945,7 @@ submodule openconfig-qos-interfaces {
}

uses qos-interface-classifier-top;
uses qos-interface-queue-root-top;
uses qos-interface-input-queue-root-top;
uses qos-interface-scheduler-top;
uses qos-interface-voqs-top;
}
Expand Down Expand Up @@ -999,7 +1056,7 @@ submodule openconfig-qos-interfaces {
}

uses qos-interface-classifier-top;
uses qos-interface-queue-root-top;
uses qos-interface-output-queue-root-top;
uses qos-interface-scheduler-top;
}
}
Expand Down
8 changes: 7 additions & 1 deletion release/models/qos/openconfig-qos-mem-mgmt.yang
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ submodule openconfig-qos-mem-mgmt {
per-queue basis, and determine how packets are marked/dropped within
the queue instantiation.";

oc-ext:openconfig-version "2.1.0";
oc-ext:openconfig-version "2.2.0";

revision "2026-04-30" {
description
"Bump version to 2.1.0";
reference "2.2.0";
}

revision "2026-03-25" {
description
Expand Down
8 changes: 7 additions & 1 deletion release/models/qos/openconfig-qos.yang
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ module openconfig-qos {
"This module defines configuration and operational state data
related to network quality-of-service.";

oc-ext:openconfig-version "2.1.0";
oc-ext:openconfig-version "2.2.0";

revision "2026-04-30" {
description
"Bump version to 2.2.0";
reference "2.2.0";
}

revision "2026-03-25" {
description
Expand Down
Loading