-
Notifications
You must be signed in to change notification settings - Fork 699
Add packet trimming counters #1458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
|
@@ -171,6 +178,43 @@ module openconfig-platform-integrated-circuit { | |
| } | ||
| } | ||
|
|
||
| grouping trim-pkts-counters-top { | ||
| 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."; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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."; | ||
| } | ||
|
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."; | ||
| } | ||
|
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."; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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"; | ||
|
|
@@ -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"; | ||
|
|
@@ -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 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The IC-level
But 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 |
||
| "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 { | ||
|
|
||
There was a problem hiding this comment.
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-topinopenconfig-platform-integrated-circuit.yangand then importing them fromopenconfig-interfaces.yangandopenconfig-qos-interfaces.yangseems 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 dedicatedopenconfig-packet-trim.yangsubmodule of qos.