We need a thread safe method to flush counters in dataplane, as there may many thread sharing the same dataplane instance:(
|
dataplane_instance = None |
Counters:
|
# counters of received packets (may include packets which were dropped due to queue overflow) |
|
self.rx_counters = defaultdict(int) |
|
|
|
# counters of transmited packets |
|
self.tx_counters = defaultdict(int) |