1. get software
1
2
| git libtool automake build-essential pkg-config libssl-dev doxygen libconfig-dev libnuma-dev libpcap-dev net-tools
ln -s /usr/bin/python3 /usr/bin/python |
git libtool automake build-essential pkg-config libssl-dev doxygen libconfig-dev libnuma-dev libpcap-dev net-tools
ln -s /usr/bin/python3 /usr/bin/python
2. compile dpdk
1
| git clone http://dpdk.org/git/dpdk-stable --branch 19.11 --depth 1 dpdk-19.11 |
git clone http://dpdk.org/git/dpdk-stable --branch 19.11 --depth 1 dpdk-19.11
run dpdk-19.11/usertools/dpdk-setup.sh
>>> select and run "x86_64-native-linuxapp-gcc"
>>> Exit Script
3. compile odp-dpdk
1
| git clone https://github.com/OpenDataPlane/odp-dpdk.git |
git clone https://github.com/OpenDataPlane/odp-dpdk.git
odp-dpdk/m4/odp_dpdk.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
| # _ODP_DPDK_LEGACY(PATH, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
# ------------------------------------------------------------------------
# Locate DPDK installation
AC_DEFUN([_ODP_DPDK_LEGACY], [dnl
DPDK_CFLAGS="-isystem $1/include"
DPDK_LIB_PATH="$1/lib"
DPDK_LDFLAGS="-L$DPDK_LIB_PATH"
AS_IF([test -r "$DPDK_LIB_PATH"/libdpdk.so], [dnl
DPDK_RPATH="-Wl,-rpath,$DPDK_LIB_PATH"
DPDK_RPATH_LT="-R$DPDK_LIB_PATH"
DPDK_SHARED=yes],
[test ! -r "$DPDK_LIB_PATH"/libdpdk.a], [dnl
AC_MSG_FAILURE([Could not find DPDK])]) |
# _ODP_DPDK_LEGACY(PATH, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
# ------------------------------------------------------------------------
# Locate DPDK installation
AC_DEFUN([_ODP_DPDK_LEGACY], [dnl
DPDK_CFLAGS="-isystem $1/include"
DPDK_LIB_PATH="$1/lib"
DPDK_LDFLAGS="-L$DPDK_LIB_PATH"
AS_IF([test -r "$DPDK_LIB_PATH"/libdpdk.so], [dnl
DPDK_RPATH="-Wl,-rpath,$DPDK_LIB_PATH"
DPDK_RPATH_LT="-R$DPDK_LIB_PATH"
DPDK_SHARED=yes],
[test ! -r "$DPDK_LIB_PATH"/libdpdk.a], [dnl
AC_MSG_FAILURE([Could not find DPDK])])
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| #!/bin/sh
DPDK_PATH=/home/eu/work/dpdk/dpdk-19.11/x86_64-native-linuxapp-gcc
cd odp-dpdk
./bootstrap
#--enable-debug --enable-debug-print
#--without-openssl
./configure --with-dpdk-path=${DPDK_PATH} \
--prefix=`pwd`/installed \
--enable-debug=full \
--enable-helper-debug \
--enable-debug-print \
--enable-helper-debug-print \
--disable-shared
make install |
#!/bin/sh
DPDK_PATH=/home/eu/work/dpdk/dpdk-19.11/x86_64-native-linuxapp-gcc
cd odp-dpdk
./bootstrap
#--enable-debug --enable-debug-print
#--without-openssl
./configure --with-dpdk-path=${DPDK_PATH} \
--prefix=`pwd`/installed \
--enable-debug=full \
--enable-helper-debug \
--enable-debug-print \
--enable-helper-debug-print \
--disable-shared
make install
4. compile ofp
1
| git clone https://github.com/OpenFastPath/ofp.git |
git clone https://github.com/OpenFastPath/ofp.git
1
2
3
4
5
6
7
8
9
10
11
12
13
| #!/bin/sh
ODP_DPDK_PATH=`pwd`/odp-dpdk/installed
cd ofp
./bootstrap
./configure --with-odp=${ODP_DPDK_PATH} \
--with-odp-lib=odp-dpdk \
--disable-shared \
--enable-debug=yes \
--enable-sp=no \
--prefix=`pwd`/installed
make install |
#!/bin/sh
ODP_DPDK_PATH=`pwd`/odp-dpdk/installed
cd ofp
./bootstrap
./configure --with-odp=${ODP_DPDK_PATH} \
--with-odp-lib=odp-dpdk \
--disable-shared \
--enable-debug=yes \
--enable-sp=no \
--prefix=`pwd`/installed
make install
5. setup dpdk
1
2
3
4
| cd dpdk-19.11/x86_64-native-linuxapp-gcc/kmod
modprobe uio
insmod igb_uio.ko
ifconfig ens33 down |
cd dpdk-19.11/x86_64-native-linuxapp-gcc/kmod
modprobe uio
insmod igb_uio.ko
ifconfig ens33 down
run dpdk-19.11/usertools/dpdk-setup.sh
>>> select and run "Setup hugepage mappings for non-NUMA systems", enter 128
>>> select and run "Bind Ethernet/Baseband/Crypto device to IGB UIO module", will display like
0000:02:01.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' if=ens33 drv=e1000 unused=igb_uio,vfio-pci
>>>>>> enter 02:01.0
>>> Exit Script
6. test
let the vmware guest machine use NAT.
use ipconfig check ip settings in host machine. for example, my ip for "VMware Network Adapter VMnet8" is 192.168.204.1.
ofp/example/webserver/ofp.cli
1
2
3
| debug 0
loglevel set debug
ifconfig fp0 192.168.204.33/24 |
debug 0
loglevel set debug
ifconfig fp0 192.168.204.33/24
ofp/example/webserver/www/aa.txt
ofp/example/webserver/run.sh
1
2
| export www_dir=`pwd`/www
./webserver -i 0 -f ofp.cli |
export www_dir=`pwd`/www
./webserver -i 0 -f ofp.cli
using web browser access
1
| http://192.168.204.33:2048/aa.txt |
http://192.168.204.33:2048/aa.txt