Skip to content

Commit 4cef0ad

Browse files
committed
Add packet trimming counters
1 parent 14f908c commit 4cef0ad

5 files changed

Lines changed: 37 additions & 49 deletions

File tree

release/models/interfaces/openconfig-interfaces.yang

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module openconfig-interfaces {
1313
import openconfig-types { prefix oc-types; }
1414
import openconfig-extensions { prefix oc-ext; }
1515
import openconfig-transport-types { prefix oc-opt-types; }
16-
import openconfig-platform-integrated-circuit { prefix oc-ic; }
16+
import openconfig-qos-elements { prefix oc-qos; }
1717

1818
// meta
1919
organization "OpenConfig working group";
@@ -1373,7 +1373,7 @@ module openconfig-interfaces {
13731373

13741374
uses interface-common-counters-state;
13751375
uses interface-counters-state;
1376-
uses oc-ic:trim-pkts-counters-top;
1376+
uses oc-qos:trim-pkts-counters-top;
13771377
}
13781378
}
13791379

release/models/platform/openconfig-platform-integrated-circuit.yang

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@ module openconfig-platform-integrated-circuit {
2020
These components are generically forwarding NPUs or ASICs within
2121
the system for which configuration or state is applicable.";
2222

23-
oc-ext:openconfig-version "0.4.0";
24-
25-
revision "2026-04-30" {
26-
description
27-
"Add counters for packet trimming.";
28-
reference "0.4.0";
29-
}
23+
oc-ext:openconfig-version "0.3.1";
3024

3125
revision "2022-04-20" {
3226
description
@@ -178,43 +172,6 @@ module openconfig-platform-integrated-circuit {
178172
}
179173
}
180174

181-
grouping trim-pkts-counters-top {
182-
description
183-
"Structural grouping for packet trimming counters.";
184-
185-
leaf out-trim-pkts {
186-
type oc-yang:counter64;
187-
description
188-
"The number of packets that were trimmed and successfully
189-
transmitted.";
190-
}
191-
192-
uses trim-pkts-common-counters-top;
193-
}
194-
195-
grouping trim-pkts-common-counters-top {
196-
description
197-
"Structural grouping for packet trimming counters.
198-
Counters collected at port level, queue level and
199-
switch level.";
200-
201-
leaf trim-pkts {
202-
type oc-yang:counter64;
203-
description
204-
"The total number of packets that were trimmed.
205-
This counter includes both packets that were
206-
transmitted after trimming and those that were
207-
subsequently dropped.";
208-
}
209-
210-
leaf dropped-trim-pkts {
211-
type oc-yang:counter64;
212-
description
213-
"The number of packets that were trimmed but dropped due to a
214-
failed shared buffer admission on the trim queue.";
215-
}
216-
}
217-
218175
augment "/oc-platform:components/oc-platform:component/oc-platform:integrated-circuit" {
219176
description
220177
"Augment integrated circuit components with backplane-facing capacity and memory errors.";

release/models/platform/openconfig-platform-pipeline-counters.yang

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module openconfig-platform-pipeline-counters {
1010
import openconfig-extensions { prefix oc-ext; }
1111
import openconfig-platform { prefix oc-platform; }
1212
import openconfig-platform-integrated-circuit { prefix oc-ic; }
13+
import openconfig-qos-elements { prefix oc-qos; }
1314

1415
organization
1516
"OpenConfig working group";
@@ -221,7 +222,7 @@ module openconfig-platform-pipeline-counters {
221222
as it can be calculated by sum the sent
222223
trimmed packets and dropped trimmed packets.";
223224

224-
uses oc-ic:trim-pkts-common-counters-top;
225+
uses oc-qos:trim-pkts-counters-top;
225226
}
226227
}
227228
}

release/models/qos/openconfig-qos-elements.yang

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ submodule openconfig-qos-elements {
3939

4040
revision "2026-04-30" {
4141
description
42-
"Bump version to 2.2.0";
42+
"Add packet trimming counters.";
4343
reference "2.2.0";
4444
}
4545

@@ -1441,4 +1441,34 @@ submodule openconfig-qos-elements {
14411441
Differentiated Services";
14421442
}
14431443
}
1444+
1445+
grouping trim-pkts-counters-top {
1446+
description
1447+
"Structural grouping for packet trimming counters.
1448+
Counters collected at interface level, queue level and
1449+
integrated-circuit level.";
1450+
1451+
leaf trim-pkts {
1452+
type oc-yang:counter64;
1453+
description
1454+
"The total number of packets that were trimmed.
1455+
This counter includes both packets that were
1456+
transmitted after trimming and those that were
1457+
subsequently dropped.";
1458+
}
1459+
1460+
leaf out-trim-pkts {
1461+
type oc-yang:counter64;
1462+
description
1463+
"The number of packets that were trimmed and successfully
1464+
transmitted.";
1465+
}
1466+
1467+
leaf dropped-trim-pkts {
1468+
type oc-yang:counter64;
1469+
description
1470+
"The number of packets that were trimmed but dropped due to a
1471+
failed shared buffer admission on the trim queue.";
1472+
}
1473+
}
14441474
}

release/models/qos/openconfig-qos-mem-mgmt.yang

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ submodule openconfig-qos-mem-mgmt {
3333

3434
revision "2026-04-30" {
3535
description
36-
"Bump version to 2.1.0";
36+
"Bump version to 2.2.0";
3737
reference "2.2.0";
3838
}
3939

0 commit comments

Comments
 (0)