pktgen / Pktgen-DPDK

DPDK based packet generator
Other
388 stars 119 forks source link

unable to build pktgen with dpdk package provided by Mellanox #53

Closed catherinebeloinnokia closed 3 years ago

catherinebeloinnokia commented 3 years ago

Hello,

working on hardware PC HP EliteDesk 800 G1 SFF

installed in centos 8.3 (Linux vxpreint169 4.18.0-240.1.1.el8_3.x86_64 #1 SMP Thu Nov 19 17:20:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux)

installed Mellanox drivers, and also dpdk provided by Mellanox ISO, after Mellanox doc https://docs.mellanox.com/display/OFEDv521040/Installing+Mellanox+OFED:

(do all steps to add ISO RPMs contents as a new repo, get key) yum install mlnx-dpdk mlnx-dpdk-devel

get latest pktgen package as tarfile: wget https://git.dpdk.org/apps/pktgen-dpdk/snapshot/pktgen-21.01.0.tar.gz untar it and try to build -> failure:

cd /local/pktgen export RTE_TARGET=x86_64-native-linuxapp-gcc export RTE_SDK=/opt/mellanox/dpdk export PKG_CONFIG_PATH=/opt/mellanox/dpdk/lib64/pkgconfig

make build ... [9/66] Compiling C object 'lib/utils/4da8951@@utils@sta/_atoip.c.o'. FAILED: lib/utils/4da8951@@utils@sta/_atoip.c.o cc -Ilib/utils/4da8951@@utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utils@sta/_atoip.c.o' -MF 'lib/utils/4da8951@@utils@sta/_atoip.c.o.d' -o 'lib/utils/4da8951@@utils@sta/_atoip.c.o' -c ../lib/utils/_atoip.c In file included from ../lib/common/pg_strings.h:20,
from ../lib/utils/_atoip.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

      ^~~~~~~~~~~~~~~

compilation terminated. [10/66] Compiling C object 'lib/utils/4da8951@@utils@sta/portlist.c.o'. FAILED: lib/utils/4da8951@@utils@sta/portlist.c.o cc -Ilib/utils/4da8951@@utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utils@sta/portlist.c.o' -MF 'lib/utils/4da8951@@utils@sta/portlist.c.o.d' -o 'lib/utils/4da8951@@utils@sta/portlist.c.o' -c ../lib/utils/portlist.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/portlist.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

      ^~~~~~~~~~~~~~~

compilation terminated. [11/66] Compiling C object 'lib/utils/4da8951@@utils@sta/heap.c.o'. FAILED: lib/utils/4da8951@@utils@sta/heap.c.o cc -Ilib/utils/4da8951@@utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utils@sta/heap.c.o' -MF 'lib/utils/4da8951@@utils@sta/heap.c.o.d' -o 'lib/utils/4da8951@@utils@sta/heap.c.o' -c ../lib/utils/heap.c ../lib/utils/heap.c:8:10: fatal error: rte_spinlock.h: No such file or directory

include

      ^~~~~~~~~~~~~~~~

compilation terminated. [14/66] Compiling C object 'lib/common/3d47a30@@common@sta/cksum.c.o'. ninja: build stopped: subcommand failed. make: *** [Makefile:15: build] Error 1

+++

manual patch in file /local/pktgen/Builddir/build.ninja to try to solve this issue -> other failer later:

:%s@ARGS = -I@ARGS = -I/opt/mellanox/dpdk/include/dpdk -I@

make build ... FAILED: app/pktgen cc -o app/pktgen 'app/a172ced@@pktgen@exe/cli-functions.c.o' 'app/a172ced@@pktgen@exe/lpktgenlib.c.o' 'app/a172ced@@pktgen@exe/pktgen-cmds.c.o' 'app/a172ced@@pktgen@exe/pktgen.c.o' 'app/a172ced@@pktgen@exe/pktgen-cfg.c.o' 'app/a172ced@@pktgen@exe/pktgen-main.c.o' 'app/a172ced@@pktgen@exe/pktgen-pcap.c.o' 'app/a172ced@@pktgen@exe/pktgen-range.c.o' 'app/a172ced@@pktgen@exe/pktgen-cpu.c.o' 'app/a172ced@@pktgen@exe/pktgen-seq.c.o' 'app/a172ced@@pktgen@exe/pktgen-dump.c.o' 'app/a172ced@@pktgen@exe/pktgen-capture.c.o' 'app/a172ced@@pktgen@exe/pktgen-stats.c.o' 'app/a172ced@@pktgen@exe/pktgen-port-cfg.c.o' 'app/a172ced@@pktgen@exe/pktgen-ipv6.c.o' 'app/a172ced@@pktgen@exe/pktgen-ipv4.c.o' 'app/a172ced@@pktgen@exe/pktgen-arp.c.o' 'app/a172ced@@pktgen@exe/pktgen-gre.c.o' 'app/a172ced@@pktgen@exe/pktgen-ether.c.o' 'app/a172ced@@pktgen@exe/pktgen-tcp.c.o' 'app/a172ced@@pktgen@exe/pktgen-udp.c.o' 'app/a172ced@@pktgen@exe/pktgen-vlan.c.o' 'app/a172ced@@pktgen@exe/pktgen-random.c.o' 'app/a172ced@@pktgen@exe/pktgen-display.c.o' 'app/a172ced@@pktgen@exe/pktgen-log.c.o' 'app/a172ced@@pktgen@exe/pktgen-gtpu.c.o' 'app/a172ced@@pktgen@exe/pktgen-latency.c.o' 'app/a172ced@@pktgen@exe/pktgen-rate.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-O1 -Wl,--start-group lib/common/libcommon.a lib/utils/libutils.a lib/vec/libvec.a lib/plugin/libplugin.a lib/cli/libcli.a lib/lua/liblua.a -Wl,--as-needed /opt/mellanox/dpdk/lib64/librte_node.so /opt/mellanox/dpdk/lib64/librte_graph.so /opt/mellanox/dpdk/lib64/librte_bpf.so /opt/mellanox/dpdk/lib64/librte_flow_classify.so /opt/mellanox/dpdk/lib64/librte_pipeline.so /opt/mellanox/dpdk/lib64/librte_table.so /opt/mellanox/dpdk/lib64/librte_port.so /opt/mellanox/dpdk/lib64/librte_fib.so /opt/mellanox/dpdk/lib64/librte_ipsec.so /opt/mellanox/dpdk/lib64/librte_vhost.so /opt/mellanox/dpdk/lib64/librte_stack.so /opt/mellanox/dpdk/lib64/librte_security.so /opt/mellanox/dpdk/lib64/librte_sched.so /opt/mellanox/dpdk/lib64/librte_reorder.so /opt/mellanox/dpdk/lib64/librte_rib.so /opt/mellanox/dpdk/lib64/librte_regexdev.so /opt/mellanox/dpdk/lib64/librte_rawdev.so /opt/mellanox/dpdk/lib64/librte_pdump.so /opt/mellanox/dpdk/lib64/librte_power.so /opt/mellanox/dpdk/lib64/librte_member.so /opt/mellanox/dpdk/lib64/librte_lpm.so /opt/mellanox/dpdk/lib64/librte_latencystats.so /opt/mellanox/dpdk/lib64/librte_kni.so /opt/mellanox/dpdk/lib64/librte_jobstats.so /opt/mellanox/dpdk/lib64/librte_ip_frag.so /opt/mellanox/dpdk/lib64/librte_gso.so /opt/mellanox/dpdk/lib64/librte_gro.so /opt/mellanox/dpdk/lib64/librte_eventdev.so /opt/mellanox/dpdk/lib64/librte_efd.so /opt/mellanox/dpdk/lib64/librte_distributor.so /opt/mellanox/dpdk/lib64/librte_cryptodev.so /opt/mellanox/dpdk/lib64/librte_compressdev.so /opt/mellanox/dpdk/lib64/librte_cfgfile.so /opt/mellanox/dpdk/lib64/librte_bitratestats.so /opt/mellanox/dpdk/lib64/librte_bbdev.so /opt/mellanox/dpdk/lib64/librte_acl.so /opt/mellanox/dpdk/lib64/librte_timer.so /opt/mellanox/dpdk/lib64/librte_hash.so /opt/mellanox/dpdk/lib64/librte_metrics.so /opt/mellanox/dpdk/lib64/librte_cmdline.so /opt/mellanox/dpdk/lib64/librte_pci.so /opt/mellanox/dpdk/lib64/librte_ethdev.so /opt/mellanox/dpdk/lib64/librte_meter.so /opt/mellanox/dpdk/lib64/librte_net.so /opt/mellanox/dpdk/lib64/librte_mbuf.so /opt/mellanox/dpdk/lib64/librte_mempool.so /opt/mellanox/dpdk/lib64/librte_rcu.so /opt/mellanox/dpdk/lib64/librte_ring.so /opt/mellanox/dpdk/lib64/librte_eal.so /opt/mellanox/dpdk/lib64/librte_telemetry.so /opt/mellanox/dpdk/lib64/librte_kvargs.so -lnuma -lpcap -ldl -lm -Wl,--end-group -Wl,--as-needed -pthread '-Wl,-rpath,$ORIGIN/../lib/common:$ORIGIN/../lib/utils:$ORIGIN/../lib/vec:$ORIGIN/../lib/plugin:$ORIGIN/../lib/cli:$ORIGIN/../lib/lua' -Wl,-rpath-link,/home/local/pktgen-21.01.0/Builddir/lib/common:/home/local/pktgen-21.01.0/Builddir/lib/utils:/home/local/pktgen-21.01.0/Builddir/lib/vec:/home/local/pktgen-21.01.0/Builddir/lib/plugin:/home/local/pktgen-21.01.0/Builddir/lib/cli:/home/local/pktgen-21.01.0/Builddir/lib/lua app/a172ced@@pktgen@exe/pktgen-cmds.c.o: In function enable_bonding': pktgen-cmds.c:(.text+0x60dc): undefined reference torte_eth_bond_8023ad_conf_get' pktgen-cmds.c:(.text+0x60f7): undefined reference to rte_eth_bond_slaves_get' pktgen-cmds.c:(.text+0x6118): undefined reference torte_eth_bond_active_slaves_get' pktgen-cmds.c:(.text+0x617f): undefined reference to rte_eth_bond_8023ad_ext_distrib' pktgen-cmds.c:(.text+0x61a5): undefined reference torte_eth_bond_8023ad_ext_collect' pktgen-cmds.c:(.text+0x61f2): undefined reference to rte_eth_bond_8023ad_ext_distrib' app/a172ced@@pktgen@exe/pktgen-cmds.c.o: In functionshow_bonding_mode': pktgen-cmds.c:(.text+0x6293): undefined reference to rte_eth_bond_mode_get' pktgen-cmds.c:(.text+0x62d2): undefined reference torte_eth_bond_slaves_get' pktgen-cmds.c:(.text+0x6359): undefined reference to rte_eth_bond_active_slaves_get' pktgen-cmds.c:(.text+0x6627): undefined reference torte_eth_bond_8023ad_slave_info' pktgen-cmds.c:(.text+0x682e): undefined reference to rte_eth_bond_primary_get' pktgen-cmds.c:(.text+0x6884): undefined reference torte_eth_bond_8023ad_agg_selection_get' pktgen-cmds.c:(.text+0x68c4): undefined reference to rte_eth_bond_xmit_policy_get' app/a172ced@@pktgen@exe/cli-functions.c.o: In functionbonding_cmd': cli-functions.c:(.text+0x1d6d): undefined reference to rte_eth_bond_8023ad_conf_get' cli-functions.c:(.text+0x1ea5): undefined reference torte_eth_bond_8023ad_conf_get' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. make: *** [Makefile:15: build] Error 1

=> looks like the /opt/mellanox/dpdk/lib64/pkgconfig provided by Mellanox is not taken into account

[root@vxpreint169 pktgen]# more /opt/mellanox/dpdk/lib64/pkgconfig/* :::::::::::::: /opt/mellanox/dpdk/lib64/pkgconfig/libdpdk-libs.pc :::::::::::::: prefix=/opt/mellanox/dpdk libdir=${prefix}/lib64 includedir=${prefix}/include/dpdk

Name: dpdk-libs Description: Internal-only DPDK pkgconfig file. Not for direct use. Use libdpdk.pc instead of this file to query DPDK compile/link arguments Version: 20.11.0.0.21 Libs: -Wl,--as-needed -L${libdir} -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_s ecurity -lrte_sched -lrte_reorder -lrte_rib -lrte_regexdev -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag - lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrt e_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs Libs.private: -pthread -lm -ldl -lnuma -lpcap Cflags: -I${includedir} -I${includedir} -include rte_config.h -march=corei7 :::::::::::::: /opt/mellanox/dpdk/lib64/pkgconfig/libdpdk.pc :::::::::::::: prefix=/opt/mellanox/dpdk libdir=${prefix}/lib64 includedir=${prefix}/include/dpdk

Name: DPDK Description: The Data Plane Development Kit (DPDK). Note that CFLAGS might contain an -march flag higher than typical baseline. This is required for a number of static inline functions in the public headers. Version: 20.11.0.0.21 Requires: libdpdk-libs Requires.private: libmlx5, libibverbs, libcrypto, zlib, libpcap, libelf Libs.private: -Wl,--whole-archive -L${libdir} -l:librte_common_cpt.a -l:librte_common_dpaax.a -l:librte_common_iavf.a -l:librte_common_octeontx.a -l:librte_common_octeontx2.a -l: librte_common_sfc_efx.a -l:librte_bus_dpaa.a -l:librte_bus_fslmc.a -l:librte_bus_ifpga.a -l:librte_bus_pci.a -l:librte_bus_vdev.a -l:librte_bus_vmbus.a -l:librte_common_mlx5.a -l :librte_common_qat.a -l:librte_mempool_bucket.a -l:librte_mempool_dpaa.a -l:librte_mempool_dpaa2.a -l:librte_mempool_octeontx.a -l:librte_mempool_ring.a -l:librte_mempool_stack.a -l:librte_net_af_packet.a -l:librte_net_ark.a -l:librte_net_atlantic.a -l:librte_net_avp.a -l:librte_net_axgbe.a -l:librte_net_bond.a -l:librte_net_bnx2x.a -l:librte_net_bnxt.a -l:librte_net_cxgbe.a -l:librte_net_dpaa.a -l:librte_net_dpaa2.a -l:librte_net_e1000.a -l:librte_net_ena.a -l:librte_net_enetc.a -l:librte_net_enic.a -l:librte_net_failsafe.a -l: librte_net_fm10k.a -l:librte_net_i40e.a -l:librte_net_hinic.a -l:librte_net_hns3.a -l:librte_net_iavf.a -l:librte_net_ice.a -l:librte_net_igc.a -l:librte_net_ixgbe.a -l:librte_ne t_kni.a -l:librte_net_liquidio.a -l:librte_net_memif.a -l:librte_net_mlx5.a -l:librte_net_netvsc.a -l:librte_net_nfp.a -l:librte_net_null.a -l:librte_net_octeontx.a -l:librte_net _pcap.a -l:librte_net_pfe.a -l:librte_net_qede.a -l:librte_net_ring.a -l:librte_net_sfc.a -l:librte_net_softnic.a -l:librte_net_tap.a -l:librte_net_thunderx.a -l:librte_netvdev netvsc.a -l:librte_net_vhost.a -l:librte_net_virtio.a -l:librte_net_vmxnet3.a -l:librte_raw_dpaa2_cmdif.a -l:librte_raw_dpaa2_qdma.a -l:librte_raw_ioat.a -l:librte_raw_ntb.a -l:l ibrte_raw_octeontx2_dma.a -l:librte_raw_octeontx2_ep.a -l:librte_raw_skeleton.a -l:librte_crypto_bcmfs.a -l:librte_crypto_caam_jr.a -l:librte_crypto_ccp.a -l:librte_crypto_dpaa_s ec.a -l:librte_crypto_dpaa2_sec.a -l:librte_crypto_nitrox.a -l:librte_crypto_null.a -l:librte_crypto_octeontx.a -l:librte_crypto_octeontx2.a -l:librte_cryptoopenssl.a -l:librte crypto_scheduler.a -l:librte_crypto_virtio.a -l:librte_compress_octeontx.a -l:librte_compress_zlib.a -l:librte_regex_mlx5.a -l:librte_regex_octeontx2.a -l:librte_vdpa_mlx5.a -l:l ibrte_event_dlb.a -l:librte_event_dlb2.a -l:librte_event_dpaa.a -l:librte_event_dpaa2.a -l:librte_event_opdl.a -l:librte_event_skeleton.a -l:librte_event_sw.a -l:librte_event_dsw .a -l:librte_event_octeontx.a -l:librte_baseband_null.a -l:librte_baseband_turbo_sw.a -l:librte_baseband_fpga_lte_fec.a -l:librte_baseband_fpga_5gnr_fec.a -l:librte_baseband_acc1 00.a -l:librte_node.a -l:librte_graph.a -l:librte_bpf.a -l:librte_flow_classify.a -l:librte_pipeline.a -l:librte_table.a -l:librte_port.a -l:librte_fib.a -l:librte_ipsec.a -l:lib rte_vhost.a -l:librte_stack.a -l:librte_security.a -l:librte_sched.a -l:librte_reorder.a -l:librte_rib.a -l:librte_regexdev.a -l:librte_rawdev.a -l:librte_pdump.a -l:librte_power .a -l:librte_member.a -l:librte_lpm.a -l:librte_latencystats.a -l:librte_kni.a -l:librte_jobstats.a -l:librte_ip_frag.a -l:librte_gso.a -l:librte_gro.a -l:librte_eventdev.a -l:li brte_efd.a -l:librte_distributor.a -l:librte_cryptodev.a -l:librte_compressdev.a -l:librte_cfgfile.a -l:librte_bitratestats.a -l:librte_bbdev.a -l:librte_acl.a -l:librte_timer.a -l:librte_hash.a -l:librte_metrics.a -l:librte_cmdline.a -l:librte_pci.a -l:librte_ethdev.a -l:librte_meter.a -l:librte_net.a -l:librte_mbuf.a -l:librte_mempool.a -l:librte_rcu.a -l:librte_ring.a -l:librte_eal.a -l:librte_telemetry.a -l:librte_kvargs.a -Wl,--no-whole-archive Cflags: -I${includedir}

pktgen commented 3 years ago

In the latest build of Pktgen it relies on pkg-config file in DPDK to locate and find the header files. Make sure ‘pkg-config –libs libdpdk’ and ‘pkg-config –cflags libdpdk’ returns something and the header files are located at the correct location.

I have never used Mellanox drivers and I have very little knowledge of CentOS.

If you can provide the complete output from the ‘make build’ or ‘make rebuild’ (to clean and build) command that would be good.

From: catherinebeloinnokia notifications@github.com Date: Tuesday, January 26, 2021 at 7:30 AM To: pktgen/Pktgen-DPDK Pktgen-DPDK@noreply.github.com Cc: Keith Wiles keith.wiles@icloud.com, Mention mention@noreply.github.com Subject: [pktgen/Pktgen-DPDK] unable to install pktgen with dpdk package provided by Mellanox (#53)

Hello,

working on hardware PC HP EliteDesk 800 G1 SFF · Mellanox MT27710 Family [ConnectX-4 Lx]

installed in centos 8.3 (Linux vxpreint169 4.18.0-240.1.1.el8_3.x86_64 #1https://github.com/pktgen/Pktgen-DPDK/issues/1 SMP Thu Nov 19 17:20:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux) · latest Mellanox ISO from https://www.mellanox.com/products/infiniband-drivers/linux/mlnx_ofed: -> MLNX_OFED Download Center -> RHEL/CentOS -> RHEL/CentOS 8.3 -> x86_64 -> ISO: MLNX_OFED_LINUX-5.2-1.0.4.0-rhel8.3-x86_64.iso

installed Mellanox drivers, and also dpdk provided by Mellanox ISO, after Mellanox doc https://docs.mellanox.com/display/OFEDv521040/Installing+Mellanox+OFED:

(do all steps to add ISO RPMs contents as a new repo, get key) yum install mlnx-dpdk mlnx-dpdk-devel

get latest pktgen package as tarfile: wget https://git.dpdk.org/apps/pktgen-dpdk/snapshot/pktgen-21.01.0.tar.gz untar it and try to build -> failure:

cd /local/pktgen export RTE_TARGET=x86_64-native-linuxapp-gcc export RTE_SDK=/opt/mellanox/dpdk export PKG_CONFIG_PATH=/opt/mellanox/dpdk/lib64/pkgconfig

make build ... [9/66] Compiling C object 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o'. FAILED: lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o cc -Ilib/utils/4da8951@@utilshttps://github.com/utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o' -MF 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o.d' -o 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o' -c ../lib/utils/_atoip.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/_atoip.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [10/66] Compiling C object 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o'. FAILED: lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o cc -Ilib/utils/4da8951@@utilshttps://github.com/utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o' -MF 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o.d' -o 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o' -c ../lib/utils/portlist.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/portlist.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [11/66] Compiling C object 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o'. FAILED: lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o cc -Ilib/utils/4da8951@@utilshttps://github.com/utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o' -MF 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o.d' -o 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o' -c ../lib/utils/heap.c ../lib/utils/heap.c:8:10: fatal error: rte_spinlock.h: No such file or directory

include

^~~~ compilation terminated. [14/66] Compiling C object 'lib/common/3d47a30@@commonhttps://github.com/common@sta/cksum.c.o'. ninja: build stopped: subcommand failed. make: *** [Makefile:15: build] Error 1

+++

manual patch in file /local/pktgen/Builddir/build.ninja to try to solve this issue -> other failer later:

:%s@ARGS = -I@ARGS = -I/opt/mellanox/dpdk/include/dpdk -I@

make build ... FAILED: app/pktgen cc -o app/pktgen 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/cli-functions.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/lpktgenlib.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cmds.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cfg.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-main.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-pcap.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-range.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cpu.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-seq.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-dump.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-capture.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-stats.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-port-cfg.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-ipv6.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-ipv4.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-arp.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-gre.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-ether.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-tcp.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-udp.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-vlan.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-random.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-display.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-log.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-gtpu.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-latency.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-rate.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-O1 -Wl,--start-group lib/common/libcommon.a lib/utils/libutils.a lib/vec/libvec.a lib/plugin/libplugin.a lib/cli/libcli.a lib/lua/liblua.a -Wl,--as-needed /opt/mellanox/dpdk/lib64/librte_node.so /opt/mellanox/dpdk/lib64/librte_graph.so /opt/mellanox/dpdk/lib64/librte_bpf.so /opt/mellanox/dpdk/lib64/librte_flow_classify.so /opt/mellanox/dpdk/lib64/librte_pipeline.so /opt/mellanox/dpdk/lib64/librte_table.so /opt/mellanox/dpdk/lib64/librte_port.so /opt/mellanox/dpdk/lib64/librte_fib.so /opt/mellanox/dpdk/lib64/librte_ipsec.so /opt/mellanox/dpdk/lib64/librte_vhost.so /opt/mellanox/dpdk/lib64/librte_stack.so /opt/mellanox/dpdk/lib64/librte_security.so /opt/mellanox/dpdk/lib64/librte_sched.so /opt/mellanox/dpdk/lib64/librte_reorder.so /opt/mellanox/dpdk/lib64/librte_rib.so /opt/mellanox/dpdk/lib64/librte_regexdev.so /opt/mellanox/dpdk/lib64/librte_rawdev.so /opt/mellanox/dpdk/lib64/librte_pdump.so /opt/mellanox/dpdk/lib64/librte_power.so /opt/mellanox/dpdk/lib64/librte_member.so /opt/mellanox/dpdk/lib64/librte_lpm.so /opt/mellanox/dpdk/lib64/librte_latencystats.so /opt/mellanox/dpdk/lib64/librte_kni.so /opt/mellanox/dpdk/lib64/librte_jobstats.so /opt/mellanox/dpdk/lib64/librte_ip_frag.so /opt/mellanox/dpdk/lib64/librte_gso.so /opt/mellanox/dpdk/lib64/librte_gro.so /opt/mellanox/dpdk/lib64/librte_eventdev.so /opt/mellanox/dpdk/lib64/librte_efd.so /opt/mellanox/dpdk/lib64/librte_distributor.so /opt/mellanox/dpdk/lib64/librte_cryptodev.so /opt/mellanox/dpdk/lib64/librte_compressdev.so /opt/mellanox/dpdk/lib64/librte_cfgfile.so /opt/mellanox/dpdk/lib64/librte_bitratestats.so /opt/mellanox/dpdk/lib64/librte_bbdev.so /opt/mellanox/dpdk/lib64/librte_acl.so /opt/mellanox/dpdk/lib64/librte_timer.so /opt/mellanox/dpdk/lib64/librte_hash.so /opt/mellanox/dpdk/lib64/librte_metrics.so /opt/mellanox/dpdk/lib64/librte_cmdline.so /opt/mellanox/dpdk/lib64/librte_pci.so /opt/mellanox/dpdk/lib64/librte_ethdev.so /opt/mellanox/dpdk/lib64/librte_meter.so /opt/mellanox/dpdk/lib64/librte_net.so /opt/mellanox/dpdk/lib64/librte_mbuf.so /opt/mellanox/dpdk/lib64/librte_mempool.so /opt/mellanox/dpdk/lib64/librte_rcu.so /opt/mellanox/dpdk/lib64/librte_ring.so /opt/mellanox/dpdk/lib64/librte_eal.so /opt/mellanox/dpdk/lib64/librte_telemetry.so /opt/mellanox/dpdk/lib64/librte_kvargs.so -lnuma -lpcap -ldl -lm -Wl,--end-group -Wl,--as-needed -pthread '-Wl,-rpath,$ORIGIN/../lib/common:$ORIGIN/../lib/utils:$ORIGIN/../lib/vec:$ORIGIN/../lib/plugin:$ORIGIN/../lib/cli:$ORIGIN/../lib/lua' -Wl,-rpath-link,/home/local/pktgen-21.01.0/Builddir/lib/common:/home/local/pktgen-21.01.0/Builddir/lib/utils:/home/local/pktgen-21.01.0/Builddir/lib/vec:/home/local/pktgen-21.01.0/Builddir/lib/plugin:/home/local/pktgen-21.01.0/Builddir/lib/cli:/home/local/pktgen-21.01.0/Builddir/lib/lua app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cmds.c.o: In function enable_bonding': pktgen-cmds.c:(.text+0x60dc): undefined reference to rte_eth_bond_8023ad_conf_get' pktgen-cmds.c:(.text+0x60f7): undefined reference to rte_eth_bond_slaves_get' pktgen-cmds.c:(.text+0x6118): undefined reference to rte_eth_bond_active_slaves_get' pktgen-cmds.c:(.text+0x617f): undefined reference to rte_eth_bond_8023ad_ext_distrib' pktgen-cmds.c:(.text+0x61a5): undefined reference to rte_eth_bond_8023ad_ext_collect' pktgen-cmds.c:(.text+0x61f2): undefined reference to rte_eth_bond_8023ad_ext_distrib' app/a172ced@@pktgen@exe/pktgen-cmds.c.o: In function show_bonding_mode': pktgen-cmds.c:(.text+0x6293): undefined reference to rte_eth_bond_mode_get' pktgen-cmds.c:(.text+0x62d2): undefined reference to rte_eth_bond_slaves_get' pktgen-cmds.c:(.text+0x6359): undefined reference to rte_eth_bond_active_slaves_get' pktgen-cmds.c:(.text+0x6627): undefined reference to rte_eth_bond_8023ad_slave_info' pktgen-cmds.c:(.text+0x682e): undefined reference to rte_eth_bond_primary_get' pktgen-cmds.c:(.text+0x6884): undefined reference to rte_eth_bond_8023ad_agg_selection_get' pktgen-cmds.c:(.text+0x68c4): undefined reference to rte_eth_bond_xmit_policy_get' app/a172ced@@pktgen@exe/cli-functions.c.o: In function bonding_cmd': cli-functions.c:(.text+0x1d6d): undefined reference to rte_eth_bond_8023ad_conf_get' cli-functions.c:(.text+0x1ea5): undefined reference to rte_eth_bond_8023ad_conf_get' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. make: *** [Makefile:15: build] Error 1

=> looks like the /opt/mellanox/dpdk/lib64/pkgconfig provided by Mellanox is not taken into account

[root@vxpreint169 pktgen]# more /opt/mellanox/dpdk/lib64/pkgconfig/* :::::::::::::: /opt/mellanox/dpdk/lib64/pkgconfig/libdpdk-libs.pc :::::::::::::: prefix=/opt/mellanox/dpdk libdir=${prefix}/lib64 includedir=${prefix}/include/dpdk

Name: dpdk-libs Description: Internal-only DPDK pkgconfig file. Not for direct use. Use libdpdk.pc instead of this file to query DPDK compile/link arguments Version: 20.11.0.0.21 Libs: -Wl,--as-needed -L${libdir} -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_s ecurity -lrte_sched -lrte_reorder -lrte_rib -lrte_regexdev -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag - lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrt e_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs Libs.private: -pthread -lm -ldl -lnuma -lpcap Cflags: -I${includedir} -I${includedir} -include rte_config.h -march=corei7 :::::::::::::: /opt/mellanox/dpdk/lib64/pkgconfig/libdpdk.pc :::::::::::::: prefix=/opt/mellanox/dpdk libdir=${prefix}/lib64 includedir=${prefix}/include/dpdk

Name: DPDK Description: The Data Plane Development Kit (DPDK). Note that CFLAGS might contain an -march flag higher than typical baseline. This is required for a number of static inline functions in the public headers. Version: 20.11.0.0.21 Requires: libdpdk-libs Requires.private: libmlx5, libibverbs, libcrypto, zlib, libpcap, libelf Libs.private: -Wl,--whole-archive -L${libdir} -l:librte_common_cpt.a -l:librte_common_dpaax.a -l:librte_common_iavf.a -l:librte_common_octeontx.a -l:librte_common_octeontx2.a -l: librte_common_sfc_efx.a -l:librte_bus_dpaa.a -l:librte_bus_fslmc.a -l:librte_bus_ifpga.a -l:librte_bus_pci.a -l:librte_bus_vdev.a -l:librte_bus_vmbus.a -l:librte_common_mlx5.a -l :librte_common_qat.a -l:librte_mempool_bucket.a -l:librte_mempool_dpaa.a -l:librte_mempool_dpaa2.a -l:librte_mempool_octeontx.a -l:librte_mempool_ring.a -l:librte_mempool_stack.a -l:librte_net_af_packet.a -l:librte_net_ark.a -l:librte_net_atlantic.a -l:librte_net_avp.a -l:librte_net_axgbe.a -l:librte_net_bond.a -l:librte_net_bnx2x.a -l:librte_net_bnxt.a -l:librte_net_cxgbe.a -l:librte_net_dpaa.a -l:librte_net_dpaa2.a -l:librte_net_e1000.a -l:librte_net_ena.a -l:librte_net_enetc.a -l:librte_net_enic.a -l:librte_net_failsafe.a -l: librte_net_fm10k.a -l:librte_net_i40e.a -l:librte_net_hinic.a -l:librte_net_hns3.a -l:librte_net_iavf.a -l:librte_net_ice.a -l:librte_net_igc.a -l:librte_net_ixgbe.a -l:librte_ne t_kni.a -l:librte_net_liquidio.a -l:librte_net_memif.a -l:librte_net_mlx5.a -l:librte_net_netvsc.a -l:librte_net_nfp.a -l:librte_net_null.a -l:librte_net_octeontx.a -l:librte_net pcap.a -l:librte_net_pfe.a -l:librte_net_qede.a -l:librte_net_ring.a -l:librte_net_sfc.a -l:librte_net_softnic.a -l:librte_net_tap.a -l:librte_net_thunderx.a -l:librte_net_vdev netvsc.a -l:librte_net_vhost.a -l:librte_net_virtio.a -l:librte_net_vmxnet3.a -l:librte_raw_dpaa2_cmdif.a -l:librte_raw_dpaa2_qdma.a -l:librte_raw_ioat.a -l:librte_raw_ntb.a -l:l ibrte_raw_octeontx2_dma.a -l:librte_raw_octeontx2_ep.a -l:librte_raw_skeleton.a -l:librte_crypto_bcmfs.a -l:librte_crypto_caam_jr.a -l:librte_crypto_ccp.a -l:librte_crypto_dpaa_s ec.a -l:librte_crypto_dpaa2_sec.a -l:librte_crypto_nitrox.a -l:librte_crypto_null.a -l:librte_crypto_octeontx.a -l:librte_crypto_octeontx2.a -l:librte_cryptoopenssl.a -l:librte crypto_scheduler.a -l:librte_crypto_virtio.a -l:librte_compress_octeontx.a -l:librte_compress_zlib.a -l:librte_regex_mlx5.a -l:librte_regex_octeontx2.a -l:librte_vdpa_mlx5.a -l:l ibrte_event_dlb.a -l:librte_event_dlb2.a -l:librte_event_dpaa.a -l:librte_event_dpaa2.a -l:librte_event_opdl.a -l:librte_event_skeleton.a -l:librte_event_sw.a -l:librte_event_dsw .a -l:librte_event_octeontx.a -l:librte_baseband_null.a -l:librte_baseband_turbo_sw.a -l:librte_baseband_fpga_lte_fec.a -l:librte_baseband_fpga_5gnr_fec.a -l:librte_baseband_acc1 00.a -l:librte_node.a -l:librte_graph.a -l:librte_bpf.a -l:librte_flow_classify.a -l:librte_pipeline.a -l:librte_table.a -l:librte_port.a -l:librte_fib.a -l:librte_ipsec.a -l:lib rte_vhost.a -l:librte_stack.a -l:librte_security.a -l:librte_sched.a -l:librte_reorder.a -l:librte_rib.a -l:librte_regexdev.a -l:librte_rawdev.a -l:librte_pdump.a -l:librte_power .a -l:librte_member.a -l:librte_lpm.a -l:librte_latencystats.a -l:librte_kni.a -l:librte_jobstats.a -l:librte_ip_frag.a -l:librte_gso.a -l:librte_gro.a -l:librte_eventdev.a -l:li brte_efd.a -l:librte_distributor.a -l:librte_cryptodev.a -l:librte_compressdev.a -l:librte_cfgfile.a -l:librte_bitratestats.a -l:librte_bbdev.a -l:librte_acl.a -l:librte_timer.a -l:librte_hash.a -l:librte_metrics.a -l:librte_cmdline.a -l:librte_pci.a -l:librte_ethdev.a -l:librte_meter.a -l:librte_net.a -l:librte_mbuf.a -l:librte_mempool.a -l:librte_rcu.a -l:librte_ring.a -l:librte_eal.a -l:librte_telemetry.a -l:librte_kvargs.a -Wl,--no-whole-archive Cflags: -I${includedir}

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pktgen/Pktgen-DPDK/issues/53, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABC4ICS2F4WG6ZDRG6DWP4TS327XFANCNFSM4WTOQTIA.

catherinebeloinnokia commented 3 years ago

Hello Keith,

[root@vxpreint169 pktgen]# echo $PKG_CONFIG_PATH /opt/mellanox/dpdk/lib64/pkgconfig

[root@vxpreint169 pktgen]# pkg-config -libs libdpdk -Wl,--as-needed -L/opt/mellanox/dpdk/lib64 -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rib -lrte_regexdev -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs

[root@vxpreint169 pktgen]# pkg-config -cflags libdpdk -I/opt/mellanox/dpdk/include/dpdk -include rte_config.h -march=corei7 -I/usr/usr/include -I/usr/include/libnl3

[root@vxpreint169 pktgen]# make rebuild

Use 'make help' for more commands\n ./tools/pktgen-build.sh clean build lua_enabled : '-Denable_lua=false' gui_enabled : '-Denable_gui=false' SDK Directory : '/local/pktgen' Build Directory : '/local/pktgen/Builddir' Target Directory : '/local/pktgen/usr'

Removing '/local/pktgen/Builddir' directory Removing '/local/pktgen/usr' directory

Ninja build in '/local/pktgen/Builddir' buildtype='release' meson -Dbuildtype=release -Denable_lua=false -Denable_gui=false Builddir The Meson build system Version: 0.49.2 Source dir: /home/local/pktgen-21.01.0 Build dir: /home/local/pktgen-21.01.0/Builddir Build type: native build Program cat found: YES (/usr/bin/cat) Project name: pktgen Project version: 21.01.0 Native C compiler: cc (gcc 8.3.1 "cc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)") Build machine cpu family: x86_64 Build machine cpu: x86_64 Compiler for C supports arguments -mavx2: YES Compiler for C supports arguments -Wno-pedantic -Wpedantic: YES Compiler for C supports arguments -Wno-format-truncation -Wformat-truncation: YES Found pkg-config: /usr/bin/pkg-config (1.4.2) Dependency libdpdk found: YES 20.11.0.0.21 Library librte_net_bond found: NO Using meson's python ['/usr/libexec/platform-python'] Library rte_net_i40e found: NO Library rte_net_ixgbe found: NO Library rte_net_ice found: NO Dependency threads found: YES Library numa found: YES Library pcap found: YES Library dl found: YES Library m found: YES Program sphinx-build found: NO Build targets in project: 8 Option werror is: True [default: true] Found ninja-1.8.2 at /usr/bin/ninja ninja: Entering directory `/local/pktgen/Builddir' [10/66] Compiling C object 'lib/utils/4da8951@@utils@sta/heap.c.o'. FAILED: lib/utils/4da8951@@utils@sta/heap.c.o cc -Ilib/utils/4da8951@@utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utils@sta/heap.c.o' -MF 'lib/utils/4da8951@@utils@sta/heap.c.o.d' -o 'lib/utils/4da8951@@utils@sta/heap.c.o' -c ../lib/utils/heap.c ../lib/utils/heap.c:8:10: fatal error: rte_spinlock.h: No such file or directory

include

^~~~ compilation terminated. [11/66] Compiling C object 'lib/utils/4da8951@@utils@sta/_atoip.c.o'. FAILED: lib/utils/4da8951@@utils@sta/_atoip.c.o cc -Ilib/utils/4da8951@@utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utils@sta/_atoip.c.o' -MF 'lib/utils/4da8951@@utils@sta/_atoip.c.o.d' -o 'lib/utils/4da8951@@utils@sta/_atoip.c.o' -c ../lib/utils/_atoip.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/_atoip.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [12/66] Compiling C object 'lib/utils/4da8951@@utils@sta/portlist.c.o'. FAILED: lib/utils/4da8951@@utils@sta/portlist.c.o cc -Ilib/utils/4da8951@@utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utils@sta/portlist.c.o' -MF 'lib/utils/4da8951@@utils@sta/portlist.c.o.d' -o 'lib/utils/4da8951@@utils@sta/portlist.c.o' -c ../lib/utils/portlist.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/portlist.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [13/66] Compiling C object 'lib/vec/bab47a5@@vec@sta/vec.c.o'. FAILED: lib/vec/bab47a5@@vec@sta/vec.c.o cc -Ilib/vec/bab47a5@@vec@sta -Ilib/vec -I../lib/vec -Ilib/utils -I../lib/utils -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/vec/bab47a5@@vec@sta/vec.c.o' -MF 'lib/vec/bab47a5@@vec@sta/vec.c.o.d' -o 'lib/vec/bab47a5@@vec@sta/vec.c.o' -c ../lib/vec/vec.c ../lib/vec/vec.c:6:10: fatal error: rte_memory.h: No such file or directory

include

^~~~~~ compilation terminated. [15/66] Compiling C object 'lib/common/3d47a30@@common@sta/l2p.c.o'. ninja: build stopped: subcommand failed. make: *** [Makefile:18: rebuild] Error 1 [root@vxpreint169 pktgen]#

[root@vxpreint169 pktgen]# locate rte_memory.h /opt/mellanox/dpdk/include/dpdk/rte_memory.h

regards, Catherine.

From: Keith Wiles notifications@github.com Sent: Tuesday, January 26, 2021 4:02 PM To: pktgen/Pktgen-DPDK Pktgen-DPDK@noreply.github.com Cc: Beloin, Catherine (Nokia - FR/Paris-Saclay) catherine.beloin@nokia.com; Author author@noreply.github.com Subject: Re: [pktgen/Pktgen-DPDK] unable to build pktgen with dpdk package provided by Mellanox (#53)

In the latest build of Pktgen it relies on pkg-config file in DPDK to locate and find the header files. Make sure ‘pkg-config –libs libdpdk’ and ‘pkg-config –cflags libdpdk’ returns something and the header files are located at the correct location.

I have never used Mellanox drivers and I have very little knowledge of CentOS.

If you can provide the complete output from the ‘make build’ or ‘make rebuild’ (to clean and build) command that would be good.

From: catherinebeloinnokia notifications@github.com<mailto:notifications@github.com> Date: Tuesday, January 26, 2021 at 7:30 AM To: pktgen/Pktgen-DPDK Pktgen-DPDK@noreply.github.com<mailto:Pktgen-DPDK@noreply.github.com> Cc: Keith Wiles keith.wiles@icloud.com<mailto:keith.wiles@icloud.com>, Mention mention@noreply.github.com<mailto:mention@noreply.github.com> Subject: [pktgen/Pktgen-DPDK] unable to install pktgen with dpdk package provided by Mellanox (#53)

Hello,

working on hardware PC HP EliteDesk 800 G1 SFF · Mellanox MT27710 Family [ConnectX-4 Lx]

installed in centos 8.3 (Linux vxpreint169 4.18.0-240.1.1.el8_3.x86_64 #1https://github.com/pktgen/Pktgen-DPDK/issues/1 SMP Thu Nov 19 17:20:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux) · latest Mellanox ISO from https://www.mellanox.com/products/infiniband-drivers/linux/mlnx_ofed: -> MLNX_OFED Download Center -> RHEL/CentOS -> RHEL/CentOS 8.3 -> x86_64 -> ISO: MLNX_OFED_LINUX-5.2-1.0.4.0-rhel8.3-x86_64.iso

installed Mellanox drivers, and also dpdk provided by Mellanox ISO, after Mellanox doc https://docs.mellanox.com/display/OFEDv521040/Installing+Mellanox+OFED:

(do all steps to add ISO RPMs contents as a new repo, get key) yum install mlnx-dpdk mlnx-dpdk-devel

get latest pktgen package as tarfile: wget https://git.dpdk.org/apps/pktgen-dpdk/snapshot/pktgen-21.01.0.tar.gz untar it and try to build -> failure:

cd /local/pktgen export RTE_TARGET=x86_64-native-linuxapp-gcc export RTE_SDK=/opt/mellanox/dpdk export PKG_CONFIG_PATH=/opt/mellanox/dpdk/lib64/pkgconfig

make build ... [9/66] Compiling C object 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o'. FAILED: lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o cc -Ilib/utils/4da8951@@utilshttps://github.com/utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o' -MF 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o.d' -o 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o' -c ../lib/utils/_atoip.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/_atoip.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [10/66] Compiling C object 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o'. FAILED: lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o cc -Ilib/utils/4da8951@@utilshttps://github.com/utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o' -MF 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o.d' -o 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o' -c ../lib/utils/portlist.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/portlist.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [11/66] Compiling C object 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o'. FAILED: lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o cc -Ilib/utils/4da8951@@utilshttps://github.com/utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o' -MF 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o.d' -o 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o' -c ../lib/utils/heap.c ../lib/utils/heap.c:8:10: fatal error: rte_spinlock.h: No such file or directory

include

^~~~ compilation terminated. [14/66] Compiling C object 'lib/common/3d47a30@@commonhttps://github.com/common@sta/cksum.c.o'. ninja: build stopped: subcommand failed. make: *** [Makefile:15: build] Error 1

+++

manual patch in file /local/pktgen/Builddir/build.ninja to try to solve this issue -> other failer later:

:%s@ARGS = -I@ARGS = -I/opt/mellanox/dpdk/include/dpdk -I@

make build ... FAILED: app/pktgen cc -o app/pktgen 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/cli-functions.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/lpktgenlib.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cmds.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cfg.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-main.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-pcap.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-range.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cpu.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-seq.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-dump.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-capture.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-stats.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-port-cfg.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-ipv6.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-ipv4.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-arp.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-gre.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-ether.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-tcp.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-udp.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-vlan.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-random.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-display.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-log.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-gtpu.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-latency.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-rate.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-O1 -Wl,--start-group lib/common/libcommon.a lib/utils/libutils.a lib/vec/libvec.a lib/plugin/libplugin.a lib/cli/libcli.a lib/lua/liblua.a -Wl,--as-needed /opt/mellanox/dpdk/lib64/librte_node.so /opt/mellanox/dpdk/lib64/librte_graph.so /opt/mellanox/dpdk/lib64/librte_bpf.so /opt/mellanox/dpdk/lib64/librte_flow_classify.so /opt/mellanox/dpdk/lib64/librte_pipeline.so /opt/mellanox/dpdk/lib64/librte_table.so /opt/mellanox/dpdk/lib64/librte_port.so /opt/mellanox/dpdk/lib64/librte_fib.so /opt/mellanox/dpdk/lib64/librte_ipsec.so /opt/mellanox/dpdk/lib64/librte_vhost.so /opt/mellanox/dpdk/lib64/librte_stack.so /opt/mellanox/dpdk/lib64/librte_security.so /opt/mellanox/dpdk/lib64/librte_sched.so /opt/mellanox/dpdk/lib64/librte_reorder.so /opt/mellanox/dpdk/lib64/librte_rib.so /opt/mellanox/dpdk/lib64/librte_regexdev.so /opt/mellanox/dpdk/lib64/librte_rawdev.so /opt/mellanox/dpdk/lib64/librte_pdump.so /opt/mellanox/dpdk/lib64/librte_power.so /opt/mellanox/dpdk/lib64/librte_member.so /opt/mellanox/dpdk/lib64/librte_lpm.so /opt/mellanox/dpdk/lib64/librte_latencystats.so /opt/mellanox/dpdk/lib64/librte_kni.so /opt/mellanox/dpdk/lib64/librte_jobstats.so /opt/mellanox/dpdk/lib64/librte_ip_frag.so /opt/mellanox/dpdk/lib64/librte_gso.so /opt/mellanox/dpdk/lib64/librte_gro.so /opt/mellanox/dpdk/lib64/librte_eventdev.so /opt/mellanox/dpdk/lib64/librte_efd.so /opt/mellanox/dpdk/lib64/librte_distributor.so /opt/mellanox/dpdk/lib64/librte_cryptodev.so /opt/mellanox/dpdk/lib64/librte_compressdev.so /opt/mellanox/dpdk/lib64/librte_cfgfile.so /opt/mellanox/dpdk/lib64/librte_bitratestats.so /opt/mellanox/dpdk/lib64/librte_bbdev.so /opt/mellanox/dpdk/lib64/librte_acl.so /opt/mellanox/dpdk/lib64/librte_timer.so /opt/mellanox/dpdk/lib64/librte_hash.so /opt/mellanox/dpdk/lib64/librte_metrics.so /opt/mellanox/dpdk/lib64/librte_cmdline.so /opt/mellanox/dpdk/lib64/librte_pci.so /opt/mellanox/dpdk/lib64/librte_ethdev.so /opt/mellanox/dpdk/lib64/librte_meter.so /opt/mellanox/dpdk/lib64/librte_net.so /opt/mellanox/dpdk/lib64/librte_mbuf.so /opt/mellanox/dpdk/lib64/librte_mempool.so /opt/mellanox/dpdk/lib64/librte_rcu.so /opt/mellanox/dpdk/lib64/librte_ring.so /opt/mellanox/dpdk/lib64/librte_eal.so /opt/mellanox/dpdk/lib64/librte_telemetry.so /opt/mellanox/dpdk/lib64/librte_kvargs.so -lnuma -lpcap -ldl -lm -Wl,--end-group -Wl,--as-needed -pthread '-Wl,-rpath,$ORIGIN/../lib/common:$ORIGIN/../lib/utils:$ORIGIN/../lib/vec:$ORIGIN/../lib/plugin:$ORIGIN/../lib/cli:$ORIGIN/../lib/lua' -Wl,-rpath-link,/home/local/pktgen-21.01.0/Builddir/lib/common:/home/local/pktgen-21.01.0/Builddir/lib/utils:/home/local/pktgen-21.01.0/Builddir/lib/vec:/home/local/pktgen-21.01.0/Builddir/lib/plugin:/home/local/pktgen-21.01.0/Builddir/lib/cli:/home/local/pktgen-21.01.0/Builddir/lib/lua app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cmds.c.o: In function enable_bonding': pktgen-cmds.c:(.text+0x60dc): undefined reference to rte_eth_bond_8023ad_conf_get' pktgen-cmds.c:(.text+0x60f7): undefined reference to rte_eth_bond_slaves_get' pktgen-cmds.c:(.text+0x6118): undefined reference to rte_eth_bond_active_slaves_get' pktgen-cmds.c:(.text+0x617f): undefined reference to rte_eth_bond_8023ad_ext_distrib' pktgen-cmds.c:(.text+0x61a5): undefined reference to rte_eth_bond_8023ad_ext_collect' pktgen-cmds.c:(.text+0x61f2): undefined reference to rte_eth_bond_8023ad_ext_distrib' app/a172ced@@pktgen@exe/pktgen-cmds.c.o: In function show_bonding_mode': pktgen-cmds.c:(.text+0x6293): undefined reference to rte_eth_bond_mode_get' pktgen-cmds.c:(.text+0x62d2): undefined reference to rte_eth_bond_slaves_get' pktgen-cmds.c:(.text+0x6359): undefined reference to rte_eth_bond_active_slaves_get' pktgen-cmds.c:(.text+0x6627): undefined reference to rte_eth_bond_8023ad_slave_info' pktgen-cmds.c:(.text+0x682e): undefined reference to rte_eth_bond_primary_get' pktgen-cmds.c:(.text+0x6884): undefined reference to rte_eth_bond_8023ad_agg_selection_get' pktgen-cmds.c:(.text+0x68c4): undefined reference to rte_eth_bond_xmit_policy_get' app/a172ced@@pktgen@exe/cli-functions.c.o: In function bonding_cmd': cli-functions.c:(.text+0x1d6d): undefined reference to rte_eth_bond_8023ad_conf_get' cli-functions.c:(.text+0x1ea5): undefined reference to rte_eth_bond_8023ad_conf_get' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. make: *** [Makefile:15: build] Error 1

=> looks like the /opt/mellanox/dpdk/lib64/pkgconfig provided by Mellanox is not taken into account

[root@vxpreint169 pktgen]# more /opt/mellanox/dpdk/lib64/pkgconfig/* :::::::::::::: /opt/mellanox/dpdk/lib64/pkgconfig/libdpdk-libs.pc :::::::::::::: prefix=/opt/mellanox/dpdk libdir=${prefix}/lib64 includedir=${prefix}/include/dpdk

Name: dpdk-libs Description: Internal-only DPDK pkgconfig file. Not for direct use. Use libdpdk.pc instead of this file to query DPDK compile/link arguments Version: 20.11.0.0.21 Libs: -Wl,--as-needed -L${libdir} -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_s ecurity -lrte_sched -lrte_reorder -lrte_rib -lrte_regexdev -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag - lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrt e_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs Libs.private: -pthread -lm -ldl -lnuma -lpcap Cflags: -I${includedir} -I${includedir} -include rte_config.h -march=corei7 :::::::::::::: /opt/mellanox/dpdk/lib64/pkgconfig/libdpdk.pc :::::::::::::: prefix=/opt/mellanox/dpdk libdir=${prefix}/lib64 includedir=${prefix}/include/dpdk

Name: DPDK Description: The Data Plane Development Kit (DPDK). Note that CFLAGS might contain an -march flag higher than typical baseline. This is required for a number of static inline functions in the public headers. Version: 20.11.0.0.21 Requires: libdpdk-libs Requires.private: libmlx5, libibverbs, libcrypto, zlib, libpcap, libelf Libs.private: -Wl,--whole-archive -L${libdir} -l:librte_common_cpt.a -l:librte_common_dpaax.a -l:librte_common_iavf.a -l:librte_common_octeontx.a -l:librte_common_octeontx2.a -l: librte_common_sfc_efx.a -l:librte_bus_dpaa.a -l:librte_bus_fslmc.a -l:librte_bus_ifpga.a -l:librte_bus_pci.a -l:librte_bus_vdev.a -l:librte_bus_vmbus.a -l:librte_common_mlx5.a -l :librte_common_qat.a -l:librte_mempool_bucket.a -l:librte_mempool_dpaa.a -l:librte_mempool_dpaa2.a -l:librte_mempool_octeontx.a -l:librte_mempool_ring.a -l:librte_mempool_stack.a -l:librte_net_af_packet.a -l:librte_net_ark.a -l:librte_net_atlantic.a -l:librte_net_avp.a -l:librte_net_axgbe.a -l:librte_net_bond.a -l:librte_net_bnx2x.a -l:librte_net_bnxt.a -l:librte_net_cxgbe.a -l:librte_net_dpaa.a -l:librte_net_dpaa2.a -l:librte_net_e1000.a -l:librte_net_ena.a -l:librte_net_enetc.a -l:librte_net_enic.a -l:librte_net_failsafe.a -l: librte_net_fm10k.a -l:librte_net_i40e.a -l:librte_net_hinic.a -l:librte_net_hns3.a -l:librte_net_iavf.a -l:librte_net_ice.a -l:librte_net_igc.a -l:librte_net_ixgbe.a -l:librte_ne t_kni.a -l:librte_net_liquidio.a -l:librte_net_memif.a -l:librte_net_mlx5.a -l:librte_net_netvsc.a -l:librte_net_nfp.a -l:librte_net_null.a -l:librte_net_octeontx.a -l:librte_net pcap.a -l:librte_net_pfe.a -l:librte_net_qede.a -l:librte_net_ring.a -l:librte_net_sfc.a -l:librte_net_softnic.a -l:librte_net_tap.a -l:librte_net_thunderx.a -l:librte_net_vdev netvsc.a -l:librte_net_vhost.a -l:librte_net_virtio.a -l:librte_net_vmxnet3.a -l:librte_raw_dpaa2_cmdif.a -l:librte_raw_dpaa2_qdma.a -l:librte_raw_ioat.a -l:librte_raw_ntb.a -l:l ibrte_raw_octeontx2_dma.a -l:librte_raw_octeontx2_ep.a -l:librte_raw_skeleton.a -l:librte_crypto_bcmfs.a -l:librte_crypto_caam_jr.a -l:librte_crypto_ccp.a -l:librte_crypto_dpaa_s ec.a -l:librte_crypto_dpaa2_sec.a -l:librte_crypto_nitrox.a -l:librte_crypto_null.a -l:librte_crypto_octeontx.a -l:librte_crypto_octeontx2.a -l:librte_cryptoopenssl.a -l:librte crypto_scheduler.a -l:librte_crypto_virtio.a -l:librte_compress_octeontx.a -l:librte_compress_zlib.a -l:librte_regex_mlx5.a -l:librte_regex_octeontx2.a -l:librte_vdpa_mlx5.a -l:l ibrte_event_dlb.a -l:librte_event_dlb2.a -l:librte_event_dpaa.a -l:librte_event_dpaa2.a -l:librte_event_opdl.a -l:librte_event_skeleton.a -l:librte_event_sw.a -l:librte_event_dsw .a -l:librte_event_octeontx.a -l:librte_baseband_null.a -l:librte_baseband_turbo_sw.a -l:librte_baseband_fpga_lte_fec.a -l:librte_baseband_fpga_5gnr_fec.a -l:librte_baseband_acc1 00.a -l:librte_node.a -l:librte_graph.a -l:librte_bpf.a -l:librte_flow_classify.a -l:librte_pipeline.a -l:librte_table.a -l:librte_port.a -l:librte_fib.a -l:librte_ipsec.a -l:lib rte_vhost.a -l:librte_stack.a -l:librte_security.a -l:librte_sched.a -l:librte_reorder.a -l:librte_rib.a -l:librte_regexdev.a -l:librte_rawdev.a -l:librte_pdump.a -l:librte_power .a -l:librte_member.a -l:librte_lpm.a -l:librte_latencystats.a -l:librte_kni.a -l:librte_jobstats.a -l:librte_ip_frag.a -l:librte_gso.a -l:librte_gro.a -l:librte_eventdev.a -l:li brte_efd.a -l:librte_distributor.a -l:librte_cryptodev.a -l:librte_compressdev.a -l:librte_cfgfile.a -l:librte_bitratestats.a -l:librte_bbdev.a -l:librte_acl.a -l:librte_timer.a -l:librte_hash.a -l:librte_metrics.a -l:librte_cmdline.a -l:librte_pci.a -l:librte_ethdev.a -l:librte_meter.a -l:librte_net.a -l:librte_mbuf.a -l:librte_mempool.a -l:librte_rcu.a -l:librte_ring.a -l:librte_eal.a -l:librte_telemetry.a -l:librte_kvargs.a -Wl,--no-whole-archive Cflags: -I${includedir}

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pktgen/Pktgen-DPDK/issues/53, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABC4ICS2F4WG6ZDRG6DWP4TS327XFANCNFSM4WTOQTIA.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/pktgen/Pktgen-DPDK/issues/53#issuecomment-767602233, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASTJ23EMS47A3NYCWQWLUCDS33KOLANCNFSM4WTOQTIA.

pktgen commented 3 years ago

Hmmm, in the output below the librte_net_bond library is not find. Check in the lib directory to see if that one was built.

The rest of the errors are around headers files from DPDK are missing.

I noticed the -I/opt/mellanox/dpdk/include/dpdk is not present in the CC lines. Not sure why it is not present.

Also the Mellanox driver is not linked to pktgen by default, edit the app/meson.build file and add the Mellanox libraries. Look for the i40e reference in the file.

Sorry, not much help.

From: catherinebeloinnokia notifications@github.com Date: Tuesday, January 26, 2021 at 9:21 AM To: pktgen/Pktgen-DPDK Pktgen-DPDK@noreply.github.com Cc: Keith Wiles keith.wiles@icloud.com, Mention mention@noreply.github.com Subject: Re: [pktgen/Pktgen-DPDK] unable to build pktgen with dpdk package provided by Mellanox (#53) Hello Keith,

[root@vxpreint169 pktgen]# echo $PKG_CONFIG_PATH /opt/mellanox/dpdk/lib64/pkgconfig

[root@vxpreint169 pktgen]# pkg-config -libs libdpdk -Wl,--as-needed -L/opt/mellanox/dpdk/lib64 -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rib -lrte_regexdev -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs

[root@vxpreint169 pktgen]# pkg-config -cflags libdpdk -I/opt/mellanox/dpdk/include/dpdk -include rte_config.h -march=corei7 -I/usr/usr/include -I/usr/include/libnl3

[root@vxpreint169 pktgen]# make rebuild

Use 'make help' for more commands\n ./tools/pktgen-build.sh clean build lua_enabled : '-Denable_lua=false' gui_enabled : '-Denable_gui=false' SDK Directory : '/local/pktgen' Build Directory : '/local/pktgen/Builddir' Target Directory : '/local/pktgen/usr'

Removing '/local/pktgen/Builddir' directory Removing '/local/pktgen/usr' directory

Ninja build in '/local/pktgen/Builddir' buildtype='release' meson -Dbuildtype=release -Denable_lua=false -Denable_gui=false Builddir The Meson build system Version: 0.49.2 Source dir: /home/local/pktgen-21.01.0 Build dir: /home/local/pktgen-21.01.0/Builddir Build type: native build Program cat found: YES (/usr/bin/cat) Project name: pktgen Project version: 21.01.0 Native C compiler: cc (gcc 8.3.1 "cc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)") Build machine cpu family: x86_64 Build machine cpu: x86_64 Compiler for C supports arguments -mavx2: YES Compiler for C supports arguments -Wno-pedantic -Wpedantic: YES Compiler for C supports arguments -Wno-format-truncation -Wformat-truncation: YES Found pkg-config: /usr/bin/pkg-config (1.4.2) Dependency libdpdk found: YES 20.11.0.0.21 Library librte_net_bond found: NO Using meson's python ['/usr/libexec/platform-python'] Library rte_net_i40e found: NO Library rte_net_ixgbe found: NO Library rte_net_ice found: NO Dependency threads found: YES Library numa found: YES Library pcap found: YES Library dl found: YES Library m found: YES Program sphinx-build found: NO Build targets in project: 8 Option werror is: True [default: true] Found ninja-1.8.2 at /usr/bin/ninja ninja: Entering directory `/local/pktgen/Builddir' [10/66] Compiling C object 'lib/utils/4da8951@@utils@sta/heap.c.o'. FAILED: lib/utils/4da8951@@utils@sta/heap.c.o cc -Ilib/utils/4da8951@@utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utils@sta/heap.c.o' -MF 'lib/utils/4da8951@@utils@sta/heap.c.o.d' -o 'lib/utils/4da8951@@utils@sta/heap.c.o' -c ../lib/utils/heap.c ../lib/utils/heap.c:8:10: fatal error: rte_spinlock.h: No such file or directory

include

^~~~ compilation terminated. [11/66] Compiling C object 'lib/utils/4da8951@@utils@sta/_atoip.c.o'. FAILED: lib/utils/4da8951@@utils@sta/_atoip.c.o cc -Ilib/utils/4da8951@@utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utils@sta/_atoip.c.o' -MF 'lib/utils/4da8951@@utils@sta/_atoip.c.o.d' -o 'lib/utils/4da8951@@utils@sta/_atoip.c.o' -c ../lib/utils/_atoip.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/_atoip.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [12/66] Compiling C object 'lib/utils/4da8951@@utils@sta/portlist.c.o'. FAILED: lib/utils/4da8951@@utils@sta/portlist.c.o cc -Ilib/utils/4da8951@@utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utils@sta/portlist.c.o' -MF 'lib/utils/4da8951@@utils@sta/portlist.c.o.d' -o 'lib/utils/4da8951@@utils@sta/portlist.c.o' -c ../lib/utils/portlist.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/portlist.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [13/66] Compiling C object 'lib/vec/bab47a5@@vec@sta/vec.c.o'. FAILED: lib/vec/bab47a5@@vec@sta/vec.c.o cc -Ilib/vec/bab47a5@@vec@sta -Ilib/vec -I../lib/vec -Ilib/utils -I../lib/utils -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/vec/bab47a5@@vec@sta/vec.c.o' -MF 'lib/vec/bab47a5@@vec@sta/vec.c.o.d' -o 'lib/vec/bab47a5@@vec@sta/vec.c.o' -c ../lib/vec/vec.c ../lib/vec/vec.c:6:10: fatal error: rte_memory.h: No such file or directory

include

^~~~~~ compilation terminated. [15/66] Compiling C object 'lib/common/3d47a30@@common@sta/l2p.c.o'. ninja: build stopped: subcommand failed. make: *** [Makefile:18: rebuild] Error 1 [root@vxpreint169 pktgen]#

[root@vxpreint169 pktgen]# locate rte_memory.h /opt/mellanox/dpdk/include/dpdk/rte_memory.h

regards, Catherine.

From: Keith Wiles notifications@github.com Sent: Tuesday, January 26, 2021 4:02 PM To: pktgen/Pktgen-DPDK Pktgen-DPDK@noreply.github.com Cc: Beloin, Catherine (Nokia - FR/Paris-Saclay) catherine.beloin@nokia.com; Author author@noreply.github.com Subject: Re: [pktgen/Pktgen-DPDK] unable to build pktgen with dpdk package provided by Mellanox (#53)

In the latest build of Pktgen it relies on pkg-config file in DPDK to locate and find the header files. Make sure ‘pkg-config –libs libdpdk’ and ‘pkg-config –cflags libdpdk’ returns something and the header files are located at the correct location.

I have never used Mellanox drivers and I have very little knowledge of CentOS.

If you can provide the complete output from the ‘make build’ or ‘make rebuild’ (to clean and build) command that would be good.

From: catherinebeloinnokia notifications@github.com<mailto:notifications@github.com> Date: Tuesday, January 26, 2021 at 7:30 AM To: pktgen/Pktgen-DPDK Pktgen-DPDK@noreply.github.com<mailto:Pktgen-DPDK@noreply.github.com> Cc: Keith Wiles keith.wiles@icloud.com<mailto:keith.wiles@icloud.com>, Mention mention@noreply.github.com<mailto:mention@noreply.github.com> Subject: [pktgen/Pktgen-DPDK] unable to install pktgen with dpdk package provided by Mellanox (#53)

Hello,

working on hardware PC HP EliteDesk 800 G1 SFF · Mellanox MT27710 Family [ConnectX-4 Lx]

installed in centos 8.3 (Linux vxpreint169 4.18.0-240.1.1.el8_3.x86_64 #1https://github.com/pktgen/Pktgen-DPDK/issues/1 SMP Thu Nov 19 17:20:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux) · latest Mellanox ISO from https://www.mellanox.com/products/infiniband-drivers/linux/mlnx_ofed: -> MLNX_OFED Download Center -> RHEL/CentOS -> RHEL/CentOS 8.3 -> x86_64 -> ISO: MLNX_OFED_LINUX-5.2-1.0.4.0-rhel8.3-x86_64.iso

installed Mellanox drivers, and also dpdk provided by Mellanox ISO, after Mellanox doc https://docs.mellanox.com/display/OFEDv521040/Installing+Mellanox+OFED:

(do all steps to add ISO RPMs contents as a new repo, get key) yum install mlnx-dpdk mlnx-dpdk-devel

get latest pktgen package as tarfile: wget https://git.dpdk.org/apps/pktgen-dpdk/snapshot/pktgen-21.01.0.tar.gz untar it and try to build -> failure:

cd /local/pktgen export RTE_TARGET=x86_64-native-linuxapp-gcc export RTE_SDK=/opt/mellanox/dpdk export PKG_CONFIG_PATH=/opt/mellanox/dpdk/lib64/pkgconfig

make build ... [9/66] Compiling C object 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o'. FAILED: lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o cc -Ilib/utils/4da8951@@utilshttps://github.com/utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o' -MF 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o.d' -o 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o' -c ../lib/utils/_atoip.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/_atoip.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [10/66] Compiling C object 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o'. FAILED: lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o cc -Ilib/utils/4da8951@@utilshttps://github.com/utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o' -MF 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o.d' -o 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o' -c ../lib/utils/portlist.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/portlist.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [11/66] Compiling C object 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o'. FAILED: lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o cc -Ilib/utils/4da8951@@utilshttps://github.com/utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o' -MF 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o.d' -o 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o' -c ../lib/utils/heap.c ../lib/utils/heap.c:8:10: fatal error: rte_spinlock.h: No such file or directory

include

^~~~ compilation terminated. [14/66] Compiling C object 'lib/common/3d47a30@@commonhttps://github.com/common@sta/cksum.c.o'. ninja: build stopped: subcommand failed. make: *** [Makefile:15: build] Error 1

+++

manual patch in file /local/pktgen/Builddir/build.ninja to try to solve this issue -> other failer later:

:%s@ARGS = -I@ARGS = -I/opt/mellanox/dpdk/include/dpdk -I@

make build ... FAILED: app/pktgen cc -o app/pktgen 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/cli-functions.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/lpktgenlib.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cmds.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cfg.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-main.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-pcap.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-range.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cpu.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-seq.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-dump.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-capture.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-stats.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-port-cfg.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-ipv6.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-ipv4.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-arp.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-gre.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-ether.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-tcp.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-udp.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-vlan.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-random.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-display.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-log.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-gtpu.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-latency.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-rate.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-O1 -Wl,--start-group lib/common/libcommon.a lib/utils/libutils.a lib/vec/libvec.a lib/plugin/libplugin.a lib/cli/libcli.a lib/lua/liblua.a -Wl,--as-needed /opt/mellanox/dpdk/lib64/librte_node.so /opt/mellanox/dpdk/lib64/librte_graph.so /opt/mellanox/dpdk/lib64/librte_bpf.so /opt/mellanox/dpdk/lib64/librte_flow_classify.so /opt/mellanox/dpdk/lib64/librte_pipeline.so /opt/mellanox/dpdk/lib64/librte_table.so /opt/mellanox/dpdk/lib64/librte_port.so /opt/mellanox/dpdk/lib64/librte_fib.so /opt/mellanox/dpdk/lib64/librte_ipsec.so /opt/mellanox/dpdk/lib64/librte_vhost.so /opt/mellanox/dpdk/lib64/librte_stack.so /opt/mellanox/dpdk/lib64/librte_security.so /opt/mellanox/dpdk/lib64/librte_sched.so /opt/mellanox/dpdk/lib64/librte_reorder.so /opt/mellanox/dpdk/lib64/librte_rib.so /opt/mellanox/dpdk/lib64/librte_regexdev.so /opt/mellanox/dpdk/lib64/librte_rawdev.so /opt/mellanox/dpdk/lib64/librte_pdump.so /opt/mellanox/dpdk/lib64/librte_power.so /opt/mellanox/dpdk/lib64/librte_member.so /opt/mellanox/dpdk/lib64/librte_lpm.so /opt/mellanox/dpdk/lib64/librte_latencystats.so /opt/mellanox/dpdk/lib64/librte_kni.so /opt/mellanox/dpdk/lib64/librte_jobstats.so /opt/mellanox/dpdk/lib64/librte_ip_frag.so /opt/mellanox/dpdk/lib64/librte_gso.so /opt/mellanox/dpdk/lib64/librte_gro.so /opt/mellanox/dpdk/lib64/librte_eventdev.so /opt/mellanox/dpdk/lib64/librte_efd.so /opt/mellanox/dpdk/lib64/librte_distributor.so /opt/mellanox/dpdk/lib64/librte_cryptodev.so /opt/mellanox/dpdk/lib64/librte_compressdev.so /opt/mellanox/dpdk/lib64/librte_cfgfile.so /opt/mellanox/dpdk/lib64/librte_bitratestats.so /opt/mellanox/dpdk/lib64/librte_bbdev.so /opt/mellanox/dpdk/lib64/librte_acl.so /opt/mellanox/dpdk/lib64/librte_timer.so /opt/mellanox/dpdk/lib64/librte_hash.so /opt/mellanox/dpdk/lib64/librte_metrics.so /opt/mellanox/dpdk/lib64/librte_cmdline.so /opt/mellanox/dpdk/lib64/librte_pci.so /opt/mellanox/dpdk/lib64/librte_ethdev.so /opt/mellanox/dpdk/lib64/librte_meter.so /opt/mellanox/dpdk/lib64/librte_net.so /opt/mellanox/dpdk/lib64/librte_mbuf.so /opt/mellanox/dpdk/lib64/librte_mempool.so /opt/mellanox/dpdk/lib64/librte_rcu.so /opt/mellanox/dpdk/lib64/librte_ring.so /opt/mellanox/dpdk/lib64/librte_eal.so /opt/mellanox/dpdk/lib64/librte_telemetry.so /opt/mellanox/dpdk/lib64/librte_kvargs.so -lnuma -lpcap -ldl -lm -Wl,--end-group -Wl,--as-needed -pthread '-Wl,-rpath,$ORIGIN/../lib/common:$ORIGIN/../lib/utils:$ORIGIN/../lib/vec:$ORIGIN/../lib/plugin:$ORIGIN/../lib/cli:$ORIGIN/../lib/lua' -Wl,-rpath-link,/home/local/pktgen-21.01.0/Builddir/lib/common:/home/local/pktgen-21.01.0/Builddir/lib/utils:/home/local/pktgen-21.01.0/Builddir/lib/vec:/home/local/pktgen-21.01.0/Builddir/lib/plugin:/home/local/pktgen-21.01.0/Builddir/lib/cli:/home/local/pktgen-21.01.0/Builddir/lib/lua app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cmds.c.o: In function enable_bonding': pktgen-cmds.c:(.text+0x60dc): undefined reference to rte_eth_bond_8023ad_conf_get' pktgen-cmds.c:(.text+0x60f7): undefined reference to rte_eth_bond_slaves_get' pktgen-cmds.c:(.text+0x6118): undefined reference to rte_eth_bond_active_slaves_get' pktgen-cmds.c:(.text+0x617f): undefined reference to rte_eth_bond_8023ad_ext_distrib' pktgen-cmds.c:(.text+0x61a5): undefined reference to rte_eth_bond_8023ad_ext_collect' pktgen-cmds.c:(.text+0x61f2): undefined reference to rte_eth_bond_8023ad_ext_distrib' app/a172ced@@pktgen@exe/pktgen-cmds.c.o: In function show_bonding_mode': pktgen-cmds.c:(.text+0x6293): undefined reference to rte_eth_bond_mode_get' pktgen-cmds.c:(.text+0x62d2): undefined reference to rte_eth_bond_slaves_get' pktgen-cmds.c:(.text+0x6359): undefined reference to rte_eth_bond_active_slaves_get' pktgen-cmds.c:(.text+0x6627): undefined reference to rte_eth_bond_8023ad_slave_info' pktgen-cmds.c:(.text+0x682e): undefined reference to rte_eth_bond_primary_get' pktgen-cmds.c:(.text+0x6884): undefined reference to rte_eth_bond_8023ad_agg_selection_get' pktgen-cmds.c:(.text+0x68c4): undefined reference to rte_eth_bond_xmit_policy_get' app/a172ced@@pktgen@exe/cli-functions.c.o: In function bonding_cmd': cli-functions.c:(.text+0x1d6d): undefined reference to rte_eth_bond_8023ad_conf_get' cli-functions.c:(.text+0x1ea5): undefined reference to rte_eth_bond_8023ad_conf_get' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. make: *** [Makefile:15: build] Error 1

=> looks like the /opt/mellanox/dpdk/lib64/pkgconfig provided by Mellanox is not taken into account

[root@vxpreint169 pktgen]# more /opt/mellanox/dpdk/lib64/pkgconfig/* :::::::::::::: /opt/mellanox/dpdk/lib64/pkgconfig/libdpdk-libs.pc :::::::::::::: prefix=/opt/mellanox/dpdk libdir=${prefix}/lib64 includedir=${prefix}/include/dpdk

Name: dpdk-libs Description: Internal-only DPDK pkgconfig file. Not for direct use. Use libdpdk.pc instead of this file to query DPDK compile/link arguments Version: 20.11.0.0.21 Libs: -Wl,--as-needed -L${libdir} -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_s ecurity -lrte_sched -lrte_reorder -lrte_rib -lrte_regexdev -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag - lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrt e_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs Libs.private: -pthread -lm -ldl -lnuma -lpcap Cflags: -I${includedir} -I${includedir} -include rte_config.h -march=corei7 :::::::::::::: /opt/mellanox/dpdk/lib64/pkgconfig/libdpdk.pc :::::::::::::: prefix=/opt/mellanox/dpdk libdir=${prefix}/lib64 includedir=${prefix}/include/dpdk

Name: DPDK Description: The Data Plane Development Kit (DPDK). Note that CFLAGS might contain an -march flag higher than typical baseline. This is required for a number of static inline functions in the public headers. Version: 20.11.0.0.21 Requires: libdpdk-libs Requires.private: libmlx5, libibverbs, libcrypto, zlib, libpcap, libelf Libs.private: -Wl,--whole-archive -L${libdir} -l:librte_common_cpt.a -l:librte_common_dpaax.a -l:librte_common_iavf.a -l:librte_common_octeontx.a -l:librte_common_octeontx2.a -l: librte_common_sfc_efx.a -l:librte_bus_dpaa.a -l:librte_bus_fslmc.a -l:librte_bus_ifpga.a -l:librte_bus_pci.a -l:librte_bus_vdev.a -l:librte_bus_vmbus.a -l:librte_common_mlx5.a -l :librte_common_qat.a -l:librte_mempool_bucket.a -l:librte_mempool_dpaa.a -l:librte_mempool_dpaa2.a -l:librte_mempool_octeontx.a -l:librte_mempool_ring.a -l:librte_mempool_stack.a -l:librte_net_af_packet.a -l:librte_net_ark.a -l:librte_net_atlantic.a -l:librte_net_avp.a -l:librte_net_axgbe.a -l:librte_net_bond.a -l:librte_net_bnx2x.a -l:librte_net_bnxt.a -l:librte_net_cxgbe.a -l:librte_net_dpaa.a -l:librte_net_dpaa2.a -l:librte_net_e1000.a -l:librte_net_ena.a -l:librte_net_enetc.a -l:librte_net_enic.a -l:librte_net_failsafe.a -l: librte_net_fm10k.a -l:librte_net_i40e.a -l:librte_net_hinic.a -l:librte_net_hns3.a -l:librte_net_iavf.a -l:librte_net_ice.a -l:librte_net_igc.a -l:librte_net_ixgbe.a -l:librte_ne t_kni.a -l:librte_net_liquidio.a -l:librte_net_memif.a -l:librte_net_mlx5.a -l:librte_net_netvsc.a -l:librte_net_nfp.a -l:librte_net_null.a -l:librte_net_octeontx.a -l:librte_net pcap.a -l:librte_net_pfe.a -l:librte_net_qede.a -l:librte_net_ring.a -l:librte_net_sfc.a -l:librte_net_softnic.a -l:librte_net_tap.a -l:librte_net_thunderx.a -l:librte_net_vdev netvsc.a -l:librte_net_vhost.a -l:librte_net_virtio.a -l:librte_net_vmxnet3.a -l:librte_raw_dpaa2_cmdif.a -l:librte_raw_dpaa2_qdma.a -l:librte_raw_ioat.a -l:librte_raw_ntb.a -l:l ibrte_raw_octeontx2_dma.a -l:librte_raw_octeontx2_ep.a -l:librte_raw_skeleton.a -l:librte_crypto_bcmfs.a -l:librte_crypto_caam_jr.a -l:librte_crypto_ccp.a -l:librte_crypto_dpaa_s ec.a -l:librte_crypto_dpaa2_sec.a -l:librte_crypto_nitrox.a -l:librte_crypto_null.a -l:librte_crypto_octeontx.a -l:librte_crypto_octeontx2.a -l:librte_cryptoopenssl.a -l:librte crypto_scheduler.a -l:librte_crypto_virtio.a -l:librte_compress_octeontx.a -l:librte_compress_zlib.a -l:librte_regex_mlx5.a -l:librte_regex_octeontx2.a -l:librte_vdpa_mlx5.a -l:l ibrte_event_dlb.a -l:librte_event_dlb2.a -l:librte_event_dpaa.a -l:librte_event_dpaa2.a -l:librte_event_opdl.a -l:librte_event_skeleton.a -l:librte_event_sw.a -l:librte_event_dsw .a -l:librte_event_octeontx.a -l:librte_baseband_null.a -l:librte_baseband_turbo_sw.a -l:librte_baseband_fpga_lte_fec.a -l:librte_baseband_fpga_5gnr_fec.a -l:librte_baseband_acc1 00.a -l:librte_node.a -l:librte_graph.a -l:librte_bpf.a -l:librte_flow_classify.a -l:librte_pipeline.a -l:librte_table.a -l:librte_port.a -l:librte_fib.a -l:librte_ipsec.a -l:lib rte_vhost.a -l:librte_stack.a -l:librte_security.a -l:librte_sched.a -l:librte_reorder.a -l:librte_rib.a -l:librte_regexdev.a -l:librte_rawdev.a -l:librte_pdump.a -l:librte_power .a -l:librte_member.a -l:librte_lpm.a -l:librte_latencystats.a -l:librte_kni.a -l:librte_jobstats.a -l:librte_ip_frag.a -l:librte_gso.a -l:librte_gro.a -l:librte_eventdev.a -l:li brte_efd.a -l:librte_distributor.a -l:librte_cryptodev.a -l:librte_compressdev.a -l:librte_cfgfile.a -l:librte_bitratestats.a -l:librte_bbdev.a -l:librte_acl.a -l:librte_timer.a -l:librte_hash.a -l:librte_metrics.a -l:librte_cmdline.a -l:librte_pci.a -l:librte_ethdev.a -l:librte_meter.a -l:librte_net.a -l:librte_mbuf.a -l:librte_mempool.a -l:librte_rcu.a -l:librte_ring.a -l:librte_eal.a -l:librte_telemetry.a -l:librte_kvargs.a -Wl,--no-whole-archive Cflags: -I${includedir}

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pktgen/Pktgen-DPDK/issues/53, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABC4ICS2F4WG6ZDRG6DWP4TS327XFANCNFSM4WTOQTIA.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/pktgen/Pktgen-DPDK/issues/53#issuecomment-767602233, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASTJ23EMS47A3NYCWQWLUCDS33KOLANCNFSM4WTOQTIA.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pktgen/Pktgen-DPDK/issues/53#issuecomment-767615424, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABC4ICRVNXHP7L5AIB4WCXDS33MYDANCNFSM4WTOQTIA.

catherinebeloinnokia commented 3 years ago

Hello Keith,

good news i have succeeded to build pktgen with this extra patch:

1/ add needed 'exotic' path for dpdk includes:

:%s@ARGS = -I@ARGS = -I/opt/mellanox/dpdk/include/dpdk -I@ # vim global substitution command

2/ add needed 'exotic' library librte_net_bond into 2 lines related to link :

add into those lines:

build app/pktgen: (...) | /usr/lib64/libnuma.so.1.0.0 (...) -> build app/pktgen: (...) | /opt/mellanox/dpdk/lib64/dpdk/pmds/librte_net_bond.so /usr/lib64/libnuma.so.1.0.0 (...)

and

LINK_ARGS = (...) --as-needed /opt/mellanox/dpdk/lib64/librte_node.so -> LINK_ARGS = (...) --as-needed /opt/mellanox/dpdk/lib64/dpdk/pmds/librte_net_bond.so /opt/mellanox/dpdk/lib64/librte_node.so

[root@vxpreint169 pktgen]# file /home/local/pktgen-21.01.0/usr/local/bin/pktgen /home/local/pktgen-21.01.0/usr/local/bin/pktgen: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=07075cdb40e7153343f0991b4433389b68fb3ba4, not stripped

(in fact, there was no need to edit the app/meson.build)

thank you for your help!

ticket can be closed.

regards, Catherine.

From: Keith Wiles notifications@github.com Sent: Tuesday, January 26, 2021 4:44 PM To: pktgen/Pktgen-DPDK Pktgen-DPDK@noreply.github.com Cc: Beloin, Catherine (Nokia - FR/Paris-Saclay) catherine.beloin@nokia.com; Author author@noreply.github.com Subject: Re: [pktgen/Pktgen-DPDK] unable to build pktgen with dpdk package provided by Mellanox (#53)

Hmmm, in the output below the librte_net_bond library is not find. Check in the lib directory to see if that one was built.

The rest of the errors are around headers files from DPDK are missing.

I noticed the -I/opt/mellanox/dpdk/include/dpdk is not present in the CC lines. Not sure why it is not present.

Also the Mellanox driver is not linked to pktgen by default, edit the app/meson.build file and add the Mellanox libraries. Look for the i40e reference in the file.

Sorry, not much help.

From: catherinebeloinnokia notifications@github.com<mailto:notifications@github.com> Date: Tuesday, January 26, 2021 at 9:21 AM To: pktgen/Pktgen-DPDK Pktgen-DPDK@noreply.github.com<mailto:Pktgen-DPDK@noreply.github.com> Cc: Keith Wiles keith.wiles@icloud.com<mailto:keith.wiles@icloud.com>, Mention mention@noreply.github.com<mailto:mention@noreply.github.com> Subject: Re: [pktgen/Pktgen-DPDK] unable to build pktgen with dpdk package provided by Mellanox (#53) Hello Keith,

[root@vxpreint169 pktgen]# echo $PKG_CONFIG_PATH /opt/mellanox/dpdk/lib64/pkgconfig

[root@vxpreint169 pktgen]# pkg-config -libs libdpdk -Wl,--as-needed -L/opt/mellanox/dpdk/lib64 -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rib -lrte_regexdev -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs

[root@vxpreint169 pktgen]# pkg-config -cflags libdpdk -I/opt/mellanox/dpdk/include/dpdk -include rte_config.h -march=corei7 -I/usr/usr/include -I/usr/include/libnl3

[root@vxpreint169 pktgen]# make rebuild

Use 'make help' for more commands\n ./tools/pktgen-build.sh clean build lua_enabled : '-Denable_lua=false' gui_enabled : '-Denable_gui=false' SDK Directory : '/local/pktgen' Build Directory : '/local/pktgen/Builddir' Target Directory : '/local/pktgen/usr'

Removing '/local/pktgen/Builddir' directory Removing '/local/pktgen/usr' directory

Ninja build in '/local/pktgen/Builddir' buildtype='release' meson -Dbuildtype=release -Denable_lua=false -Denable_gui=false Builddir The Meson build system Version: 0.49.2 Source dir: /home/local/pktgen-21.01.0 Build dir: /home/local/pktgen-21.01.0/Builddir Build type: native build Program cat found: YES (/usr/bin/cat) Project name: pktgen Project version: 21.01.0 Native C compiler: cc (gcc 8.3.1 "cc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)") Build machine cpu family: x86_64 Build machine cpu: x86_64 Compiler for C supports arguments -mavx2: YES Compiler for C supports arguments -Wno-pedantic -Wpedantic: YES Compiler for C supports arguments -Wno-format-truncation -Wformat-truncation: YES Found pkg-config: /usr/bin/pkg-config (1.4.2) Dependency libdpdk found: YES 20.11.0.0.21 Library librte_net_bond found: NO Using meson's python ['/usr/libexec/platform-python'] Library rte_net_i40e found: NO Library rte_net_ixgbe found: NO Library rte_net_ice found: NO Dependency threads found: YES Library numa found: YES Library pcap found: YES Library dl found: YES Library m found: YES Program sphinx-build found: NO Build targets in project: 8 Option werror is: True [default: true] Found ninja-1.8.2 at /usr/bin/ninja ninja: Entering directory `/local/pktgen/Builddir' [10/66] Compiling C object 'lib/utils/4da8951@@utils@sta/heap.c.o'. FAILED: lib/utils/4da8951@@utils@sta/heap.c.o cc -Ilib/utils/4da8951@@utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utils@sta/heap.c.o' -MF 'lib/utils/4da8951@@utils@sta/heap.c.o.d' -o 'lib/utils/4da8951@@utils@sta/heap.c.o' -c ../lib/utils/heap.c ../lib/utils/heap.c:8:10: fatal error: rte_spinlock.h: No such file or directory

include

^~~~ compilation terminated. [11/66] Compiling C object 'lib/utils/4da8951@@utils@sta/_atoip.c.o'. FAILED: lib/utils/4da8951@@utils@sta/_atoip.c.o cc -Ilib/utils/4da8951@@utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utils@sta/_atoip.c.o' -MF 'lib/utils/4da8951@@utils@sta/_atoip.c.o.d' -o 'lib/utils/4da8951@@utils@sta/_atoip.c.o' -c ../lib/utils/_atoip.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/_atoip.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [12/66] Compiling C object 'lib/utils/4da8951@@utils@sta/portlist.c.o'. FAILED: lib/utils/4da8951@@utils@sta/portlist.c.o cc -Ilib/utils/4da8951@@utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utils@sta/portlist.c.o' -MF 'lib/utils/4da8951@@utils@sta/portlist.c.o.d' -o 'lib/utils/4da8951@@utils@sta/portlist.c.o' -c ../lib/utils/portlist.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/portlist.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [13/66] Compiling C object 'lib/vec/bab47a5@@vec@sta/vec.c.o'. FAILED: lib/vec/bab47a5@@vec@sta/vec.c.o cc -Ilib/vec/bab47a5@@vec@sta -Ilib/vec -I../lib/vec -Ilib/utils -I../lib/utils -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/vec/bab47a5@@vec@sta/vec.c.o' -MF 'lib/vec/bab47a5@@vec@sta/vec.c.o.d' -o 'lib/vec/bab47a5@@vec@sta/vec.c.o' -c ../lib/vec/vec.c ../lib/vec/vec.c:6:10: fatal error: rte_memory.h: No such file or directory

include

^~~~~~ compilation terminated. [15/66] Compiling C object 'lib/common/3d47a30@@common@sta/l2p.c.o'. ninja: build stopped: subcommand failed. make: *** [Makefile:18: rebuild] Error 1 [root@vxpreint169 pktgen]#

[root@vxpreint169 pktgen]# locate rte_memory.h /opt/mellanox/dpdk/include/dpdk/rte_memory.h

regards, Catherine.

From: Keith Wiles notifications@github.com<mailto:notifications@github.com> Sent: Tuesday, January 26, 2021 4:02 PM To: pktgen/Pktgen-DPDK Pktgen-DPDK@noreply.github.com<mailto:Pktgen-DPDK@noreply.github.com> Cc: Beloin, Catherine (Nokia - FR/Paris-Saclay) catherine.beloin@nokia.com<mailto:catherine.beloin@nokia.com>; Author author@noreply.github.com<mailto:author@noreply.github.com> Subject: Re: [pktgen/Pktgen-DPDK] unable to build pktgen with dpdk package provided by Mellanox (#53)

In the latest build of Pktgen it relies on pkg-config file in DPDK to locate and find the header files. Make sure ‘pkg-config –libs libdpdk’ and ‘pkg-config –cflags libdpdk’ returns something and the header files are located at the correct location.

I have never used Mellanox drivers and I have very little knowledge of CentOS.

If you can provide the complete output from the ‘make build’ or ‘make rebuild’ (to clean and build) command that would be good.

From: catherinebeloinnokia notifications@github.com<mailto:notifications@github.com<mailto:notifications@github.com%3cmailto:notifications@github.com>> Date: Tuesday, January 26, 2021 at 7:30 AM To: pktgen/Pktgen-DPDK Pktgen-DPDK@noreply.github.com<mailto:Pktgen-DPDK@noreply.github.com<mailto:Pktgen-DPDK@noreply.github.com%3cmailto:Pktgen-DPDK@noreply.github.com>> Cc: Keith Wiles keith.wiles@icloud.com<mailto:keith.wiles@icloud.com<mailto:keith.wiles@icloud.com%3cmailto:keith.wiles@icloud.com>>, Mention mention@noreply.github.com<mailto:mention@noreply.github.com<mailto:mention@noreply.github.com%3cmailto:mention@noreply.github.com>> Subject: [pktgen/Pktgen-DPDK] unable to install pktgen with dpdk package provided by Mellanox (#53)

Hello,

working on hardware PC HP EliteDesk 800 G1 SFF · Mellanox MT27710 Family [ConnectX-4 Lx]

installed in centos 8.3 (Linux vxpreint169 4.18.0-240.1.1.el8_3.x86_64 #1https://github.com/pktgen/Pktgen-DPDK/issues/1 SMP Thu Nov 19 17:20:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux) · latest Mellanox ISO from https://www.mellanox.com/products/infiniband-drivers/linux/mlnx_ofed: -> MLNX_OFED Download Center -> RHEL/CentOS -> RHEL/CentOS 8.3 -> x86_64 -> ISO: MLNX_OFED_LINUX-5.2-1.0.4.0-rhel8.3-x86_64.iso

installed Mellanox drivers, and also dpdk provided by Mellanox ISO, after Mellanox doc https://docs.mellanox.com/display/OFEDv521040/Installing+Mellanox+OFED:

(do all steps to add ISO RPMs contents as a new repo, get key) yum install mlnx-dpdk mlnx-dpdk-devel

get latest pktgen package as tarfile: wget https://git.dpdk.org/apps/pktgen-dpdk/snapshot/pktgen-21.01.0.tar.gz untar it and try to build -> failure:

cd /local/pktgen export RTE_TARGET=x86_64-native-linuxapp-gcc export RTE_SDK=/opt/mellanox/dpdk export PKG_CONFIG_PATH=/opt/mellanox/dpdk/lib64/pkgconfig

make build ... [9/66] Compiling C object 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o'. FAILED: lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o cc -Ilib/utils/4da8951@@utilshttps://github.com/utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o' -MF 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o.d' -o 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/_atoip.c.o' -c ../lib/utils/_atoip.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/_atoip.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [10/66] Compiling C object 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o'. FAILED: lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o cc -Ilib/utils/4da8951@@utilshttps://github.com/utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o' -MF 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o.d' -o 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/portlist.c.o' -c ../lib/utils/portlist.c In file included from ../lib/common/pg_strings.h:20, from ../lib/utils/portlist.c:5: ../lib/common/pg_compat.h:14:10: fatal error: rte_version.h: No such file or directory

include

^~~~~~~ compilation terminated. [11/66] Compiling C object 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o'. FAILED: lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o cc -Ilib/utils/4da8951@@utilshttps://github.com/utils@sta -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -MD -MQ 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o' -MF 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o.d' -o 'lib/utils/4da8951@@utilshttps://github.com/utils@sta/heap.c.o' -c ../lib/utils/heap.c ../lib/utils/heap.c:8:10: fatal error: rte_spinlock.h: No such file or directory

include

^~~~ compilation terminated. [14/66] Compiling C object 'lib/common/3d47a30@@commonhttps://github.com/common@sta/cksum.c.o'. ninja: build stopped: subcommand failed. make: *** [Makefile:15: build] Error 1

+++

manual patch in file /local/pktgen/Builddir/build.ninja to try to solve this issue -> other failer later:

:%s@ARGS = -I@ARGS = -I/opt/mellanox/dpdk/include/dpdk -I@

make build ... FAILED: app/pktgen cc -o app/pktgen 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/cli-functions.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/lpktgenlib.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cmds.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cfg.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-main.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-pcap.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-range.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cpu.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-seq.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-dump.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-capture.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-stats.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-port-cfg.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-ipv6.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-ipv4.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-arp.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-gre.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-ether.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-tcp.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-udp.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-vlan.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-random.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-display.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-log.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-gtpu.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-latency.c.o' 'app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-rate.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-O1 -Wl,--start-group lib/common/libcommon.a lib/utils/libutils.a lib/vec/libvec.a lib/plugin/libplugin.a lib/cli/libcli.a lib/lua/liblua.a -Wl,--as-needed /opt/mellanox/dpdk/lib64/librte_node.so /opt/mellanox/dpdk/lib64/librte_graph.so /opt/mellanox/dpdk/lib64/librte_bpf.so /opt/mellanox/dpdk/lib64/librte_flow_classify.so /opt/mellanox/dpdk/lib64/librte_pipeline.so /opt/mellanox/dpdk/lib64/librte_table.so /opt/mellanox/dpdk/lib64/librte_port.so /opt/mellanox/dpdk/lib64/librte_fib.so /opt/mellanox/dpdk/lib64/librte_ipsec.so /opt/mellanox/dpdk/lib64/librte_vhost.so /opt/mellanox/dpdk/lib64/librte_stack.so /opt/mellanox/dpdk/lib64/librte_security.so /opt/mellanox/dpdk/lib64/librte_sched.so /opt/mellanox/dpdk/lib64/librte_reorder.so /opt/mellanox/dpdk/lib64/librte_rib.so /opt/mellanox/dpdk/lib64/librte_regexdev.so /opt/mellanox/dpdk/lib64/librte_rawdev.so /opt/mellanox/dpdk/lib64/librte_pdump.so /opt/mellanox/dpdk/lib64/librte_power.so /opt/mellanox/dpdk/lib64/librte_member.so /opt/mellanox/dpdk/lib64/librte_lpm.so /opt/mellanox/dpdk/lib64/librte_latencystats.so /opt/mellanox/dpdk/lib64/librte_kni.so /opt/mellanox/dpdk/lib64/librte_jobstats.so /opt/mellanox/dpdk/lib64/librte_ip_frag.so /opt/mellanox/dpdk/lib64/librte_gso.so /opt/mellanox/dpdk/lib64/librte_gro.so /opt/mellanox/dpdk/lib64/librte_eventdev.so /opt/mellanox/dpdk/lib64/librte_efd.so /opt/mellanox/dpdk/lib64/librte_distributor.so /opt/mellanox/dpdk/lib64/librte_cryptodev.so /opt/mellanox/dpdk/lib64/librte_compressdev.so /opt/mellanox/dpdk/lib64/librte_cfgfile.so /opt/mellanox/dpdk/lib64/librte_bitratestats.so /opt/mellanox/dpdk/lib64/librte_bbdev.so /opt/mellanox/dpdk/lib64/librte_acl.so /opt/mellanox/dpdk/lib64/librte_timer.so /opt/mellanox/dpdk/lib64/librte_hash.so /opt/mellanox/dpdk/lib64/librte_metrics.so /opt/mellanox/dpdk/lib64/librte_cmdline.so /opt/mellanox/dpdk/lib64/librte_pci.so /opt/mellanox/dpdk/lib64/librte_ethdev.so /opt/mellanox/dpdk/lib64/librte_meter.so /opt/mellanox/dpdk/lib64/librte_net.so /opt/mellanox/dpdk/lib64/librte_mbuf.so /opt/mellanox/dpdk/lib64/librte_mempool.so /opt/mellanox/dpdk/lib64/librte_rcu.so /opt/mellanox/dpdk/lib64/librte_ring.so /opt/mellanox/dpdk/lib64/librte_eal.so /opt/mellanox/dpdk/lib64/librte_telemetry.so /opt/mellanox/dpdk/lib64/librte_kvargs.so -lnuma -lpcap -ldl -lm -Wl,--end-group -Wl,--as-needed -pthread '-Wl,-rpath,$ORIGIN/../lib/common:$ORIGIN/../lib/utils:$ORIGIN/../lib/vec:$ORIGIN/../lib/plugin:$ORIGIN/../lib/cli:$ORIGIN/../lib/lua' -Wl,-rpath-link,/home/local/pktgen-21.01.0/Builddir/lib/common:/home/local/pktgen-21.01.0/Builddir/lib/utils:/home/local/pktgen-21.01.0/Builddir/lib/vec:/home/local/pktgen-21.01.0/Builddir/lib/plugin:/home/local/pktgen-21.01.0/Builddir/lib/cli:/home/local/pktgen-21.01.0/Builddir/lib/lua app/a172ced@@pktgenhttps://github.com/pktgen@exe/pktgen-cmds.c.o: In function enable_bonding': pktgen-cmds.c:(.text+0x60dc): undefined reference to rte_eth_bond_8023ad_conf_get' pktgen-cmds.c:(.text+0x60f7): undefined reference to rte_eth_bond_slaves_get' pktgen-cmds.c:(.text+0x6118): undefined reference to rte_eth_bond_active_slaves_get' pktgen-cmds.c:(.text+0x617f): undefined reference to rte_eth_bond_8023ad_ext_distrib' pktgen-cmds.c:(.text+0x61a5): undefined reference to rte_eth_bond_8023ad_ext_collect' pktgen-cmds.c:(.text+0x61f2): undefined reference to rte_eth_bond_8023ad_ext_distrib' app/a172ced@@pktgen@exe/pktgen-cmds.c.o: In function show_bonding_mode': pktgen-cmds.c:(.text+0x6293): undefined reference to rte_eth_bond_mode_get' pktgen-cmds.c:(.text+0x62d2): undefined reference to rte_eth_bond_slaves_get' pktgen-cmds.c:(.text+0x6359): undefined reference to rte_eth_bond_active_slaves_get' pktgen-cmds.c:(.text+0x6627): undefined reference to rte_eth_bond_8023ad_slave_info' pktgen-cmds.c:(.text+0x682e): undefined reference to rte_eth_bond_primary_get' pktgen-cmds.c:(.text+0x6884): undefined reference to rte_eth_bond_8023ad_agg_selection_get' pktgen-cmds.c:(.text+0x68c4): undefined reference to rte_eth_bond_xmit_policy_get' app/a172ced@@pktgen@exe/cli-functions.c.o: In function bonding_cmd': cli-functions.c:(.text+0x1d6d): undefined reference to rte_eth_bond_8023ad_conf_get' cli-functions.c:(.text+0x1ea5): undefined reference to rte_eth_bond_8023ad_conf_get' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. make: *** [Makefile:15: build] Error 1

=> looks like the /opt/mellanox/dpdk/lib64/pkgconfig provided by Mellanox is not taken into account

[root@vxpreint169 pktgen]# more /opt/mellanox/dpdk/lib64/pkgconfig/* :::::::::::::: /opt/mellanox/dpdk/lib64/pkgconfig/libdpdk-libs.pc :::::::::::::: prefix=/opt/mellanox/dpdk libdir=${prefix}/lib64 includedir=${prefix}/include/dpdk

Name: dpdk-libs Description: Internal-only DPDK pkgconfig file. Not for direct use. Use libdpdk.pc instead of this file to query DPDK compile/link arguments Version: 20.11.0.0.21 Libs: -Wl,--as-needed -L${libdir} -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_s ecurity -lrte_sched -lrte_reorder -lrte_rib -lrte_regexdev -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag - lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrt e_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs Libs.private: -pthread -lm -ldl -lnuma -lpcap Cflags: -I${includedir} -I${includedir} -include rte_config.h -march=corei7 :::::::::::::: /opt/mellanox/dpdk/lib64/pkgconfig/libdpdk.pc :::::::::::::: prefix=/opt/mellanox/dpdk libdir=${prefix}/lib64 includedir=${prefix}/include/dpdk

Name: DPDK Description: The Data Plane Development Kit (DPDK). Note that CFLAGS might contain an -march flag higher than typical baseline. This is required for a number of static inline functions in the public headers. Version: 20.11.0.0.21 Requires: libdpdk-libs Requires.private: libmlx5, libibverbs, libcrypto, zlib, libpcap, libelf Libs.private: -Wl,--whole-archive -L${libdir} -l:librte_common_cpt.a -l:librte_common_dpaax.a -l:librte_common_iavf.a -l:librte_common_octeontx.a -l:librte_common_octeontx2.a -l: librte_common_sfc_efx.a -l:librte_bus_dpaa.a -l:librte_bus_fslmc.a -l:librte_bus_ifpga.a -l:librte_bus_pci.a -l:librte_bus_vdev.a -l:librte_bus_vmbus.a -l:librte_common_mlx5.a -l :librte_common_qat.a -l:librte_mempool_bucket.a -l:librte_mempool_dpaa.a -l:librte_mempool_dpaa2.a -l:librte_mempool_octeontx.a -l:librte_mempool_ring.a -l:librte_mempool_stack.a -l:librte_net_af_packet.a -l:librte_net_ark.a -l:librte_net_atlantic.a -l:librte_net_avp.a -l:librte_net_axgbe.a -l:librte_net_bond.a -l:librte_net_bnx2x.a -l:librte_net_bnxt.a -l:librte_net_cxgbe.a -l:librte_net_dpaa.a -l:librte_net_dpaa2.a -l:librte_net_e1000.a -l:librte_net_ena.a -l:librte_net_enetc.a -l:librte_net_enic.a -l:librte_net_failsafe.a -l: librte_net_fm10k.a -l:librte_net_i40e.a -l:librte_net_hinic.a -l:librte_net_hns3.a -l:librte_net_iavf.a -l:librte_net_ice.a -l:librte_net_igc.a -l:librte_net_ixgbe.a -l:librte_ne t_kni.a -l:librte_net_liquidio.a -l:librte_net_memif.a -l:librte_net_mlx5.a -l:librte_net_netvsc.a -l:librte_net_nfp.a -l:librte_net_null.a -l:librte_net_octeontx.a -l:librte_net pcap.a -l:librte_net_pfe.a -l:librte_net_qede.a -l:librte_net_ring.a -l:librte_net_sfc.a -l:librte_net_softnic.a -l:librte_net_tap.a -l:librte_net_thunderx.a -l:librte_net_vdev netvsc.a -l:librte_net_vhost.a -l:librte_net_virtio.a -l:librte_net_vmxnet3.a -l:librte_raw_dpaa2_cmdif.a -l:librte_raw_dpaa2_qdma.a -l:librte_raw_ioat.a -l:librte_raw_ntb.a -l:l ibrte_raw_octeontx2_dma.a -l:librte_raw_octeontx2_ep.a -l:librte_raw_skeleton.a -l:librte_crypto_bcmfs.a -l:librte_crypto_caam_jr.a -l:librte_crypto_ccp.a -l:librte_crypto_dpaa_s ec.a -l:librte_crypto_dpaa2_sec.a -l:librte_crypto_nitrox.a -l:librte_crypto_null.a -l:librte_crypto_octeontx.a -l:librte_crypto_octeontx2.a -l:librte_cryptoopenssl.a -l:librte crypto_scheduler.a -l:librte_crypto_virtio.a -l:librte_compress_octeontx.a -l:librte_compress_zlib.a -l:librte_regex_mlx5.a -l:librte_regex_octeontx2.a -l:librte_vdpa_mlx5.a -l:l ibrte_event_dlb.a -l:librte_event_dlb2.a -l:librte_event_dpaa.a -l:librte_event_dpaa2.a -l:librte_event_opdl.a -l:librte_event_skeleton.a -l:librte_event_sw.a -l:librte_event_dsw .a -l:librte_event_octeontx.a -l:librte_baseband_null.a -l:librte_baseband_turbo_sw.a -l:librte_baseband_fpga_lte_fec.a -l:librte_baseband_fpga_5gnr_fec.a -l:librte_baseband_acc1 00.a -l:librte_node.a -l:librte_graph.a -l:librte_bpf.a -l:librte_flow_classify.a -l:librte_pipeline.a -l:librte_table.a -l:librte_port.a -l:librte_fib.a -l:librte_ipsec.a -l:lib rte_vhost.a -l:librte_stack.a -l:librte_security.a -l:librte_sched.a -l:librte_reorder.a -l:librte_rib.a -l:librte_regexdev.a -l:librte_rawdev.a -l:librte_pdump.a -l:librte_power .a -l:librte_member.a -l:librte_lpm.a -l:librte_latencystats.a -l:librte_kni.a -l:librte_jobstats.a -l:librte_ip_frag.a -l:librte_gso.a -l:librte_gro.a -l:librte_eventdev.a -l:li brte_efd.a -l:librte_distributor.a -l:librte_cryptodev.a -l:librte_compressdev.a -l:librte_cfgfile.a -l:librte_bitratestats.a -l:librte_bbdev.a -l:librte_acl.a -l:librte_timer.a -l:librte_hash.a -l:librte_metrics.a -l:librte_cmdline.a -l:librte_pci.a -l:librte_ethdev.a -l:librte_meter.a -l:librte_net.a -l:librte_mbuf.a -l:librte_mempool.a -l:librte_rcu.a -l:librte_ring.a -l:librte_eal.a -l:librte_telemetry.a -l:librte_kvargs.a -Wl,--no-whole-archive Cflags: -I${includedir}

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pktgen/Pktgen-DPDK/issues/53, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABC4ICS2F4WG6ZDRG6DWP4TS327XFANCNFSM4WTOQTIA.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/pktgen/Pktgen-DPDK/issues/53#issuecomment-767602233, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASTJ23EMS47A3NYCWQWLUCDS33KOLANCNFSM4WTOQTIA.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pktgen/Pktgen-DPDK/issues/53#issuecomment-767615424, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABC4ICRVNXHP7L5AIB4WCXDS33MYDANCNFSM4WTOQTIA.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/pktgen/Pktgen-DPDK/issues/53#issuecomment-767631102, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASTJ23BOG52P3VCSBLDCQETS33PLVANCNFSM4WTOQTIA.

pktgen commented 3 years ago

Adding the two patches you had to add should not be required, but if it works it works.

I will try to understand the problem better and see if I can get meson/ninja to work correctly.

Thanks