Simple packet-gen is a native app for sending raw ethernet packets on a PCI network device using DPDK. It comes with four included packet generator modes, and can be easily extended to support more.
- A DPDK supported NIC (tested with Intel E810-C, Intel X540-AT2, Mellanox CX4)
- A Linux operating system (tested with Ubuntu 18.04)
- Sudo permissions
- Meson and ninja tools for building DPDK (both require Python 3.6 or later)
sudo apt-get install meson ninja-build
- libpcap for supporing PCAP files
sudo apt-get install libpcap-dev
# Downloads and builds DPDK 19.11 in ./dpdk/
# Needs sudo permissions (DPDK is installed localy, not system-wide)
./build.sh
# Build with performance optimizations
make
# Optional: build for debug, without performance optimizations
make debugBind NIC ports to DPDK driver:
./bind.shUse run.sh to start the application. Usage examples:
# Show command line arguments and help
./run.sh --help
# Start client with 8 TX qeueus, 4 RX queues,
# send on PCI 0000:01:00.0, receive on PCI 0000:02:00.0
./run.sh --tx 0 --rx 1 --eal "-w 0000:01:00.0 -w 0000:02:00.0" --txq 8 --rxq 4
# Same as before, use "superspreader" mode with 700 users, start from 5-tuple
# [TCP, src-ip: 10.0.0.1, dst-ip: 20.0.0.1, src-port: 30, dst-port: 500]
./run.sh --tx 0 --rx 1 --eal "-w 0000:01:00.0 -w 0000:02:00.0" --txq 8 --rxq 4 --p-superspreader --5tuple "6,10.0.0.1,20.0.0.1,30,500" --n1 700
# Same as before, read PCAP file from "./trace.pcap"
./run.sh --tx 0 --rx 1 --eal "-w 0000:01:00.0 -w 0000:02:00.0" --txq 8 --rxq 4 --p-pcap --file "./trace.pcap"To start GDB, use run.sh with GDB as the first argument.
Bug fixes and new generator modes are welcome. To create a new packet generator function, follow the steps in here. See existing generator functions in here.
If you happen to use this tool for an academic paper, please cite Scaling Open vSwitch with a Computational Cache (USENIX, NSDI 2022).
MIT license. See LICENSE.MD for more information.
