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:
Params
Parameters 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:
TestSuite
Packet Capture TestSuite.
- packets
List of packets to send for testing dumpcap.
- Type:
list[scapy.packet.Packet]
- rx_pcap_path
The remote path where to create the Rx packets pcap with dumpcap.
- Type:
pathlib.PurePath
- tx_pcap_path
The remote path where to create the Tx packets pcap with dumpcap.
- Type:
pathlib.PurePath
- set_up_suite() None
Test suite setup.
Prepare the packets, file paths and queue range to be used in the test suite.
- test_dumpcap() None
Test dumpcap on Rx and Tx interfaces.
- Steps:
Start up testpmd shell.
Start up dpdk-dumpcap with the default values.
Send packets.
- Verify:
The expected packets are the same as the Rx packets.
The Tx packets are the same as the packets received from Scapy.
- test_dumpcap_filter() None
Test the dumpcap filtering feature.
- Steps:
Start up testpmd shell.
Start up dpdk-dumpcap listening for TCP packets on the Rx interface.
Send packets.
- Verify:
The dumped packets did not contain any of the packets meant for filtering.