Toforge Com

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

English | Deutsch Log in or Sign up

Tutorials

Tutorial search

Tutorials Improve Network Performance with openDataplane and Open Fast P

Improve Network Performance with openDataplane and Open


Fast Path on Ubuntu 16.04

Ad I'm Mike King. Zack w ent above and beyond to help me succeed w ith Code For Cash.

Open Data Plane (ODP) On this page


The performance of Linux-based network solutions was one of Build the Environment Setup
the biggest issues in the past and that's why Intel started the Prerequisites
Data Plane Development Kit (DPDK) project. The goal of the Execution of the OFP Application
ODP environment is to provide a crossplatform framework for References
data plane applications. ODP is an open source project which
provides the environment for data plane applications. It is easy
to use, provides highperformance and is also portable across
various networking system on chip (SoCs) and instruction sets and architectures such as ARM and Intel. The OPD environment
consists of configuration files, services, APIs for different architectures and utilities which are optimized for the different underlying
hardware vendors. The purpose of the ODP environment is to separate the API from the underlying architectures and it is designed in
a way to support both software and hardware implementations to deeply exploit acceleration features present in modern SoCs.

Open Fast Path (OFP)

As we know, high-performance devices are required for the exponentially


growing data traffic which demands a fast packet processing devices or
Tiffany
10+ doesn't
have angerodor control*
day machines in the network. OpenFastPath is another open source implementation
of a high-performance TCP/IP stack which is helpful for network applications
with a traditional Linux stack. The main functionality of OFP is provided as a
Strong clumping
management library for different applications which are using ODP for the completion,
issues. execution model and framework. OFP supports both DPDK and ODP for high
And it's 50% lighter performance of network solutions.

Build the Environment Setup


As per OFP project website, it has been tested on generic 32/64bit x86 Linux machines. In this tutorial, OFP will be installed on an
Ubuntu 16.04 VM.

Prerequisites

The following steps are executed as root user. Run:

sudo -s

to become root on the server.

converted by Web2PDFConvert.com
The following packages are required to compile OFP and ODP code on Ubuntu.

These are mandatory for accessing and building ODP and OFP:

apt-get install git libtool automake build-essential pkg-config

However, following packages are options.

apt-get install libssl-dev valgrind libcunit1 libcunit1-doc libcunit1-dev

OFP path can be used with ODP and DPDK (intel). However, in this tutorial, ODP will be used with the OFP project. Using the git utility
to download the ODP code as shown below.

git clone https://git.linaro.org/lng/odp.git

Go into the root directory of the ODP source code and run the following command.

./bootstrap

converted by Web2PDFConvert.com
In this tutorial, the installation directory of ODP is "/usr/local/odp".

mkdir /usr/local/odp

Run the configure script with prefix option as shown in following screenshot.

./configure --prefix=/usr/local/odp/

The output of configure script is shown below.

converted by Web2PDFConvert.com
Run make and make install for the compilation and installation of ODP on the Ubuntu platform.

make

make install

converted by Web2PDFConvert.com
As shown below, download the OFP code by using the git command.

git clone https://github.com/OpenFastPath/ofp

Enter into the root directory of the OFP source code and run the ./bootstrap command.

cd ofp/
./bootstrap

The installation directory of the OFP project is "/usr/local/ofp". Run the following configure script to check the dependencies of the
project.

./configure --prefix=/usr/local/ofp/ --with-odp=/usr/local/odp/ --enable-cunit

converted by Web2PDFConvert.com
The output of the configure script is shown in the following snapshot.

Run the "make" command to build the OFP project code. It will take some time
to build the OFP application.

make

The following command will place the OFP project binaries and libraries inside the prefix path.

make install

converted by Web2PDFConvert.com
After installation, binaries and libraries are placed under the "/usr/local/ofp" path. All related test applications for the OFP project are
under the "bin" directory.

Execution of the OFP Application


To run the OFP application (fpm), go into the scripts directory under the root directory of the OFP source code.

By default, the fpm application runs on the eth0 interface. However, on ubuntu 16.04 LTS, the interface name is "enp0s3". The
following screenshot shows how the fpm application is run using the "start_device.sh" script.

converted by Web2PDFConvert.com
After running the "fpm" application, a new interface "fp0" will be created as shown below.

Run the following command to get access to CLI of the "fpm" application.

telnet localhost 2345

The CLI of the application supports several basic commands. The following screenshot shows the interface statistics using the "stat"
command. After running the fastpath application, the ethernet interface (enp0s3) will be disconnected from Linux and "NoARP" will be
set on it. The newly created virtual interface (fp0) will be used by Linux OS for communication now.

converted by Web2PDFConvert.com
References
http://www.opendataplane.org/wp-content/uploads/2014/01/ODPIntroductionandOverview-2014Jan29.pdf
http://www.openfastpath.org/index.php/service/technicaloverview/

view as pdf | print


Share this page: Tweet Follow

Suggested articles

8 Comment(s)
Add comment
Name * Email *

Submit comment
reCAPTCHA Submit comment

Please upgrade to a supported browser


to get a reCAPTCHA challenge.

Alternatively if you think you are getting


this page in error, please check your
internet connection and reload.
Why is this happening to me?

converted by Web2PDFConvert.com
Comments

From: alex Reply

Can you elaborate on the use cases for this ?


I'm not familiar with Dataplane and ODP. Why would somebody use this? What does it do for an aplication like MariaDB/MySQL ?

From: Dave Reply

When followig this example, I set the ip on the fp0 interface, but am unable to ping out from the server.
Incoming pings to the IP work, but not outgoing.

From: richard Reply

Me too! Did you ever work out what was going on?

From: JeffRegerator Reply

Hello,
While i try to compile OFP (following the instruction above step by by step) i get this error:
/home/hwk/fp2/ofp/example/fpm/app_main.c:229: undefined reference to `odph_linux_pthread_create'
/home/hwk/fp2/ofp/example/fpm/app_main.c:274: undefined reference to `odph_linux_pthread_join'
app_main.o: In function `start_performance':
/home/hwk/fp2/ofp/example/fpm/app_main.c:512: undefined reference to `odph_linux_pthread_create'
app_main.o: In function `main':
/home/hwk/fp2/ofp/example/fpm/app_main.c:287: undefined reference to `odph_linux_pthread_join'
../../lib/.libs/libofp.a(ofp_cli.o): In function `ofp_start_cli_thread':
/home/hwk/fp2/ofp/src/cli/ofp_cli.c:1741: undefined reference to `odph_linux_pthread_create'
../../lib/.libs/libofp.a(ofp_cli.o): In function `ofp_stop_cli_thread':
/home/hwk/fp2/ofp/src/cli/ofp_cli.c:1765: undefined reference to `odph_linux_pthread_join'
../../lib/.libs/libofp.a(ofp_init.o): In function `ofp_init_global':
/home/hwk/fp2/ofp/src/ofp_init.c:218: undefined reference to `odph_linux_pthread_create'
../../lib/.libs/libofp.a(ofp_init.o): In function `ofp_term_global':
/home/hwk/fp2/ofp/src/ofp_init.c:294: undefined reference to `odph_linux_pthread_join'
/home/hwk/fp2/ofp/src/ofp_init.c:295: undefined reference to `odph_linux_pthread_join'
/home/hwk/fp2/ofp/src/ofp_init.c:270: undefined reference to `odph_linux_pthread_join'
../../lib/.libs/libofp.a(ofp_ifnet.o): In function `ofp_ifnet_create':
/home/hwk/fp2/ofp/src/ofp_ifnet.c:319: undefined reference to `odph_linux_pthread_create'
/home/hwk/fp2/ofp/src/ofp_ifnet.c:328: undefined reference to `odph_linux_pthread_create'
collect2: error: ld returned 1 exit status
I could build ofp with devbuild_dpdk script and run the examples.But it didn't be compiled with "make".

From: Allan Reply

I get the following error trying to build OFP:


/usr/local/odp//include/odp/api/plat/shared_memory_types.h:23:39: fatal error: odp/api/shared_memory.h: No such file or directory
compilation termined.

Any ideas? My google foo is not turning up anything.

From: Allan Reply

After several failed attempts to solve this, I blew away the VM, reinstalled Ubuntu and tried again. It still fails when trying to compile
ofp. This time the error was a little different:

root@genesis01:~/download/ofp# make
Making all in scripts
make[1]: Entering directory '/home/abrand/download/ofp/scripts'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/abrand/download/ofp/scripts'
Making all in src
make[1]: Entering directory '/home/abrand/download/ofp/src'

converted by Web2PDFConvert.com
CC ofp_pkt_processing.lo
In file included from ofp_pkt_processing.c:35:0:
../include/ofpi.h:12:30: fatal error: odp/helper/linux.h: No such file or directory
compilation terminated.
Makefile:646: recipe for target 'ofp_pkt_processing.lo' failed
make[1]: *** [ofp_pkt_processing.lo] Error 1
make[1]: Leaving directory '/home/abrand/download/ofp/src'
Makefile:587: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
root@genesis01:~/download/ofp#

From: Ibraheem Reply

I faced this problem, OFP (master branch) supports only one ODP version: monarch_lts
On odp, try:
git checkout -b test_monarch_lts origin/monarch_lts

https://github.com/OpenFastPath/ofp/issues/148

From: Ibraheem Reply

CC ofp_pkt_processing.lo
In file included from /usr/local/odp//include/odp/api/barrier.h:22:0,
from /usr/local/odp//include/odp_api.h:31,
from /usr/local/odp//include/odp.h:21,
from ../include/ofpi.h:11,
from ofp_pkt_processing.c:35:
/usr/local/odp//include/odp/api/plat/shared_memory_types.h:23:39: fatal error: odp/api/abi/shared_memory.h: No such file or
directory
compilation terminated.
Makefile:646: recipe for target 'ofp_pkt_processing.lo' failed
make[1]: *** [ofp_pkt_processing.lo] Error 1
make[1]: Leaving directory '/home/ibraheem/ofp/src'
Makefile:587: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Tutorials Improve Network Performance with openDataplane and Open Fast P

Free Download

Sign up now!

Tutorial Info

Author: Ahmad
Tags: linux, netw orking, server, ubuntu

converted by Web2PDFConvert.com
Xenforo skin Contribute Contact Help Imprint

Howtoforge Terms

converted by Web2PDFConvert.com

You might also like