Date created: 09/21/19 16:55:58. Last modified: 03/03/21 12:32:50



Ubuntu 14.04.6 LTS:

# Install pre-reqs and clone MoonGen repo:
sudo apt-get install -y git build-essential cmake linux-headers-`uname -r` pciutils libnuma-dev
git clone
cd MoonGen/

# Build MoonGen, this will fail to bind NICs (after the build is completed) if DPDK was not already installed, due to the igb_uio Kernel module being missing:

# Load the module which should have been built when the MoonGen build script was run
# (it will have installed and compiled libmoon, DPDK and all other dependencies).
# The uio module must be loaded before the igb_uio module can be loaded:
sudo modprobe uio
lsmod | grep uio
modinfo ./libmoon/deps/dpdk/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
sudo insmod ./libmoon/deps/dpdk/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
lsmod | grep uio

# Before disconnecting an i40e based NIC like an Intel X710, disabled LLDP,
# which is enabled in the firmware by default, not the driver, so ethtool can't be used:
sudo bash -c "echo lldp stop > /sys/kernel/debug/i40e/0000:01:00.0/command"
sudo bash -c "echo lldp stop > /sys/kernel/debug/i40e/0000:01:00.1/command"

# Before disconnecting an ixgbe based NIC like Intel 82599ES, disable flow control,
# which is enabled by the ixgbe driver by default, so use ethtool:
sudo ethtool -a eth1
sudo ethtool -A eth1 rx off tx off
sudo ethtool -A eth2 rx off tx off
sudo ethtool -1 eth1

# Disconnect the test interfaces from the Kernel and load them with the UIO driver
sudo lshw -c network | grep driver
sudo ip link set down eth1
sudo ip link set down eth2
# This will bind all down interfaces: sudo ./
# Bind specific ones only:
sudo ./libmoon/deps/dpdk/usertools/ --bind=igb_uio 0000:01:00.0
sudo ./libmoon/deps/dpdk/usertools/ --bind=igb_uio 0000:01:00.1
sudo ./libmoon/deps/dpdk/usertools/ --status

# Setup huge pages