Skip to content

tootoonchian/pktgen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traffic Generator

A minimal traffic generator.

Dependencies

Installation

Just run make all. Alternatively, setup DPDK yourself, just make sure to set CONFIG_RTE_BUILD_COMBINE_LIBS=y.

Setting up DPDK

First, setup hugepages per: http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html

Then, you'll need to bind any NICs you want to use to dpdk. You can find them using /path/to/dpdk/tools/dpdk_nic_bind.py --status.

Load the uio kernel module and insert the dpdk igb_uio module with modprobe uio && insmod /path/to/dpdk/target/kmod/igb_uio.ko.

With that all done, bind each of your desired nics to DPDK with /path/to/dpdk/tools/dpdk_nic_bind.py -b igb_uio YOUR_NIC

Usage

Start things up with ./bin/pktgen [EAL options] -- LISTEN_PORT

The only EAL flag you'll really need to tweak is the core mask -c. Set it so there is one more core than the number of ports you plan to use.

To control traffic and see how scripting works, see controller/example.py More detailed documentation coming soon.

Contributing

Install clang-format and run make format before submitting a pull request.

Releases

No releases published

Packages

No packages published

Languages

  • C 93.1%
  • Python 2.7%
  • Protocol Buffer 2.5%
  • Makefile 1.7%