Skip to content

Commit dfb6673

Browse files
Sevenarthpaul-szczepanek-arm
authored andcommitted
dts: add Scapy asynchronous sniffer
Currently packet capturing in Scapy is used by running Scapy's own class AsyncSniffer in the same shell as packet sending. Because there is some start up time involved in the AsyncSniffer, doing this every single time a test case requires it can become slow and unreliable if sniffer was not ready yet at the time of sending. Add a multi-threaded implementation for sniffing and capturing packets on-demand using Scapy. The sniffer lives in its own dedicated shell, which is setup for sniffing at the start up of the test run. Packets are only captured when requested by the tests through the use of Event signals. Signed-off-by: Luca Vizzarro <luca.vizzarro@arm.com> Reviewed-by: Paul Szczepanek <paul.szczepanek@arm.com> Reviewed-by: Dean Marx <dmarx@iol.unh.edu> Reviewed-by: Patrick Robb <probb@iol.unh.edu>
1 parent 063fef6 commit dfb6673

4 files changed

Lines changed: 239 additions & 113 deletions

File tree

dts/framework/test_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def next(self) -> State | None:
345345
test_run.ctx.sut_node.setup()
346346
test_run.ctx.tg_node.setup()
347347
test_run.ctx.dpdk.setup(test_run.ctx.topology.sut_ports)
348-
test_run.ctx.tg.setup(test_run.ctx.topology.tg_ports)
348+
test_run.ctx.tg.setup(test_run.ctx.topology.tg_ports, test_run.ctx.topology.tg_port_ingress)
349349

350350
self.result.ports = test_run.ctx.topology.sut_ports + test_run.ctx.topology.tg_ports
351351
self.result.sut_info = test_run.ctx.sut_node.node_info

0 commit comments

Comments
 (0)