Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

DPDK Pdump in Open vSwitch* with DPDK

$
0
0

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.

DPDK Pdump

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.

The DPDK programmer's guide has a section dedicated to the pdump library which which contains more information about how it works.

Test Environment

The following describes how to set up an OVS DPDK configuration with one physical 'dpdk' port and the steps to set up the dpdk-pdump application to enable traffic capture on that port.

Figure 1 shows the test environment configuration.


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:

Processor

Intel® Xeon® processor E5-2695 v3 @ 2.30 GHz

Kernel

4.2.8-200

OS

Fedora* 22

Data Plane Development Kit

v16.07

Open vSwitch*

92690eae8aac24bba499da921206852951581836

Configuration Steps

  1. Build OVS with DPDK as described in the installation docs. Make sure DPDK is built with the following configuration options set:

    CONFIG_RTE_LIBRTE_PMD_PCAP=y
    CONFIG_RTE_LIBRTE_PDUMP=y

  2. 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

  3. 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

  4. Send some traffic to dpdk0 via traffic generator or otherwise.
  5. 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 2.2.2.2.0 > 1.1.1.1.0: Flags [none], seq 0:6, win 0, length 6
    13:14:44.126555 IP 2.2.2.2.0 > 1.1.1.1.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.

Conclusion

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.

Additional Information

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.

QoS Configuration and usage for Open vSwitch* with DPDK

Open vSwitch with DPDK Architectural Deep Dive

DPDK Open vSwitch: Accelerating the Path to the Guest

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.


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>