packet_capture Test Suite
Packet capture test suite.
Test the DPDK packet capturing framework through the combined use of testpmd and dumpcap.
- class DumpcapParams
Bases:
ParamsParameters for the dpdk-dumpcap app.
- lcore_list
The list of logical cores to use.
- Type:
- file_prefix
The DPDK file prefix that the primary DPDK application is using.
- Type:
str | None
- interface
The PCI address of the interface to capture.
- Type:
str
- output_pcap_path
The path to the pcapng file to dump captured packets into.
- Type:
pathlib.PurePath
- packet_filter
A packet filter in libpcap filter syntax.
- Type:
str | None
- __init__(*, lcore_list: framework.testbed_model.cpu.LogicalCoreList | None = None, file_prefix: str | None = None, interface: str, output_pcap_path: PurePath, packet_filter: str | None = None) None
- class TestPacketCapture
Bases:
TestSuitePacket Capture TestSuite.
- packets
List of packets to send for testing dumpcap.
- Type:
list[scapy.packet.Packet]
- rx_pcap
The artifact associated with the Rx packets pcap created by dumpcap.
- tx_pcap
The artifact associated with the Tx packets pcap created by dumpcap.
- set_up_suite() None
Test suite setup.
Prepare the packets, file paths and queue range to be used in the test suite.
- set_up_test_case()
Test case setup.
Prepare the artifacts for the Rx and Tx pcap files.
- dumpcap() None
Test dumpcap on Rx and Tx interfaces.
- Steps:
Start testpmd.
Start up dpdk-dumpcap with the default values.
Send packets.
- Verify:
Expected packets are the same as the Rx packets.
Tx packets are the same as the packets received from Scapy.
- dumpcap_filter() None
Test the dumpcap filtering feature.
- Steps:
Start testpmd.
Start up dpdk-dumpcap listening for TCP packets on the Rx interface.
Send packets.
- Verify:
Dumped packets did not contain any of the packets meant for filtering.