ptf
ptf copied to clipboard
Packet Test Framework
Looking for more details for the "openflow" license I followed the URI in the docs http://www.openflowswitch.org/wp/legal/ This gives me a 404 error.
except those few places where scapy is actually a requirement, e.g. in the code that actually imports Scapy as the selected packet manipulation module.
We should consider deprecating nnpy and replacing it with an equivalent nanomsg library. It's not maintained and the installation can fail on more recent versions.
We need a thread safe method to **flush counters** in dataplane, as there may many thread sharing the same dataplane instance:(https://github.com/p4lang/ptf/blob/c554f83685186be4cfa9387eb5d6d700d2bbd7c0/src/ptf/__init__.py#L20 Counters: https://github.com/p4lang/ptf/blob/c554f83685186be4cfa9387eb5d6d700d2bbd7c0/src/ptf/dataplane.py#L571-L575
Source code: #https://github.com/p4lang/ptf/blob/c554f83685186be4cfa9387eb5d6d700d2bbd7c0/src/ptf/dataplane.py#L900 Simplified code: ```python def poll( self, device_number=0, port_number=None, timeout=None, exp_pkt=None, filters=[] ): def grab(): self.logger.debug("Grabbing packet") for rcv_port_number, pkt, time in self.packets(device_number, port_number): rcv_device_number = device_number if...