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 234 forks source link

Error with vhost config(moongen-simple): device supports only 1 tx queues, requested 3 #273

Open immadhavv opened 4 years ago

immadhavv commented 4 years ago

Basically, the system setup is looks like the picture I have attached.. except I'm using MoonGen instead of pktgen to send packets to testpmd. i.e, MoonGen and testpmd have been installed in two different containers. I have a ovs-dpdk bridge in the Host-VM with four virtual ports(dpdkvhostuser type) and I want to send line rate traffic from MoonGen using the vdev parameters to testpmd.

My dpdk-conf.lua in MoonGen looks like this.

DPDKConfig { cores={0,3,4}, cli = { "-l","0,3,4", "-n","1", "--file-prefix", "moongen", "--socket-mem", "512", "--vdev","net_virtio_user1,path=/var/run/openvswitch/vhost-user1,queues=1", "--vdev","net_virtio_user2,path=/var/run/openvswitch/vhost-user2,queues=1" } } I set the disableOffloads option in device.lua to true( hardcoded it), as it was supposedly necessary according to this issue. https://github.com/emmericp/MoonGen/issues/253

and i ran the moongen-simple application from command line using, ./moongen-simple start load-latency:0:1:rate:10Mp/s --dpdk-config=libmoon/dpdk-conf.lua

But I got this back.

EAL: Search driver net_virtio_user1 to probe device net_virtio_user1 EAL: Search driver net_virtio_user2 to probe device net_virtio_user2 [INFO] Found 2 usable devices: Device 0: 8A:E9:DD:7B:A3:89 (unknown NIC (PCI ID 7f85:0)) Device 1: 66:3B:CF:5A:FC:AC (unknown NIC (PCI ID 7830:7030)) [INFO] Flow load-latency => 0x1 [FATAL] Lua error in task master /home/MoonGen/build/../libmoon/lua/device.lua:120: device supports only 1 tx queues, requested 3

the number of rx/tx queues are supposed to be defaulted to 1, and I didn't request for 3 queues anywhere. I feel like if i give the right parameters in the dpdk-conf file or in the command line, this might work.

But I've tried a couple of possible things and none of them works. Can someone please help me solve this one?

immadhavv commented 4 years ago

image

This is the system setup, except I'm using MoonGen instead of pktgen. @emmericp

sarsanaee commented 4 years ago

Does it work for you now?

immadhavv commented 4 years ago

@sarsanaee No it actually doesn't. :/

I tried setting the values manually to 1 at some places like (args.txQueues in device.lua), (txQueues value in devmgr.lua configure function),(commenting out the parts that leads to these errors) but all of them finally ends up with "[INFO] 2 devices are up" and just stuck there. I don't see any packets in testpmd. When I force close it, it gives me the following: PANIC in rte_eal_remote_launch(): cannot read on configuration pipe

sarsanaee commented 4 years ago

Which script do you run?

On 4/21/20 1:09 AM, Niranjan Madhavan wrote:

@sarsanaee https://github.com/sarsanaee No it actually doesn't. :/

I tried setting the values manually to 1 at some places like (args.txQueues in device.lua), (txQueues value in devmgr.lua configure function),(commenting out the parts that leads to these errors) but all of them finally ends up with "[INFO] 2 devices are up" and just stuck there. I don't see any packets in testpmd. When I force close it, it gives me the following: PANIC in rte_eal_remote_launch(): cannot read on configuration pipe

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/emmericp/MoonGen/issues/273#issuecomment-616690199, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3ZZPLCCY5CJ5OB5WSELJTRNR6VXANCNFSM4MLK5FAA.

immadhavv commented 4 years ago

@sarsanaee I tried moongen-simple script only.
The same command that I had mentioned earlier. ./moongen-simple start load-latency:0:1:rate:10Mp/s --dpdk-config=libmoon/dpdk-conf.lua

sarsanaee commented 4 years ago

Correct, the problem you have is with the number of queues, in the DPDK config, you have only requested 1 queue. However, it should be like --vdev","net_virtio_user1,path=/var/run/openvswitch/vhost-user1,queues=3" per vhost PMD port. I believe you should change this, but I'm not sure if that's the only thing you should change. Make sure you disable offloads since vhost doesn't support it. I think it does some hardware timestamping which again you don't have it on vhost port. Moreover if you are using 3 queues then probably there are some flow steering config, that again vhost doesn't support.

Also you should open up the script and read the source. Figure out what exactly is does, and why it requires 3 queues. What I can say is that there is nothing wrong with the script and it works properly. You just need to adopt it according to your config.

You might look for a simple example in the examples directory of the repo, so you don't have to make any changes or less changes.

On 4/21/20 2:24 AM, Niranjan Madhavan wrote:

@sarsanaee https://github.com/sarsanaee I tried moongen-simple script only. The same command that I had mentioned earlier. ./moongen-simple start load-latency:0:1:rate:10Mp/s --dpdk-config=libmoon/dpdk-conf.lua

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/emmericp/MoonGen/issues/273#issuecomment-616729746, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3ZZPJSK7VMAHMQFJPTCB3RNSHMTANCNFSM4MLK5FAA.

immadhavv commented 4 years ago

Thanks for the pointers @sarsanaee I tried setting the number of queues to 3 like you said. --vdev","net_virtio_user1,path=/var/run/openvswitch/vhost-user1,queues=3" I had already set the disableoffloads option to true manually in device.lua file. And when I tried running it, I ended up with the same state as above. [INFO] 2 devices are up. when I force close, PANIC in rte_eal_remote_launch(): cannot read on configuration pipe

And tbh, I did try reading the moongen-simple script. It redirects to init.lua and that's where I found that device information is getting collected from 'devmgr.lua 's configure function', so I changed the value there. I'm sure the script is right, but I couldn't really find any reason as to why it says that I requested for 3 queues. There is no default value set to 3 also. The default value is infact 1. I just don't understand why it would say that "I requested for 3 queues" , when I actually didn't.

When I created these virtual ports in the host VM, I didn't set it up for multiqueue support. I actually don't know how to.. in the case of dpdkvhostuser and containers. I just followed this github script to set up the system. https://github.com/intel/SDN-NFV-Hands-on-Samples/tree/master/DPDK_in_Containers_Hands-on_Lab/dpdk-container-lab If someone could tell me what commands should be followed to set up multiqueue support for this case, I'd be really grateful.

sarsanaee commented 4 years ago

There is a line in every moongen lua script that requests number of queues and that's hard coded in there.

emmericp commented 4 years ago

Virtual devices aren't the best match because we heavily rely on hardware features and multiple queues.

You can increase the number of queues on virtio, but you'll get a much better experience with real hardware than with virtual NICs...

immadhavv commented 4 years ago

@sarsanaee @emmericp @NetronomeMoongen I reinstalled MoonGen with the dpdk-19.05 branch and it installed perfectly well in the docker. And the only things i manually hardcoded was setting disable_offloads option to true in device.lua. @sarsanaee Then, I increased the queues on the dpdk-config.lua file to 3. (with the remaining setup same as above).

DPDKConfig { -- configure the CPU cores to use, default: all cores cores={0,3,4,8,9,10,11,12,13,14,15}, pciWhitelist = {"0000:00:09.0"}, cli = { -- "-l","0,3,4", "--master-lcore","0", "-n","1", "--file-prefix", "moongen", "--socket-mem", "512", "--no-pci", "--vdev","net_virtio_user2,mac=00:00:00:00:00:02,path=/var/run/openvswitch/vhost-user2,queues=3", "--vdev","net_virtio_user3,mac=00:00:00:00:00:03,path=/var/run/openvswitch/vhost-user3,queues=3", "--proc-type","primary", "--log-level","8" } }

outut:

root@857acf6e199c:/home/MoonGen# ./moongen-simple start load-latency:0:1:rate=10Mp/s --dpdk-config=libmoon/dpdk-conf.lua [INFO] Initializing DPDK. This will take a few seconds... EAL: Detected 16 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/moongen/mp_socket EAL: Probing VFIO support... update_memory_region(): Too many memory regions update_memory_region(): Too many memory regions [INFO] Found 2 usable devices: Device 0: 00:00:00:00:00:02 (unknown NIC (PCI ID 3030:303a)) Device 1: 00:00:00:00:00:03 (unknown NIC (PCI ID 7fa4:0)) [INFO] Flow load-latency => 0x1 virtio_dev_promiscuous_disable(): Failed to disable promisc virtio_dev_allmulticast_disable(): Failed to disable allmulticast virtio_dev_promiscuous_enable(): Failed to enable promisc virtio_dev_promiscuous_disable(): Failed to disable promisc virtio_dev_allmulticast_disable(): Failed to disable allmulticast virtio_dev_promiscuous_enable(): Failed to enable promisc [INFO] Waiting for devices to come up... [INFO] Device 1 (00:00:00:00:00:03) is up: full-duplex 10000 MBit/s [INFO] Device 0 (00:00:00:00:00:02) is up: full-duplex 10000 MBit/s [INFO] 2 devices are up. [WARN] l2 filter error: Operation not supported [WARN] l2 filter error: Operation not supported [FATAL] Lua error in task __INTERFACE_LOAD /home/MoonGen/build/../libmoon/lua/proto/arp.lua:624: ARP task is not running Stack Traceback

(2) Lua field 'lookup' at file '/home/MoonGen/build/../libmoon/lua/proto/arp.lua:624' Local variables: ip = number: 1.67838e+08 waitForArpTask = number: 10 (3) Lua field 'blockingLookup' at file '/home/MoonGen/build/../libmoon/lua/proto/arp.lua:645' Local variables: ip = string: "10.1.0.10" timeout = number: 5 timeout = number: 97771.9 (4) Lua field 'getValue' at file './interface/dependencies/arp.lua:45' Local variables: _ = table: 0x412992b8 {restore:table: 0x412992e0, results:table: 0x41299340, isDynamic:true, packet:table: 0x41298ee0 (more...)} tbl = table: 0x4129f880 {1:arp, 2:10.1.0.10, 4:5} (5) Lua method 'prepare' at file './interface/flow/packet.lua:89' Local variables: self = table: 0x41298ee0 {hasPayload:true, fillTbl:table: 0x412a3da8, getPacket:function: 0x408c7c30 (more...)} error = table: 0x412991f8 {defaultLevel:-1, valid:true} flow = table: 0x412992b8 {restore:table: 0x412992e0, results:table: 0x41299340, isDynamic:true, packet:table: 0x41298ee0 (more...)} final = boolean: true (for generator) = C function: next (for state) = table: 0x412a3dd0 {ethSrc:table: 0x412a0240, ethDst:table: 0x412a0208} (for control) = number: nan i = string: "ethDst" v = table: 0x412a0208 {dep:table: 0x41a2f0e0, tbl:table: 0x4129f880} (temporary) = table: 0x412a3da8 {ip4Src:167772170, ethSrc:2199023255552, pktLength:60, ethDst:true, udpDst:319 (more...)} (6) Lua method 'prepare' at file './interface/flow/instance.lua:15' Local variables: self = table: 0x412992b8 {restore:table: 0x412992e0, results:table: 0x41299340, isDynamic:true, packet:table: 0x41298ee0 (more...)} error = table: 0x412991f8 {defaultLevel:-1, valid:true} final = boolean: true (7) Lua field 'restore' at file './interface/flow/init.lua:195' Local variables: name = string: "load-latency" file = string: "flows/examples.lua" cli_options = table: 0x4129b098 {rate:10Mp/s} overwrites = string: "" properties = table: 0x4129c948 {rx:table: 0x4129ca38, uid:1, tx:table: 0x4129ca70, tx_dev:0, counter:cdata<struct counter >: 0x7fa40c0fbe40 (more...)} silent = boolean: true final = boolean: true error = table: 0x412991f8 {defaultLevel:-1, valid:true} flow = table: 0x412992b8 {restore:table: 0x412992e0, results:table: 0x41299340, isDynamic:true, packet:table: 0x41298ee0 (more...)} results = table: 0x41299340 {timestamp:true, uid:1, uniquePayload:true, ratePattern:cbr, rate:5120} (8) Lua function 'loadThread' at file './interface/threads/load.lua:42' (best guess) Local variables: flow = table: 0x41297c28 {restore:table: 0x4129b070, results:table: 0x4129b0f8, packet:table: 0x4129b1e8 (more...)} sendQueue = table: 0x4129cb48 {delay:100, ring:cdata<struct rte_ring >: 0x012155f740, queue:table: 0x4129ccf8 (more...)} (9) global C function 'xpcall' (10) Lua upvalue 'slave' at file '/home/MoonGen/build/../libmoon/lua/main.lua:128' Local variables: args = table: 0x4129b680 {1:6, 2:__INTERFACE_LOAD, 3:table: 0x41297c28, 4:table: 0x4129cb48} ok = boolean: true taskId = number: 6 func = string: "__INTERFACE_LOAD" (temporary) = table: 0x41298d08 {} (temporary) = C function: select (temporary) = number: 2 (11) Lua function 'main' at file '/home/MoonGen/build/../libmoon/lua/main.lua:148' (best guess) Local variables: task = string: "slave" /home/MoonGen/build/../libmoon/lua/proto/arp.lua:624: ARP task is not running [FATAL] Lua error in task __INTERFACE_COUNT /home/MoonGen/build/../libmoon/lua/proto/arp.lua:624: ARP task is not running Stack Traceback

(2) Lua field 'lookup' at file '/home/MoonGen/build/../libmoon/lua/proto/arp.lua:624' Local variables: ip = number: 1.67838e+08 waitForArpTask = number: 10 (3) Lua field 'blockingLookup' at file '/home/MoonGen/build/../libmoon/lua/proto/arp.lua:645' Local variables: ip = string: "10.1.0.10" timeout = number: 5 timeout = number: 97772 (4) Lua field 'getValue' at file './interface/dependencies/arp.lua:45' Local variables: _ = table: 0x40271358 {restore:table: 0x40271380, results:table: 0x402713e0, isDynamic:true, packet:table: 0x40270f78 (more...)} tbl = table: 0x40278050 {1:arp, 2:10.1.0.10, 4:5} (5) Lua method 'prepare' at file './interface/flow/packet.lua:89' Local variables: self = table: 0x40270f78 {hasPayload:true, fillTbl:table: 0x4027c4b0, getPacket:function: 0x40859828 (more...)} error = table: 0x40271298 {defaultLevel:-1, valid:true} flow = table: 0x40271358 {restore:table: 0x40271380, results:table: 0x402713e0, isDynamic:true, packet:table: 0x40270f78 (more...)} final = boolean: true (for generator) = C function: next (for state) = table: 0x4027c4d8 {ethSrc:table: 0x40278948, ethDst:table: 0x40278910} (for control) = number: nan i = string: "ethDst" v = table: 0x40278910 {dep:table: 0x42025190, tbl:table: 0x40278050} (temporary) = table: 0x4027c4b0 {ip4Src:167772170, ethSrc:2199023255552, pktLength:60, ethDst:true, udpDst:319 (more...)} (6) Lua method 'prepare' at file './interface/flow/instance.lua:15' Local variables: self = table: 0x40271358 {restore:table: 0x40271380, results:table: 0x402713e0, isDynamic:true, packet:table: 0x40270f78 (more...)} error = table: 0x40271298 {defaultLevel:-1, valid:true} final = boolean: true (7) Lua field 'restore' at file './interface/flow/init.lua:195' Local variables: name = string: "load-latency" file = string: "flows/examples.lua" cli_options = table: 0x40273068 {rate:10Mp/s} overwrites = string: "" properties = table: 0x40273cd8 {rx_dev:1, rx:table: 0x40273dc8, uid:1, tx:table: 0x40273e00, counter:cdata<struct counter >: 0x7fa40c0fbe40 (more...)} silent = boolean: true final = boolean: true error = table: 0x40271298 {defaultLevel:-1, valid:true} flow = table: 0x40271358 {restore:table: 0x40271380, results:table: 0x402713e0, isDynamic:true, packet:table: 0x40270f78 (more...)} results = table: 0x402713e0 {timestamp:true, uid:1, uniquePayload:true, ratePattern:cbr, rate:5120} (8) Lua function 'countThread' at file './interface/threads/count.lua:63' (best guess) Local variables: flow = table: 0x40271ae8 {restore:table: 0x40273040, results:table: 0x40273090, packet:table: 0x40273180 (more...)} rxQueue = [RxQueue: id=1, qid=0] {qid:0, dev:[Device: id=1], id:1} delay = number: 7000 (9) global C function 'xpcall' (10) Lua upvalue 'slave' at file '/home/MoonGen/build/../libmoon/lua/main.lua:128' Local variables: args = table: 0x40271a78 {1:4, 2:INTERFACE_COUNT, 3:table: 0x40271ae8, 4:[RxQueue: id=1, qid=0] (more...)} ok = boolean: true taskId = number: 4 func = string: "__INTERFACE_COUNT" (temporary) = table: 0x40270d80 {} (temporary) = C function: select (*temporary) = number: 2 (11) Lua function 'main' at file '/home/MoonGen/build/../libmoon/lua/main.lua:148' (best guess) Local variables: task = string: "slave" /home/MoonGen/build/../libmoon/lua/proto/arp.lua:624: ARP task is not running [FATAL] Lua error in task INTERFACE_TIMESTAMPING /home/MoonGen/build/../libmoon/lua/proto/arp.lua:624: ARP task is not running Stack Traceback

(2) Lua field 'lookup' at file '/home/MoonGen/build/../libmoon/lua/proto/arp.lua:624' Local variables: ip = number: 1.67838e+08 waitForArpTask = number: 10 (3) Lua field 'blockingLookup' at file '/home/MoonGen/build/../libmoon/lua/proto/arp.lua:645' Local variables: ip = string: "10.1.0.10" timeout = number: 5 timeout = number: 97772.1 (4) Lua field 'getValue' at file './interface/dependencies/arp.lua:45' Local variables: _ = table: 0x42096f48 {restore:table: 0x42096f70, results:table: 0x42096fd0, isDynamic:true, packet:table: 0x42096b20 (more...)} tbl = table: 0x4209f840 {1:arp, 2:10.1.0.10, 4:5} (5) Lua method 'prepare' at file './interface/flow/packet.lua:89' Local variables: self = table: 0x42096b20 {hasPayload:true, fillTbl:table: 0x420a3ca0, getPacket:function: 0x4190b0d0 (more...)} error = table: 0x42096e88 {defaultLevel:-1, valid:true} flow = table: 0x42096f48 {restore:table: 0x42096f70, results:table: 0x42096fd0, isDynamic:true, packet:table: 0x42096b20 (more...)} final = boolean: true (for generator) = C function: next (for state) = table: 0x420a3cc8 {ethSrc:table: 0x420a0138, ethDst:table: 0x420a0100} (for control) = number: nan i = string: "ethDst" v = table: 0x420a0100 {dep:table: 0x41070d58, tbl:table: 0x4209f840} (temporary) = table: 0x420a3ca0 {ip4Src:167772170, ethSrc:2199023255552, pktLength:60, ethDst:true, udpDst:319 (more...)} (6) Lua method 'prepare' at file './interface/flow/instance.lua:15' Local variables: self = table: 0x42096f48 {restore:table: 0x42096f70, results:table: 0x42096fd0, isDynamic:true, packet:table: 0x42096b20 (more...)} error = table: 0x42096e88 {defaultLevel:-1, valid:true} final = boolean: true (7) Lua field 'restore' at file './interface/flow/init.lua:195' Local variables: name = string: "load-latency" file = string: "flows/examples.lua" cli_options = table: 0x42098900 {rate:10Mp/s} overwrites = string: "" properties = table: 0x42099b08 {rx_dev:1, rx:table: 0x42099bf8, uid:1, tx:table: 0x42099c30, tx_dev:0, rxQueue:[RxQueue: id=1, qid=2] (more...)} silent = boolean: true final = boolean: true error = table: 0x42096e88 {defaultLevel:-1, valid:true} flow = table: 0x42096f48 {restore:table: 0x42096f70, results:table: 0x42096fd0, isDynamic:true, packet:table: 0x42096b20 (more...)} results = table: 0x42096fd0 {timestamp:true, uid:1, uniquePayload:true, ratePattern:cbr, rate:5120} (8) Lua function 'timestampThread' at file './interface/threads/timestamp.lua:40' (best guess) Local variables: flows = table: 0x41e8e9f8 {1:table: 0x41e8e3b0} directory = string: "." timeStampers = table: 0x42096e38 {} hists = table: 0x42096e60 {} (for generator) = C function: builtin#6 (for state) = table: 0x41e8e9f8 {1:table: 0x41e8e3b0} (for control) = number: 1 i = number: 1 v = table: 0x41e8e3b0 {restore:table: 0x41e8ea38, results:table: 0x40f7a428, packet:table: 0x40f7a2c8 (more...)} (9) global C function 'xpcall' (10) Lua upvalue 'slave' at file '/home/MoonGen/build/../libmoon/lua/main.lua:128' Local variables: args = table: 0x42098db0 {1:7, 2:__INTERFACE_TIMESTAMPING, 3:table: 0x41e8e9f8, 4:.} ok = boolean: true taskId = number: 7 func = string: "__INTERFACE_TIMESTAMPING" (temporary) = table: 0x42096948 {} (temporary) = C function: select (temporary) = number: 2 (11) Lua function 'main' at file '/home/MoonGen/build/../libmoon/lua/main.lua:148' (best guess) Local variables: task = string: "slave" /home/MoonGen/build/../libmoon/lua/proto/arp.lua:624: ARP task is not running [Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=1] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=1] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=1] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=1] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=1] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=1] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)

This is what I got as output. I didn't recieve any packets on testpmd side.. @emmericp Can you please help me out with this? I somehow want to send attack traffic to the testpmd application present on the others side inside another docker..

I tried something similar with netronome-packetgen @NetronomeMoongen too (with queues=1) and it compiled properly..but the statistics were always zero.

emmericp commented 4 years ago

the virtual NIC doesn't support hardware filters which the moongen-simple ARP relies on. there's a way to put arp packets manually into the ARP task, example: https://github.com/libmoon/libmoon/blob/master/examples/dump-pkts.lua#L97

maybe it's easier to not do ARP and hardcode the addresses in your case?

anyways, virtual NICs are a bad match for moongen, we rely on many hardware features that are available on all server-grade NICs such as this hardware filter for ether types

edit: statistics are another thing that might not work properly with virtual nics by default, the dump-pkts example linked above also has an example for using manual statistics counters. hardware counters are much more reliable and hence used by default

sarsanaee commented 4 years ago

I agree, I usually have both ARP and Timestamping off!

immadhavv commented 4 years ago

@emmericp @sarsanaee Thanks for getting back so soon with such good pointers. I tried going through the related files and I'm not really sure how to turn off ARP and timestamping protocols off. Please forgive my ignorance. I'm a complete beginner to all these.

Can someone guide me through the process please? How to turn off these protocols, what address to hardcode and how? It doesn't need to be moongen-simple. Could be anything..at the moment. Although, I want to be able to send traffic patterns of my choice for which if someone could give me pointers too,it'd be really nice.

sarsanaee commented 4 years ago

Hey,

Do you know what ARP does? Figure that out first, and you will find what you should do. But short answer, just hard code your dest's MAC address in the code. For stats or timestamping just don't start the relevant slave!

Also, check out the examples directory, there are multiple examples that I'm sure one of them would be suited for your purpose. You'll need to adjust those a little bit for your use. I'd say it is challenging to use moongen-simple out-of-the-box, I'd suggest you check out examples directory and Lua scripts there.

Thanks, Alireza

immadhavv commented 4 years ago

@sarsanaee @emmericp @NetronomeMoongen Thanks for the pointers. Like @sarsanaee said, I hardcoded the destination virtual port's MAC address and source virtual port's MAC address too in libmoon/lua/protocol/arp.lua like

args[hwSrc] = "00:00:00:00:00:02" args[hwDst] = "00:00:00:00:00:03"

and then commented out the calls to timestampThread in libmoon/init.lua like

--timestampThread.prepare(flows, devices) --timestampThread.start(devices, args.output)

And it gave the same output, as before with respect to ARP although the errors related to timestamping were gone. And then kept printing the following.

[Device: id=0] TX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing) [Device: id=1] RX: 0.00 Mpps, 0 Mbit/s (0 Mbit/s with framing)

I also tried similar stuffs with other examples like l2-load-latency,l3-load-latency but they didn't work. I didn't know how to hardcode the MAC address in netronome-packetgen as it was in a different format.

Is there anything I'm doing wrong that you can correct, or something else I need to look up please? Any help would be appreciated.

immadhavv commented 4 years ago

@sarsanaee @emmericp @NetronomeMoongen Can someone please take a look at this and tell me where I'm going wrong please?

sarsanaee commented 4 years ago

You absolutely shouldn't manipulate the internals of MoonGen and LibMoon. Please work with l2-load-latency only. All you need to do is not to spawn the slave processes responsible for tasks such as ARP or Timestamping.