## ## Copyright (c) 2010-2020 Intel Corporation ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## Description ----------- This is PROX, the Packet pROcessing eXecution engine, part of Intel(R) Data Plane Performance Demonstrators, and formerly known as DPPD-BNG. PROX is a DPDK-based application implementing Telco use-cases such as a simplified BRAS/BNG, light-weight AFTR... It also allows configuring finer grained network functions like QoS, Routing, load-balancing... Compiling and running this application -------------------------------------- This application supports DPDK 16.04, 16.07, 16.11, 17.02, 17.05, 17.08, 17.11, 18.02, 18.05, 18.08, 18.11, 19.02, 19.05, 19.08, 19.11, 20.02, 20.05, 20.08, 20.11, 21.02, 21.05, 21.08, 21.11, 22.03, 22.07, 22.11 DPDK meson compilation ---------------------- Compilation with meson and ninja is supported since DPDK 18.02, while support for make has been removed in DPDK 20.11. Example: DPDK 20.11 installation with meson ------------------------------------------- cd /your/path/for/dpdk/meson/compilation/ git clone http://dpdk.org/git/dpdk-stable cd dpdk-stable/ git checkout 20.11 meson setup build # For DPDK 21.11 and above, please run: # meson setup -Denable_driver_sdk=true build # instead, or # meson configure build/ -Denable_driver_sdk=true # afterwards. cd build/ ninja sudo ninja install sudo ldconfig PROX meson compilation ---------------------- Depending on the distribution in use the DPDK libraries will be installed in different locations. The PKG_CONFIG_PATH environment variable is used to point to the correct location. On RHEL/CentOS: export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig On Ubuntu: export PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-gnu/pkgconfig cd /the/path/where/you/cloned/this/repo/ cd VNFs/DPPD-PROX/ meson setup build # Additional options can be specified on the 'meson setup' command line, or # using 'meson configure' afterwards. See the meson_options.txt file for # possible options. ninja -C build/ Legacy DPDK make compilation ---------------------------- Compilation with make has been supported until DPDK 20.08, and has been removed in DPDK 20.11. The following commands require that the following environment variables are properly defined, as shown in the examples below: - RTE_SDK: absolute path to the DPDK sources directory, - RTE_TARGET: target (arch-machine-execenv-toolchain format) for which we are building DPDK, - RTE_DEVEL_BUILD: set it to 'n' to prevent warnings to be considered as errors when building DPDK inside a git tree. Configuration options can be defined, before building DPDK, by means of appending lines into the config/defconfig_$RTE_TARGET file. For example, IPSec is supported in PROX (handle_esp.c) since DPDK 17.11, although it has not been recently verified, but it only gets compiled when CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y has been defined in DPDK configuration. It also requires AESNI_MULTI_BUFFER_LIB_PATH environment variable to point to the "Multi-Buffer Crypto for IPsec" library, which can be downloaded from https://github.com/intel/intel-ipsec-mb. See doc/guides/cryptodevs/aesni_mb.rst within DPDK sources directory for more details. Example: DPDK 20.05 installation with make ------------------------------------------ cd /your/path/for/dpdk/make/compilation/ git clone http://dpdk.org/git/dpdk cd dpdk/ git checkout v20.05 export RTE_SDK=$PWD export RTE_TARGET=x86_64-native-linuxapp-gcc export RTE_DEVEL_BUILD=n # Edit config/defconfig_$RTE_TARGET file to define options as needed. make config T=$RTE_TARGET O=$RTE_TARGET make O=$RTE_TARGET Legacy PROX make compilation ---------------------------- As explained above, PROX Makefile expects RTE_SDK to point to the DPDK sources directory. If RTE_TARGET is not set, it defaults to x86_64-native-linuxapp-gcc. cd /the/path/where/you/cloned/this/repo/ cd VNFs/DPPD-PROX/ export RTE_SDK=/your/path/for/dpdk/make/compilation/./dpdk/ export RTE_TARGET=x86_64-native-linuxapp-gcc export RTE_DEVEL_BUILD=n make Running PROX ------------ After DPDK has been installed and PROX has been compiled, the build subdirectory has been created and contains the PROX executable. The usage of the application is shown below. Note that this application assumes that all required ports have been bound to the DPDK provided igb_uio driver. Refer to the "Getting Started Guide" (http://doc.dpdk.org/guides/linux_gsg/ or doc/guides/linux_gsg/*.rst in DPDK sources directory) for more details. Usage: ./build/prox [-f CONFIG_FILE] [-l LOG_FILE] [-p] [-o DISPLAY] [-v] [-a|-e] \ [-m|-s|-i] [-n] [-w DEF] [-q] [-k] [-d] [-z] [-r VAL] [-u] [-t] -f CONFIG_FILE : configuration file to load, ./prox.cfg by default -l LOG_FILE : log file name, ./prox.log by default -p : include PID in log file name if default log file is used -o DISPLAY: Set display to use, can be 'curses' (default), 'cli' or 'none' -v verbosity : initial logging verbosity -a : autostart all cores (by default) -e : don't autostart -n : Create NULL devices instead of using PCI devices, useful together with -i -m : list supported task modes and exit -s : check configuration file syntax and exit -i : check initialization sequence and exit -u : Listen on UDS /tmp/prox.sock -t : Listen on TCP port 8474 -q : Pass argument to Lua interpreter, useful to define variables -w : define variable using syntax varname=value takes precedence over variables defined in CONFIG_FILE -k : Log statistics to file "stats_dump" in current directory -d : Run as daemon, the parent process will block until PROX is not initialized -z : Ignore CPU topology, implies -i -r : Change initial screen refresh rate. If set to a lower than 0.001 seconds, screen refreshing will be disabled While applications using DPDK typically rely on the core mask and the number of channels to be specified on the command line, this application is configured using a .cfg file. The core mask and number of channels is derived from this config. For example, to run the application from the source directory execute: user@target:~$ ./build/prox -f ./config/nop.cfg Provided example configurations ------------------------------- PROX can be configured either as the SUT (System Under Test) or as the Traffic Generator. Some example configuration files are provided, both in the config directory to run PROX as a SUT, and in the gen directory to run it as a Traffic Generator. A quick description of these example configurations is provided below. Additional details are provided in the example configuration files. Basic configurations, mostly used as sanity check: - config/nop.cfg - config/nop-rings.cfg - gen/nop-gen.cfg Simplified BNG (Border Network Gateway) configurations, using different number of ports, with and without QoS, running on the host or in a VM: - config/bng-4ports.cfg - config/bng-8ports.cfg - config/bng-qos-4ports.cfg - config/bng-qos-8ports.cfg - config/bng-1q-4ports.cfg - config/bng-ovs-usv-4ports.cfg - config/bng-no-cpu-topology-4ports.cfg - gen/bng-4ports-gen.cfg - gen/bng-8ports-gen.cfg - gen/bng-ovs-usv-4ports-gen.cfg Light-weight AFTR configurations: - config/lw_aftr.cfg - gen/lw_aftr-gen.cfg