Install DPDK 18.11.1 LTS (Ubuntu 16.04.5 LTS)

Step 1. Check DPDK Support (http://dpdk.org/doc/nics)

$ sudo ethtool -i [NIC]

Step 2. Configure CPU and memory

$ sudo vi /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="default_hugepagesz=1G hugepagesz=1G hugepages=4" (1GB huge page setup)
GRUB_CMDLINE_LINUX_DEFAULT="default_hugepagesz=2M hugepagesz=2M hugepages=2048" (2MB huge page setup)

$ sudo update-grub

$ echo 'vm.nr_hugepages=4' >> /etc/sysctl.conf (1GB huge page setup)
$ echo 'vm.nr_hugepages=2048' >> /etc/sysctl.conf (2MB huge page setup)

$ mkdir /mnt/huge
$ mount -t hugetlbfs nodev /mnt/huge
$ sudo vi /etc/fstab (!TAB interval!)
nodev    /mnt/huge    hugetlbfs    defaults    0    0
$ sudo reboot

$ grep -i huge /proc/meminfo (1GB huge page)
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
HugePages_Total:       4
HugePages_Free:        4
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:    1048576 kB

Step 3. Install DPDK

$ echo "export DPDK_DIR=/usr/src/dpdk-stable-18.11.1" >> ~/.bashrc
$ echo "export DPDK_TARGET=x86_64-native-linuxapp-gcc" >> ~/.bashrc
$ echo "export DPDK_BUILD=\$DPDK_DIR/\$DPDK_TARGET" >> ~/.bashrc
$ . ~/.bashrc

$ sudo apt-get install -y make coreutils gcc-multilib python libnuma-dev curl
$ curl -LO http://fast.dpdk.org/rel/dpdk-18.11.1.tar.xz
$ sudo tar xvfJ dpdk-18.11.1.tar.xz -C /usr/src/

$ cd $DPDK_DIR
$ sudo make install T=$DPDK_TARGET DESTDIR=install
or
$ cd $DPDK_DIR/usertools
$ sudo ./dpdk-setup.sh

$ sudo reboot

 

Leave a Reply

Your email address will not be published. Required fields are marked *