Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error Moongen [[INFO] Found 0 usable devices: [FATAL] Lua error in task master /home/uhost8/MoonGen/build/../libmoon/lua/device.lua:100: there are only 0 ports, tried to configure port id 0] #303

Open
ravi1304 opened this issue Mar 22, 2021 · 2 comments

Comments

@ravi1304
Copy link

ravi1304 commented Mar 22, 2021

Hello all,

I want to test my application with millions of packet. SO i came accross this moongen packet generator which is awesome.

But when i try to build i get an build error. Can someone please look in to it and help me out as soon as possible please,

$ sudo ./build.sh
Build libmoon with MoonGen
==== Building LuaJIT 2.1.0-beta3 ====
make -C src
make[1]: Entering directory '/home/uhost8/MoonGen/libmoon/deps/luajit/src'
make[1]: Nothing to be done for 'default'.
make[1]: Leaving directory '/home/uhost8/MoonGen/libmoon/deps/luajit/src'
==== Successfully built LuaJIT 2.1.0-beta3 ====
==== Installing LuaJIT 2.1.0-beta3 to /usr/local ====
mkdir -p /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/bin /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/lib /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/include/luajit-2.1 /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/share/man/man1 /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/lib/pkgconfig /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/share/luajit-2.1.0-beta3/jit /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/share/lua/5.1 /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/lib/lua/5.1
cd src && install -m 0755 luajit /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/bin/luajit-2.1.0-beta3
cd src && test -f libluajit.a && install -m 0644 libluajit.a /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/lib/libluajit-5.1.a || :
rm -f /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/lib/libluajit-5.1.so.2.1.0 /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/lib/libluajit-5.1.so /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/lib/libluajit-5.1.so.2
cd src && test -f libluajit.so &&
install -m 0755 libluajit.so /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/lib/libluajit-5.1.so.2.1.0 &&
ldconfig -n /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/lib &&
ln -sf libluajit-5.1.so.2.1.0 /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/lib/libluajit-5.1.so &&
ln -sf libluajit-5.1.so.2.1.0 /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/lib/libluajit-5.1.so.2 || :
cd etc && install -m 0644 luajit.1 /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/share/man/man1
cd etc && sed -e "s|^prefix=.|prefix=/usr/local|" -e "s|^multilib=.|multilib=lib|" luajit.pc > luajit.pc.tmp &&
install -m 0644 luajit.pc.tmp /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/lib/pkgconfig/luajit.pc &&
rm -f luajit.pc.tmp
cd src && install -m 0644 lua.h lualib.h lauxlib.h luaconf.h lua.hpp luajit.h /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/include/luajit-2.1
cd src/jit && install -m 0644 bc.lua bcsave.lua dump.lua p.lua v.lua zone.lua dis_x86.lua dis_x64.lua dis_arm.lua dis_arm64.lua dis_arm64be.lua dis_ppc.lua dis_mips.lua dis_mipsel.lua dis_mips64.lua dis_mips64el.lua vmdef.lua /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/share/luajit-2.1.0-beta3/jit
==== Successfully installed LuaJIT 2.1.0-beta3 to /usr/local ====

Note: the development releases deliberately do NOT install a symlink for luajit
You can do this now by running this command (with sudo):

ln -sf luajit-2.1.0-beta3 /home/uhost8/MoonGen/libmoon/deps/luajit/usr/local/bin/luajit

Configuration done using x86_64-native-linuxapp-gcc
== Build lib
== Build lib/librte_compat
== Build lib/librte_eal
== Build lib/librte_eal/common
== Build lib/librte_eal/linuxapp
== Build lib/librte_eal/linuxapp/eal
== Build lib/librte_eal/linuxapp/igb_uio
== Build lib/librte_ring
== Build lib/librte_timer
== Build lib/librte_cfgfile
== Build lib/librte_cmdline
== Build lib/librte_kvargs
== Build lib/librte_lpm
== Build lib/librte_acl
== Build lib/librte_jobstats
== Build lib/librte_metrics
== Build lib/librte_power
== Build lib/librte_meter
== Build lib/librte_mempool
== Build lib/librte_eventdev
== Build lib/librte_hash
== Build lib/librte_mbuf
== Build lib/librte_efd
== Build lib/librte_net
== Build lib/librte_cryptodev
== Build lib/librte_reorder
== Build lib/librte_ether
== Build lib/librte_sched
== Build lib/librte_vhost
== Build lib/librte_ip_frag
== Build lib/librte_gro
== Build lib/librte_bitratestats
== Build lib/librte_latencystats
== Build lib/librte_distributor
== Build lib/librte_kni
== Build lib/librte_pdump
== Build lib/librte_port
== Build lib/librte_table
== Build lib/librte_pipeline
== Build buildtools
== Build buildtools/pmdinfogen
== Build drivers
== Build drivers/bus
== Build drivers/mempool
== Build drivers/event
== Build drivers/event/skeleton
== Build drivers/event/sw
== Build drivers/event/octeontx
== Build drivers/mempool/ring
== Build drivers/mempool/stack
== Build drivers/net
== Build drivers/crypto
== Build drivers/net/af_packet
== Build drivers/net/ark
== Build drivers/net/avp
== Build drivers/net/bonding
== Build drivers/net/cxgbe
== Build drivers/net/e1000
== Build drivers/net/ena
== Build drivers/crypto/scheduler
== Build drivers/net/enic
== Build drivers/net/failsafe
== Build drivers/net/fm10k
== Build drivers/crypto/null
== Build drivers/net/i40e
== Build drivers/net/ixgbe
== Build drivers/net/liquidio
== Build drivers/net/nfp
== Build drivers/net/bnxt
== Build drivers/net/null
== Build drivers/net/qede
== Build drivers/net/ring
== Build drivers/net/sfc
== Build drivers/net/tap
== Build drivers/net/thunderx
== Build drivers/net/virtio
== Build drivers/net/vmxnet3
== Build drivers/net/kni
== Build drivers/net/vhost
== Build app
== Build app/proc_info
== Build app/pdump
== Build app/test-crypto-perf
== Build app/test-eventdev
Build complete [x86_64-native-linuxapp-gcc]
make -C deps/http-parser library
make[1]: Entering directory '/home/uhost8/MoonGen/libmoon/lua/lib/turbo/deps/http-parser'
gcc -shared -Wl,-soname=libhttp_parser.so.2.1 -o libhttp_parser.so.2.1 libhttp_parser.o
make[1]: Leaving directory '/home/uhost8/MoonGen/libmoon/lua/lib/turbo/deps/http-parser'
gcc -Ideps/http-parser/ -shared -O3 -Wall -g -fPIC deps/http-parser/libhttp_parser.o deps/turbo_ffi_wrap.c -o libtffi_wrap.so -lcrypto -lssl
make: Nothing to be done for 'all'.
-- Building Intel TBB: /usr/bin/make -j8 tbb_build_prefix=tbb_cmake_build_subdir tbb_build_dir=/home/uhost8/MoonGen/build/libmoon/tbb_cmake_build compiler=gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/uhost8/MoonGen/build
[ 72%] Built target moon
[100%] Built target MoonGen
Trying to bind interfaces, this will fail if you are not root
Try sudo ./bind-interfaces.sh if this step fails
Binding interface 0000:04:00.0 to DPDK

$ sudo libmoon/deps/dpdk/usertools/dpdk-devbind.py --status

Network devices using DPDK-compatible driver

0000:04:00.0 'Wireless 8265 / 8275 24fd' drv=igb_uio unused=

Network devices using kernel driver

0000:03:00.1 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller 8168' if=eth0 drv=r8169 unused=igb_uio Active

Other Network devices

Crypto devices using DPDK-compatible driver

Crypto devices using kernel driver

Other Crypto devices

Eventdev devices using DPDK-compatible driver

Eventdev devices using kernel driver

Other Eventdev devices

Mempool devices using DPDK-compatible driver

Mempool devices using kernel driver

Other Mempool devices

sudo ./build/MoonGen examples/l3-load-latency.lua 0 1
[INFO] Initializing DPDK. This will take a few seconds...
EAL: Detected 8 lcore(s)
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
[INFO] Found 0 usable devices:
[FATAL] Lua error in task master
/home/uhost8/MoonGen/build/../libmoon/lua/device.lua:100: there are only 0 ports, tried to configure port id 0
Stack Traceback

(2) Lua method 'fatal' at file '/home/uhost8/MoonGen/build/../libmoon/lua/log.lua:129'
Local variables:
self = table: 0x41d35f98 {DEBUG:0, fatal:function: 0x415d9b40, writeToLog:function: 0x415d9b20, INFO:1 (more...)}
str = string: "there are only 0 ports, tried to configure port id 0"
(3) Lua field 'config' at file '/home/uhost8/MoonGen/build/../libmoon/lua/device.lua:100'
Local variables:
args = table: 0x41c3d0b8 {rxQueues:3, txQueues:3, port:0}
(4) Lua function 'master' at file 'examples/l3-load-latency.lua:37' (best guess)
Local variables:
args = table: 0x40fccab8 {rxDev:1, txDev:0, flows:4, rate:10000, size:60}
(5) global C function 'xpcall'
(6) Lua upvalue 'master' at file '/home/uhost8/MoonGen/build/../libmoon/lua/main.lua:96'
Local variables:
_ = string: "./build/MoonGen"
file = string: "examples/l3-load-latency.lua"
args = table: 0x4178c820 {1:0, 2:1}
cfgFile = nil
ok = boolean: true
parsedArgs = table: 0x41a57c10 {1:table: 0x40fccab8}
(7) Lua function 'main' at file '/home/uhost8/MoonGen/build/../libmoon/lua/main.lua:146' (best guess)
Local variables:
task = string: "master"
/home/uhost8/MoonGen/build/../libmoon/lua/device.lua:100: there are only 0 ports, tried to configure port id 0

$ dmesg | tail
[ 158.762551] wlan0: authenticated
[ 158.763638] wlan0: associate with 80:26:89:51:a0:68 (try 1/3)
[ 158.768385] wlan0: RX AssocResp from 80:26:89:51:a0:68 (capab=0x411 status=0 aid=4)
[ 158.783567] wlan0: associated
[ 159.305237] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 451.943684] wlan0: deauthenticating from 80:26:89:51:a0:68 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 502.475725] igb_uio: Use MSIX interrupt by default
[ 502.892308] igb_uio 0000:04:00.0: uio device registered with irq 12
[ 502.892318] igb_uio 0000:04:00.0: mapping 1K dma=0x3b66e7000 host=0000000033b87559
[ 502.892324] igb_uio 0000:04:00.0: unmapping 1K dma=0x3b66e7000 host=0000000033b87559

I couldnt find any usable device to use

03:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
Subsystem: CLEVO/KAPOK Computer RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
Flags: bus master, fast devsel, latency 0, IRQ 16
I/O ports at d000 [size=256]
Memory at df214000 (64-bit, non-prefetchable) [size=4K]
Memory at df210000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: r8169
Kernel modules: r8169

04:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)
Subsystem: Intel Corporation Dual Band Wireless-AC 8265
Flags: bus master, fast devsel, latency 0, IRQ 139
Memory at df100000 (64-bit, non-prefetchable) [size=8K]
Capabilities:
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi
These are my wired and wireless NIC cards .

KIndly please help me out.

Thanks in advance.

Regards
Ravi

@emmericp
Copy link
Owner

Looks like you don't have a DPDK-supported NIC, see https://core.dpdk.org/supported/

@daishuangbiao
Copy link

Has this issue been resolved? I have encountered the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants