Getting ready

You may install DPDK in your computer by using the following script:

$  sh 22_2_quickstart.sh

This script will take a few minutes to configure and install DPDK, and produce the following lines when it completes its successful installation:

..
Installation in /usr/local/ complete
DPDK Installation Complete.
  

The content of the script is described in detail in the following steps.

Install pcap dependencies, as DPDK depends on pcap for the user level packet capture:

$ sudo apt-get install libpcap-dev
Failure to have pcap in your system will fail the build with the error message "dpdk-stable-17.05.1/drivers/net/pcap/rte_eth_pcap.c:39:18: fatal error: pcap.h: No such file or directory"
  

Download DPDK's latest stable version from http://dpdk.org/download:

$ wget http://fast.dpdk.org/rel/dpdk-17.05.1.tar.xz

Extract and configure DPDK:

$ tar -xvf dpdk-17.05.1.tar.xz
$ cd dpdk-stable-17.05.1
$ make config T=x86_64-native-linuxapp-gcc DESTDIR=install 
Configuration done

Enable pcap as the pcap headers are required for the capture file format:

$ sed -ri 's,(PMD_PCAP=).*,1y,' build/.config

You have two options to build. Option 1 is to build manually using make (which we also have used in our script), and option 2 is to build using the provided dpdk-setup.sh script:

  • Option 1:
      $ make
      ..
      == Build app/test-crypto-perf
        CC main.o
        CC cperf_ops.o
        CC cperf_options_parsing.o
        CC cperf_test_vectors.o
        CC cperf_test_throughput.o
        CC cperf_test_latency.o
        CC cperf_test_verify.o
        CC cperf_test_vector_parsing.o
        LD dpdk-test-crypto-perf
        INSTALL-APP dpdk-test-crypto-perf
        INSTALL-MAP dpdk-test-crypto-perf.map
      Build complete [x86_64-native-linuxapp-gcc]
  • Option 2:
      $ cd usertools
      $ ./dpdk-setup.sh
      ------------------------------------------------
       Step 1: Select the DPDK environment to build
      ------------------------------------------------
      [1] arm64-armv8a-linuxapp-gcc
      [2] arm64-dpaa2-linuxapp-gcc
      [3] arm64-thunderx-linuxapp-gcc
      [4] arm64-xgene1-linuxapp-gcc
      [5] arm-armv7a-linuxapp-gcc
      [6] i686-native-linuxapp-gcc
      [7] i686-native-linuxapp-icc
      [8] ppc_64-power8-linuxapp-gcc
      [9] x86_64-native-bsdapp-clang
      [10] x86_64-native-bsdapp-gcc
      [11] x86_64-native-linuxapp-clang
      [12] x86_64-native-linuxapp-gcc
      [13] x86_64-native-linuxapp-icc
      [14] x86_x32-native-linuxapp-gcc
      ...
  

Choose one of the preceding fourteen options to build. I have used option 12 for my build. You may set up huge page mappings using options 18 or 19 in the setup script, or use the following commands:

$ sudo mkdir -p /mnt/huge
$ sudo mount -t hugetlbfs nodev /mnt/huge
$ sudo su
$ echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
  

Now you may install DPDK using the following command:

$ sudo make install
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.94.20