Prox - Data Path Test Tool(DPDK based)
Data Plane Performance Test tool built on DPDK
Reference Links:
https://github.com/nvf-crucio/PROX
https://01.org/intel-data-plane-performance-demonstrators/documentation/prox-documentation
(Installation is outdated - not working)
PROX Installation:
Setup : VM - CentOS 7.3, Core 4, Memory 16GB.
Note: Use 2 Interfaces, 1 for management(Login), 1 for Traffic stuff(DPDK Driver)
Prerequisties:
sudo yum -y upgrade
sudo yum -y install net-tools wget gcc unzip libpcap-devel ncurses-devel libedit-devel pciutils lua-devel kernel-devel git
Grub update:
vi /etc/default/grub
include the boot parameters as below
default_hugepagesz=1G hugepagesz=1G hugepages=8
ex:
GRUB_CMDLINE_LINUX="console=tty0 crashkernel=auto console=ttyS0,115200 default_hugepagesz=1G hugepagesz=1G hugepages=8"
update the grub config:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Reboot the system:
sudo reboot
verify the huge page setting are updated?
[root@suresh1 build]# cat /proc/meminfo | grep Huge
AnonHugePages: 4096 kB
HugePages_Total: 8
HugePages_Free: 8
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 1048576 kB
[root@suresh1 build]#
Remount Huge pages
sudo mkdir -p /mnt/huge
sudo umount `awk '/hugetlbfs/ { print $2 }' /proc/mounts` >/dev/null 2>&1
sudo mount -t hugetlbfs nodev /mnt/huge/
Installing DPDK:
Moved to root user.
sudo -i
yum install git
download the dpdk
cd /root
git clone http://dpdk.org/git/dpdk
cd dpdk
git checkout v17.05-rc4
Set the enviroment variables and build
export RTE_SDK=/root/dpdk
export RTE_TARGET=x86_64-native-linuxapp-gcc
make install T=$RTE_TARGET
Thats all
Note : I got the build error
/root/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_net.c:215:5: error: ‘struct net_device’ has no member named ‘trans_start’
dev->trans_start = jiffies;
vi /root/dpdk/lib/librte_eal/linuxapp/kni/kni_net.c
comment the error line(215),
//dev->trans_start = jiffies;
and restart the build. It was succeeded.
Load the uio and igp_uio modules:
lsmod | grep -w "^uio" >/dev/null 2>&1 || sudo modprobe uio
lsmod | grep uio
lsmod | grep -w "^igb_uio" >/dev/null 2>&1 || sudo insmod $RTE_SDK/$RTE_TARGET/kmod/igb_uio.ko
lsmod | grep igb_uio
Check your ethernet drivers:
lspci | grep Ethernet
Check the ethernet interface status
cd /root/dpdk/usertools/
./dpdk-devbind.py --status
# ./dpdk-devbind.py --status-dev net
Network devices using DPDK-compatible driver
============================================
<none>
Network devices using kernel driver
===================================
0000:00:03.0 'Virtio network device 1000' if=eth0 drv=virtio-pci unused=igb_uio *Active*
Other Network devices
=====================
<none>
#
In the above snippet, ethernet interface (eth0) is binded with kernel.
Now, we should unbind the ethernet interface from kernel and bind with dpdk as below,
Ethernet interface should be unbinded from kernel driver and binded to dpdk driver (igb_uio)
./dpdk-devbind.py --force -u eth1
./dpdk-devbind.py --force --bind=igb_uio 0000:00:04.0
Note: You will loose the network connectivity on eth0, when this happens.
Hence its advise to have another management interface for this VM.
Logs:
[root@proxserver1 usertools]# ./dpdk-devbind.py --status-dev net
Network devices using DPDK-compatible driver
============================================
<none>
Network devices using kernel driver
===================================
0000:00:03.0 'Virtio network device 1000' if=eth0 drv=virtio-pci unused=igb_uio *Active*
0000:00:04.0 'Virtio network device 1000' if=eth1 drv=virtio-pci unused=igb_uio *Active*
Other Network devices
=====================
<none>
[root@proxserver1 usertools]#
[root@proxserver1 usertools]# ./dpdk-devbind.py --force --bind=igb_uio 0000:00:04.0
[root@proxserver1 usertools]#
[root@proxserver1 usertools]# ./dpdk-devbind.py --status-dev net
Network devices using DPDK-compatible driver
============================================
0000:00:04.0 'Virtio network device 1000' drv=igb_uio unused=
Network devices using kernel driver
===================================
0000:00:03.0 'Virtio network device 1000' if=eth0 drv=virtio-pci unused=igb_uio *Active*
Other Network devices
=====================
<none>
[root@proxserver1 usertools]#
Note: Once DPDK is enabled on that interface, this interface is not visible in IFCONFIG output. you can't use the Shell commands to access the interface such as PING.
PROX Tool installation:
Download the Prox
cd /root
git clone https://github.com/nvf-crucio/PROX
cd PROX/
make
Note : This the latest commit(at the time of writing this) of the master branch "5190d7f846dbf68db93b529932acb4b5b24ca54d", which i am using for this exercise.
It will generate the prox binary in the build folder.
copy the prox binary in to /usr/bin folder.
cd build
cp prox /usr/bin/.
Thats all.