emmericp / MoonGen

MoonGen is a fully scriptable high-speed packet generator built on DPDK and LuaJIT. It can saturate a 10 Gbit/s connection with 64 byte packets on a single CPU core while executing user-provided Lua scripts for each packet. Multi-core support allows for even higher rates. It also features precise and accurate timestamping and rate control.
MIT License
1.04k stars 235 forks source link

Could not configure device 0: error Invalid argument #261

Closed zahid1121 closed 4 years ago

zahid1121 commented 4 years ago

I am getting the following problem. If someone can help.

sudo ./moongen-simple start load-latency:0:1:rate=1Mp/s,time=3m

admin@admin-VirtualBox:~/MoonGen$ sudo ./moongen-simple start load-latency:0:1:rate=1Mp/s,time=3m [INFO] Initializing DPDK. This will take a few seconds... EAL: Detected 4 lcore(s) EAL: Probing VFIO support... EAL: PCI device 0000:00:03.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:100e net_e1000_em EAL: PCI device 0000:00:08.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:100e net_e1000_em EAL: PCI device 0000:00:09.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:100e net_e1000_em [INFO] Found 2 usable devices: Device 0: 08:00:27:2A:86:F4 (Intel Corporation 82540EM Gigabit Ethernet Controller) Device 1: 08:00:27:89:AB:33 (Intel Corporation 82540EM Gigabit Ethernet Controller) [ERROR] 1 errors found while processing flow "load-latency". [WARN] Unknown option "time". [INFO] Flow load-latency => 0x1 PMD: eth_em_rx_queue_setup(): drop_en functionality not supported by device could not configure rx queue 0 [FATAL] Lua error in task master /home/admin/MoonGen/build/../libmoon/lua/device.lua:196: Could not configure device 0: error Invalid argument Stack Traceback

(2) Lua method 'fatal' at file '/home/admin/MoonGen/build/../libmoon/lua/log.lua:129' Local variables: self = table: 0x412c3f98 {DEBUG:0, fatal:function: 0x41679320, writeToLog:function: 0x41679300, INFO:1 (more...)} str = string: "Could not configure device 0: error Invalid argument" (3) Lua field 'config' at file '/home/admin/MoonGen/build/../libmoon/lua/device.lua:196' Local variables: args = table: 0x4084cc08 {rxQueues:1, stripVlan:true, dropEnable:true, mempools:table: 0x411e18f8 (more...)} driverInfo = table: 0x411df1f0 {} rc = number: -22 (4) Lua method 'configure' at file './interface/devmgr.lua:40' Local variables: self = table: 0x41327f30 {0:table: 0x401254a0, 1:table: 0x401255b0} (for generator) = C function: next (for state) = table: 0x41327f30 {0:table: 0x401254a0, 1:table: 0x401255b0} (for control) = number: nan i = number: 0 v = table: 0x401254a0 {rxq:1, rxqi:0, txq:3, txqi:0, rsqi:0, rsq:0} txq = number: 3 rxq = number: 1 (5) Lua function 'master' at file './interface/init.lua:66' (best guess) Local variables: args = table: 0x40be7dc8 {output:., config:flows, start:true, flows:table: 0x40be8758} devices = table: 0x41327f30 {0:table: 0x401254a0, 1:table: 0x401255b0} flows = table: 0x41327fe0 {1:table: 0x412f7f20} (6) global C function 'xpcall' (7) Lua upvalue 'master' at file '/home/admin/MoonGen/build/../libmoon/lua/main.lua:96' Local variables: _ = string: "./build/MoonGen" file = string: "./interface/init.lua" args = table: 0x41300b10 {1:start, 2:load-latency:0:1:rate=1Mp/s,time=3m} cfgFile = nil ok = boolean: true parsedArgs = table: 0x40be7d60 {1:table: 0x40be7dc8} (8) Lua function 'main' at file '/home/admin/MoonGen/build/../libmoon/lua/main.lua:146' (best guess) Local variables: task = string: "master" /home/admin/MoonGen/build/../libmoon/lua/device.lua:196: Could not configure device 0: error Invalid argument

I am using MoonGen in Vbox with one Ethernet card having two virtual VM networks.

emmericp commented 4 years ago

Virtualbox has extremely bad networking support. Try using a VirtIO nic instead, it might be more compatible. However, performance will be so bad that it's virtually useless

zahid1121 commented 4 years ago

It worked with VirtIO. Thanks Alot.

VAPuerta commented 1 year ago

Hi, have you set up a virtual environment with vitio as NIC driver and you can use MoonGen ??