Skip to content
Merged
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
38 changes: 31 additions & 7 deletions src/sonic-yang-models/doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* [CRM](#crm)
* [CRM DASH](#crm-dash)
* [DEBUG_COUNTER and DEBUG_COUNTER_DROP_REASON](#debug_counter-and-debug_counter_drop_reason)
* [DEBUG_DROP_MONITOR](#debug_drop_monitor)
* [DEFAULT_LOSSLESS_BUFFER_PARAMETER](#DEFAULT_LOSSLESS_BUFFER_PARAMETER)
* [Device Metadata](#device-metadata)
* [Device neighbor metada](#device-neighbor-metada)
Expand Down Expand Up @@ -987,19 +988,27 @@ DEBUG_COUNTER:
```
; DEBUG_COUNTER table

key = DEBUG_COUNTER_TABLE:name
name = string
type = (SWITCH_INGRESS_DROPS|PORT_INGRESS_DROPS|SWITCH_EGRESS_DROPS|PORT_EGRESS_DROPS)
alias = string (optional)
description = string (optional)
group = string (optional)
key = DEBUG_COUNTER_TABLE:name
name = string
type = (SWITCH_INGRESS_DROPS|PORT_INGRESS_DROPS|SWITCH_EGRESS_DROPS|PORT_EGRESS_DROPS)
alias = string (optional)
description = string (optional)
group = string (optional)
drop_monitor_status = admin_mode (enabled/disabled, default disabled)
drop_count_threshold = uint64 (optional)
incident_count_threshold = uint64 (optional)
window = uint64 (optional)

"DEBUG_COUNTER": {
"DEBUG_4": {
"alias": "BAD_DROPS",
"desc": "More port ingress drops",
"group": "BAD",
"type": "SWITCH_INGRESS_DROPS"
"type": "SWITCH_INGRESS_DROPS",
"drop_monitor_status": "disabled",
"drop_count_threshold": "10",
"incident_count_threshold": "2",
"window": "300"
}
}
```
Expand All @@ -1016,6 +1025,21 @@ reason = a valid drop reason without the 'SAI_IN/OUT_DROP_REASON_' prefix (http
}
```

### DEBUG_DROP_MONITOR
Ingress and eggress port debug counter flows can be monitored for persistent drops using
debug drop monitor feature. This table shows the status and configurations of the feature which can
be modified via the CLI.

```
{
"DEBUG_DROP_MONITOR": {
"CONFIG": {
"status": "disabled",
}
}
}
```

### DEFAULT_LOSSLESS_BUFFER_PARAMETER

This table stores the default lossless buffer parameters for dynamic buffer calculation.
Expand Down
12 changes: 11 additions & 1 deletion src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -2225,6 +2225,12 @@
}
},

"DEBUG_DROP_MONITOR": {
"CONFIG": {
"status": "disabled"
}
},

"QUEUE": {
"Ethernet0|0": {
"scheduler": "TEST@0",
Expand Down Expand Up @@ -2936,7 +2942,11 @@
"alias": "BAD_DROPS",
"desc": "More port ingress drops",
"group": "BAD",
"type": "SWITCH_INGRESS_DROPS"
"type": "SWITCH_INGRESS_DROPS",
"drop_monitor_status": "disabled",
"drop_count_threshold": "10",
"incident_count_threshold": "2",
"window": "300"
}
},
"DEBUG_COUNTER_DROP_REASON": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,13 @@
"INVALID_DROP_REASON": {
"desc": "Add an invalid drop reason to a counter",
"eStrKey": "InvalidValue"
},

"VALID_DEBUG_DROP_MONITOR_STATUS": {
"desc": "Configure status to be enabled/disabled."
},
"INVALID_DEBUG_DROP_MONITOR_STATUS": {
"desc": "Configure invalid value for status.",
"eStrKey": "InvalidValue"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,23 @@
]
}
}
},
"VALID_DEBUG_DROP_MONITOR_STATUS": {
"sonic-debug-counter:sonic-debug-counter": {
"sonic-debug-counter:DEBUG_DROP_MONITOR": {
"CONFIG": {
"status": "enabled"
}
}
}
},
"INVALID_DEBUG_DROP_MONITOR_STATUS": {
"sonic-debug-counter:sonic-debug-counter": {
"sonic-debug-counter:DEBUG_DROP_MONITOR": {
"CONFIG": {
"status": "invalid"
}
}
}
}
}
37 changes: 37 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-debug-counter.yang
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,31 @@ module sonic-debug-counter {
description "Group name to organize counters";
}

leaf drop_monitor_status {
type stypes:admin_mode;
default "disabled";
description "Indicates whether the feature is enabled or disabled.";
}

leaf window {
type uint64;
default 900;
units seconds;
description "The length of the time window in seconds";
}

leaf incident_count_threshold {
type uint64;
default 3;
description "The number of incidents that have to occur per window for it to be registered as a syslog";
}

leaf drop_count_threshold {
type uint64;
default 100;
description "The number of packet drops required for being classified as an incident";
}

leaf type {
type stypes:debug_counter_type;
mandatory true;
Expand All @@ -71,5 +96,17 @@ module sonic-debug-counter {
}
}
}

container DEBUG_DROP_MONITOR {
container CONFIG {
description "Stores configuration for debug drop monitor in CONFIG_DB";

leaf status {
type stypes:admin_mode;
default "disabled";
description "Indicates whether the feature is enabled or disabled.";
}
}
}
}
}
Loading