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) |
We need a thread safe method to flush counters in dataplane, as there may many thread sharing the same dataplane instance:(
ptf/src/ptf/__init__.py
Line 20 in c554f83
Counters:
ptf/src/ptf/dataplane.py
Lines 571 to 575 in c554f83