Get Started

Few simple steps …

INSTALL DEPENDENCIES

This project is currently verified on a generic 32/64bit x86 and ARM64 Linux machines.Up-to-date dependencies are documented in DEPENDENCIES file. The following packages are mandatory for accessing and building ODP:

automake autoconf libtool pkg-config libconfig libatomic openssl

It is possible to build ODP without OpenSSL by passing flag –without-openssl to configure script. However, this will result in ODP-LINUX not supporting any cryptography algorithms (except NULL) or strong random generation. Use at your own risk!

BUILD ODP-LINUX

ODP-LINUX reference implementation is a pure software implementation of ODP that can run on any platform that has a Linux kernel. ODP-LINUX can be configured to supports also DPDK and Netmap interfaces. These interfaces provide superior performance compared to standard Linux sockets.Download the latest ODP code:

 git clone https://github.com/OpenDataPlane/odp.git 

Enter the ODP directory, prepare for build and build:

./bootstrap 
./configure 
make 

BUILD ODP-DPDK

On platforms supporting DPDK one can optionally use ODP-DPDK reference implementation. ODP-DPDK is derived from ODP-LINUX, but it is optimized using the full DPDK SDK, and tries to connect as many DPDK API’s to ODP as possible.Check DPDK installation instructions and supported versions from README file.Download the latest ODP code:

 git clone https://github.com/OpenDataPlane/odp-dpdk.git 

If DPDK is not installed to standard system path, the installation directory can be passed using –with-dpdk-path flag.Enter the ODP directory, prepare for build and build:

 ./bootstrap 
./configure --with-dpdk-path=dpdk_install_path
make 

RUN EXAMPLE APPLICATION

Hello

Hello is a minimal application which demonstrates the startup and shutdown steps of an ODP application. It can be also used to debug API related build problems, etc. It does not use helpers to minimize dependency to anything else than the ODP API header file.

You should get an output similar to this:

# cd example/hello/
# ./odp_hello
HW time counter freq: 2596997051 hz

Pool config:
  pool.pkt.max_num: 262143

Queue config:
  queue_basic.max_queue_size: 8192
  queue_basic.default_queue_size: 4096

Using scheduler 'basic'
Scheduler config:
  sched_basic.prio_spread: 4
  sched_basic.prio_spread_weight: 63
  sched_basic.burst_size_default[] =  32  32  32  32  32  16   8   4
  sched_basic.burst_size_max[] =     255 255 255 255 255  16  16   8
  sched_basic.group_enable.all: 1
  sched_basic.group_enable.worker: 1
  sched_basic.group_enable.control: 1

...
Hello world from CPU 1!
L2FWD

L2FWD is performance optimized example application which forwards packets between the network interfaces given as command line arguments. The application supports a wide variety of processing modes and options. Use --help command line argument to get more instructions.

When running L2FWD you should get an output similar to this:

# cd test/performance/
# sudo ./odp_l2fwd -i ens1f1,ens2f1
HW time counter freq: 2596995565 hz

Pool config:
  pool.pkt.max_num: 262143

Queue config:
  queue_basic.max_queue_size: 8192
  queue_basic.default_queue_size: 4096

Using scheduler 'basic'
Scheduler config:
  sched_basic.prio_spread: 4
  sched_basic.prio_spread_weight: 63
  sched_basic.burst_size_default[] =  32  32  32  32  32  16   8   4
  sched_basic.burst_size_max[] =     255 255 255 255 255  16  16   8
  sched_basic.group_enable.all: 1
  sched_basic.group_enable.worker: 1
  sched_basic.group_enable.control: 1

PKTIO: initialized loop interface.
PKTIO: initialized pcap interface.
PKTIO: initialized null interface.
PKTIO: initialized socket mmap, use export ODP_PKTIO_DISABLE_SOCKET_MMAP=1 to disable.
PKTIO: initialized socket mmsg,use export ODP_PKTIO_DISABLE_SOCKET_MMSG=1 to disable.

ODP system info
---------------
ODP API version:  1.21.1
ODP impl name:    odp-linux
ODP impl details: odp-linux 1.21.1-0 (v1.21.1) 1.21.1.0
CPU model:        Intel(R) Xeon(R) CPU E5-2697 v3
CPU freq (hz):    2600000000
Cache line size:  64
CPU count:        27
CPU mask:         0xFFFFFFE

CPU features supported:
SSE3 PCLMULQDQ DTES64 MONITOR DS_CPL VMX SMX EIST TM2 SSSE3 FMA CMPXCHG16B XTPR PDCM PCID DCA SSE4_1 SSE4_2 X2APIC MOVBE POPCNT TSC_DEADLINE AES XSAVE OSXSAVE AVX F16C RDRAND FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE DIGTEMP ARAT PLN ECMD PTM MPERF_APERF_MSR ENERGY_EFF FSGSBASE AVX2 BMI2 ERMS INVPCID LAHF_SAHF SYSCALL XD 1GB_PG RDTSCP EM64T INVTSC

CPU features NOT supported:
CNXT_ID PSN TRBOBST ACNT2 BMI1 HLE SMEP RTM AVX512F LZCNT

Running ODP appl: "odp_l2fwd"
-----------------
IF-count:        2
Using IFs:       ens1f1 ens2f1
Mode:            PKTIN_DIRECT, PKTOUT_DIRECT

num worker threads: 1
first CPU:          27
cpu mask:           0x8000000

Pool info
---------
  pool            2
  name            packet pool
  pool type       packet
  pool shm        20
  user area shm   0
  num             16384
  align           64
  headroom        128
  seg len         2176
  max data len    65536
  tailroom        0
  block size      2752
  uarea size      0
  shm size        45152064
  base addr       0x7f632d600000
  uarea shm size  0
  uarea base addr (nil)

created pktio 1, dev: ens1f1, drv: socket_mmap
created 1 input and 1 output queues on (ens1f1)
created pktio 2, dev: ens2f1, drv: socket_mmap
created 1 input and 1 output queues on (ens2f1)

Queue binding (indexes)
-----------------------
worker 0
  rx: pktio 0, queue 0
  tx: pktio 1, queue 0
  rx: pktio 1, queue 0
  tx: pktio 0, queue 0

Port config
--------------------
Port 0 (ens1f1)
  rx workers 1
  tx workers 1
  rx queues 1
  tx queues 1
Port 1 (ens2f1)
  rx workers 1
  tx workers 1
  rx queues 1
  tx queues 1

[01] num pktios 2, PKTIN_DIRECT, PKTOUT_DIRECT
0 pps, 0 max pps,  0 rx drops, 0 tx drops
...

DIRECTORY STRUCTURE

./doc/ – Additional documentation
./example/ – Example applications
./include/  – API&ABI specification files
./platform/ – implementation files
./test/performance – Performance test applications
./test/validation/api – API validation tests

CONTINUOUS INTEGRATION

ODP uses GitHub Actions, Shippable, and codecov to test and validate changes made to the source code:

GitHub Actions

GitHub Actions are used for regression testing and cross compilation.

For instructions on how to enable GitHub Actions on your private fork visit our wiki page. For details on regression testing status, please check the Actions tab in GitHub.

Codecov

For code testing coverage, please visit the Codecov site.

APPLICATIONS

The exponential growth in data traffic puts ever-increasing demands on the packet processing elements in the network, resulting in a need for high performance IP packet handling. OpenFastPath is an open source implementation of a high performance TCP/IP stack that provides features that network application developers need to cope with today’s fast-paced network. To enable this packet processing OFP uses OpenDataPlane.