0%

Compile DPDK in ARMv8 machine

Hardware: D05 board.
System: Linux 157 4.11.0-45.el7.aarch64 aarch64 GNU/Linux
CentOS Linux release 7.4.1708 (AltArch)

  1. download dpdk codes
    git clone git://dpdk.org/dpdk

  2. install kernel header files
    yum install kernel-headers.aarch64

  3. install libpcap
    yum install libpcap-devel.aarch64

  4. install numa header files
    yum install numactl-devel.aarch64

  5. config and make
    make config T=arm64-armv8a-linuxapp-gcc
    make

    Note: above will put compiled files to dpdk/build

    “make install T=arm64-armv8a-linuxapp-gcc” will create a directory
    named as arm64-armv8a-linuxapp-gcc under dpdk and put compiled files
    in it.

  6. build the dpdk helloworld example:

    export RTE_SDK=~/repos/dpdk
    export RTE_TARGET=arm64-armv8a-linuxapp-gcc
    cd examples/helloworld/
    make

    1
    2
    note: should use "make install T=arm64-armv8a-linuxapp-gcc" in step4
    above to avoid compile error in step5.
  7. test helloworld in above build:

    (1) enable hugepage

    1
    2
    3
    4
    5
    6
    7
    8
    9
    echo 2 > /sys/kernel/mm/hugepages/hugepages-524288kB/nr_hugepages
    grep -i huge /proc/meminfo
    AnonHugePages: 0 kB
    ShmemHugePages: 0 kB
    HugePages_Total: 2
    HugePages_Free: 1
    HugePages_Rsvd: 0
    HugePages_Surp: 0
    Hugepagesize: 524288 kB

    (2) run ./helloworld -c 3 -n 2 in examples/helloworld

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    EAL: Detected 64 lcore(s)
    EAL: Detected 4 NUMA nodes
    EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
    EAL: No free hugepages reported in hugepages-524288kB
    EAL: No free hugepages reported in hugepages-524288kB
    EAL: 10 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
    EAL: Probing VFIO support...
    EAL: PCI device 0002:e9:00.0 on NUMA socket -1
    EAL: Invalid NUMA socket, default to 0
    EAL: probe driver: 8086:10fb net_ixgbe
    EAL: PCI device 0002:e9:00.1 on NUMA socket -1
    EAL: Invalid NUMA socket, default to 0
    EAL: probe driver: 8086:10fb net_ixgbe
    hello from core 1
    hello from core 0