Search code examples
dpdk

Problems in pktgen build


DPDK and PKTGEN version 20.07 , and have followed all commands in the install.md .

I get this warning which is being treated as an error

`

FAILED: lib/common/3d47a30@@common@sta/core_info.c.o
cc -Ilib/common/3d47a30@@common@sta -Ilib/common -I../lib/common -I/usr/local/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -include rte_config.h -march=native -MD -MQ 'lib/common/3d47a30@@common@sta/core_info.c.o' -MF 'lib/common/3d47a30@@common@sta/core_info.c.o.d' -o 'lib/common/3d47a30@@common@sta/core_info.c.o' -c ../lib/common/core_info.c
In file included from ../lib/common/core_info.c:27:
../lib/common/core_info.h: In function ‘lcore_mask’:
../lib/common/core_info.h:29:11: error: implicit declaration of function ‘rte_get_main_lcore’; did you mean ‘rte_get_next_lcore’? [-Werror=implicit-function-declaration]
   29 |     lid = rte_get_main_lcore();
      |           ^~~~~~~~~~~~~~~~~~
      |           rte_get_next_lcore
cc1: all warnings being treated as errors

Compiling C object 'app/a172ced@@pktgen@exe/pktgen-arp.c.o'.
ninja: build stopped: subcommand failed.


`

Mentioned above. I have also tried with 20.02 and the latest 22.11.


Solution

  • based on live debug and discussion, the solution to problem is suggested as

    1. use dpdk release download from here
    2. Download pktgen dpdk hosted project link

    As mentioned in the comment, the thumb rule is

    The right way to build pktgen is following same order (year of release) of DPDK. That is if you have pktgen-dpdk-pktgen-22.2.0.tar.gz use at least dpdk 22.01 or higher. If you have pktgen pktgen-dpdk-pktgen-20.11.3. use DPDK 20.11.1 or higher

    Always use release version major number of pktgen and dpdk to be same. This has more chance of getting it to work.