Running a VNF Application With DPDK
This video shows how to run a DPDK testpmd application to do simple forwarding packet in a VM, with pktgen as a traffic generator. The traffic generator generates IP packet and measure its throughput.
Hi, I'm Irene. In this video I will be showing you how to set up and run a Virtual Network Function, or a VNF application. We will be using the DPDK application to create a simple VNF application for an NFV use case. Stay tuned to learn more.
We will create an inter-VM service chain, VNF application. We will configured two VMs. The first VM is to run a simple packet-forwarding application using Intel DPDK. The second VM will be set up as a packet generator to generate and measure the VNF forwarding throughput. The VMs will be running on top of OVS with DPDK.
First, let me show you how to set up and run a simple Intel DPDK fowarding application in the VM. We will be using QEMU KVM to launch the VM. Let's name the VM as VNF-VM. We will assign vhost-user 0 and vhost-user 1 to the VNF-VM. Once the VNF-VM boots up, log in and copy the DPDK source code into the VM. Compile the DPDK code. We will be using testpmd with forward IO mode, to do as simple packet-forwarding. Compile testpmd source code.
Next, we will start testpmd application to run with two VCPUs, one core for test VMD application and the other core for a DPDK poll mode driver or PMD thread.
In this setup, a single PMD thread will be used in the VM for packet forwarding. We then type the following commands to start the forwarding mode. Next, we will set up and run the second VM as a packet generator. Let's call this VM as tenant-vm. We launch tenant-vm with QEMU KVM. We will assign vhost-user 2 and vhost-user 3 to the tenant-vm. Once the VM boots up, copy DPDK source to the VM. We will use pktgen application, which compiles and runs with DPDK. You can download pktgen in the links below. Compile DPDK and then pktgen.
We start pktgen application by running the following command. Let's start generating 1000 packets from port 0. Type "Set 0 count 1000". To start traffic type "Start 0". You can see port 0 shows 1000 transmitted packets and port 1 shows 1000 receive packets. The output reports packets per second and megabits per second. Now you have a functional VNF application running on OVS with DPDK.
Thanks for watching. You can assess the next video to learn to debug and trace packets that are forwarded in a VNF application in the links below. Make sure you like this video and subscribe to the Intel Software YouTube channel, and don't forget to check us out on Facebook.