Skip to content

Commit

Permalink
Add trap flow counter support
Browse files Browse the repository at this point in the history
  • Loading branch information
Junchao-Mellanox committed Sep 18, 2021
1 parent a53f01d commit 8883f7b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dockers/docker-orchagent/enable_counters.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def enable_rates():
counters_db.set('COUNTERS_DB', 'RATES:PORT', 'PORT_ALPHA', DEFAULT_ALPHA)
counters_db.set('COUNTERS_DB', 'RATES:RIF', 'RIF_SMOOTH_INTERVAL', DEFAULT_SMOOTH_INTERVAL)
counters_db.set('COUNTERS_DB', 'RATES:RIF', 'RIF_ALPHA', DEFAULT_ALPHA)
counters_db.set('COUNTERS_DB', 'RATES:TRAP', 'TRAP_SMOOTH_INTERVAL', DEFAULT_SMOOTH_INTERVAL)
counters_db.set('COUNTERS_DB', 'RATES:TRAP', 'TRAP_ALPHA', DEFAULT_ALPHA)


def enable_counters():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
},
"QUEUE_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable"
},
"FLOW_CNT_TRAP": {
"FLEX_COUNTER_STATUS": "enable"
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-flex_counter.yang
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ module sonic-flex_counter {
}
}

container FLOW_CNT_TRAP {
/* HOSTIF_TRAP_COUNTER_FLEX_COUNTER_GROUP */
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
}

}
/* end of container FLEX_COUNTER_TABLE */
}
Expand Down

0 comments on commit 8883f7b

Please sign in to comment.