Skip to content

Commit

Permalink
Refactor FlexCounter class (#1020)
Browse files Browse the repository at this point in the history
FlexCounter class is a representation of flex counter group which supports querying multiple types of statistic/attributes. It supports multiple statistic/attribute types such as port counter, port debug counter, queue counter, queue attribute and so on. For each statistic/attribute type, it defines several member functions:

setXXXCounterList: e.g. setPortCounterList, setPortDebugCounterList
removeXXX: e.g. removePort, removeQueue
collectXXXCounters: e.g. collectPortCounters, collectQueueCounters
collectXXXAttr: e.g. collectQueueAttrs, collectPriorityGroupAttrs
so on

For different statistic/attribute types, these functions have very similar logic. This design document describes a proposal about how to refactor FlexCounter class by moving duplicate/similar logic to a single place.
  • Loading branch information
Junchao-Mellanox authored Jul 6, 2022
1 parent fd1e310 commit d84ba9f
Show file tree
Hide file tree
Showing 6 changed files with 257 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/flex_counter/add_counter_object_flow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d84ba9f

Please sign in to comment.