Search code examples
dpdk

EAL initialization error on running DPDK sample program


Following error occurs on executing sample program ./basicfwd -c 1 -n 4 I have already set hugepages.

EAL: Detected 8 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available 16777216 kB hugepages reported
EAL: 1024 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
EAL: No free 524288 kB hugepages reported on node 0
EAL: No available 524288 kB hugepages reported
EAL: FATAL: Cannot get hugepage information.
EAL: Cannot get hugepage information.
EAL: Error - exiting with code: 1
  Cause: Error with EAL initialization

Please suggest how to resolve this error.


Solution

  • As per the logs the reason for the error is stated out as EAL: 1024 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size. This means the 2MB hugepages are not mounted.

    There are 2 ways to mount the hugepages

    1. using dpdk tool usertools/dpdk-hugepages.py --setup 1G
    2. manually mount the pages mount -t hugetlbfs hugetlbfs /path/to/hugepages2M -o pagesize=2M

    All these are clearly covered getting started dpdk guide. Hence I requested to please read up and follow as stated in the guide.