This article describes the concept of DPDK pdump, how it can be tested, and the benefits the feature brings to Open vSwitch* (OVS) with the Data Plane Development Kit (DPDK). This article was written with users of OVS in mind who want to know more about the feature and for those who want to monitor traffic on DPDK devices in their OVS DPDK setup.
Note: DPDK pdump in OVS with DPDK is available on both the OVS master branch and the 2.6 release branch. Users can download the OVS master branch as a zip or the 2.6 branch as a zip, and installation steps for the OVS master branch and 2.6 branch.
The pdump library was introduced in DPDK v16.07 to allow users of DPDK-based applications to monitor and capture the traffic passing on DPDK devices.
The pdump library uses a client-server model. The DPDK-based application (OVS DPDK) acts as the server and is responsible for initializing the pdump framework. OVS DPDK will initialize the pdump framework on startup if the 'pmd_pcap' and 'pdump' DPDK configuration options are set in DPDK when linking with OVS. This process is described in the installation documentation as well as in the Configuration Steps section of this article.
A separate, secondary DPDK process must be launched that acts as the client and is responsible for enabling and disabling the packet capture. An example of an existing application that can be used as the client is the dpdk-pdump application, which can be found in the 'app' directory of the DPDK. Further details of its usage can be found in the Configuration Steps section and in the DPDK documentation.
A performance decrease is expected when a monitoring application like dpdk-pdump is used.
Figure 1: Open vSwitch* with the Data Plane Development Kit configuration with one physical port and the librte_pdump library initialized. The dpdk-pdump DPDK sample application is being used to capture traffic passing on 'dpdk0' and saving the information in 'pkts.pcap'.
The setup used in this article consists of the following hardware and software components:
Intel® Xeon® processor E5-2695 v3 @ 2.30 GHz
Data Plane Development Kit
- Build OVS with DPDK as described in the installation docs. Make sure DPDK is built with the following configuration options set:
- Configure the switch as described in the Test Environment section, with one physical 'dpdk' port.
ovs-vsctl add-br br0
ovs-vsctl set Bridge br0 datapath_type=netdev
ovs-vsctl add-port br0 dpdk0
ovs-vsctl set Interface dpdk0 type=dpdk
- Launch the switch. Navigate to the 'app/pdump' directory in the DPDK. 'make' the application and launch like so:
sudo ./build/app/dpdk-pdump -- --pdump port=0,queue=*,rx-dev=/tmp/pkts.pcap --server-socket-path=/usr/local/var/run/openvswitch
- Send some traffic to dpdk0 via traffic generator or otherwise.
- Inspect the contents of 'pkts.pcap' using a tool that can interpret pcap files. One example is tcpdump:
$ tcpdump -r pkts.pcap
reading from file /tmp/pkts.pcap, link-type EN10MB (Ethernet)
13:14:42.4270163 IP 22.214.171.124.0 > 126.96.36.199.0: Flags [none], seq 0:6, win 0, length 6
13:14:44.126555 IP 188.8.131.52.0 > 184.108.40.206.0: Flags [none], seq 0:6, win 0, length 6
More information about the dpdk-pdump application as well as information about its usage can be found in the DPDK documentation, links to which can be found in the 'Addition Information' section.
In this article we described the DPDK pdump library and how it can be leveraged in OVS in order to capture traffic passing on DPDK ports.
DPDK pdump library: DPDK documentation
DPDK pdump sample application: DPDK documentation
Have a question? Feel free to follow up with the query on the Open vSwitch discussion mailing thread.
To learn more about OVS with DPDK, check out the following videos and articles on Intel® Developer Zone and Intel® Network Builders University.
About the Author
Ciara Loftus is a network software engineer with Intel. Her work is primarily focused on accelerated software switching solutions in user space running on Intel® architecture. Her contributions to OVS with DPDK include the addition of vHost User ports, NUMA-aware vHost User and DPDK v16.07 support.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.