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.05k stars 235 forks source link

Replay pcap using crc-based rate control #327

Open goomadao opened 2 years ago

goomadao commented 2 years ago

I'd like to replay pcap files with crc-based rate control method to get better precision, using queue:sendWithDelay(bufs) instead of rateLimiter:sendN(bufs, n) in replay-pcap.lua. But there were two problems that I couldn't figure out.

  1. When sending and receiving pcap packets with Intel I350 Gigabit NIC, whether the rx-all option is on or off, packets not in the pcap file can be received. While when sending with Intel X722 10GbE NIC and receiving with Intel 82599ES 10-Gigabit NIC, packets not in the pcap file can be received only if the rx-all option is on, which seems normal and resonable.
  2. The output of MoonGen was weird as follows, the pps & bps became negative sometimes.
    [INFO]  Initializing DPDK. This will take a few seconds...
    EAL: Detected 48 lcore(s)
    EAL: No free hugepages reported in hugepages-1048576kB
    EAL: Probing VFIO support...
    EAL: VFIO support initialized
    EAL: PCI device 0000:1a:00.0 on NUMA socket 0
    EAL:   probe driver: 8086:37d0 net_i40e
    EAL: PCI device 0000:1a:00.1 on NUMA socket 0
    EAL:   probe driver: 8086:37d0 net_i40e
    EAL: PCI device 0000:1a:00.2 on NUMA socket 0
    EAL:   probe driver: 8086:37d1 net_i40e
    EAL: PCI device 0000:1a:00.3 on NUMA socket 0
    EAL:   probe driver: 8086:37d1 net_i40e
    EAL: PCI device 0000:3b:00.0 on NUMA socket 0
    EAL:   probe driver: 8086:10fb net_ixgbe
    EAL: PCI device 0000:3b:00.1 on NUMA socket 0
    EAL:   probe driver: 8086:10fb net_ixgbe
    EAL: PCI device 0000:3d:00.0 on NUMA socket 0
    EAL:   probe driver: 8086:1521 net_e1000_igb
    EAL: PCI device 0000:3d:00.1 on NUMA socket 0
    EAL:   probe driver: 8086:1521 net_e1000_igb
    [INFO]  Found 2 usable devices:
    Device 0: 48:DC:2D:10:41:F1 (Intel Corporation Ethernet Connection X722 for 10GbE SFP+)
    Device 1: B8:E3:B1:55:85:11 (Intel Corporation I350 Gigabit Network Connection)
    [INFO]  Waiting for devices to come up...
    [INFO]  Device 1 (B8:E3:B1:55:85:11) is up: 1000 MBit/s
    [INFO]  1 device is up.
    [Device: id=1] TX: 0.00 Mpps, 37 Mbit/s (38 Mbit/s with framing)
    [Device: id=1] TX: 0.00 Mpps, 61 Mbit/s (62 Mbit/s with framing)
    [Device: id=1] TX: -0.00 Mpps, -44 Mbit/s (-44 Mbit/s with framing)
    [Device: id=1] TX: 0.00 Mpps, 61 Mbit/s (62 Mbit/s with framing)
    [Device: id=1] TX: -0.00 Mpps, -43 Mbit/s (-44 Mbit/s with framing)
    [Device: id=1] TX: 0.00 Mpps, 59 Mbit/s (60 Mbit/s with framing)
    [Device: id=1] TX: -0.00 Mpps, -43 Mbit/s (-44 Mbit/s with framing)
    [Device: id=1] TX: 0.00 Mpps, 59 Mbit/s (60 Mbit/s with framing)
    [Device: id=1] TX: -0.00 Mpps, -43 Mbit/s (-43 Mbit/s with framing)

Do you have any idea of those? Thanks in advance for your fantastic software.