Skip to content

Running NFF GO in the cloud

Ilia Filippov edited this page Apr 4, 2019 · 1 revision

NFF-GO was checked to be run on AWS and Azure. Running on GCP is in project.

Table of Contents

How to run NFF-Go on AWS

Preparation.

Run needed AWS EC2 instance, connect to it and attach needed interfaces (they will be under DPDK driver).

Step 1. Install all needed system packages

# run as root
sudo -s \n`
yum -y install kernel-devel-`uname -r`
yum -y install golang
yum -y install git
yum -y install numactl-devel
yum -y install kernel-devel
yum -y install kernel
yum -y install patch
yum -y install libpcap-devel

Step 2. Go to golang project folder

# create if needed
mkdir -p projects/src/github.com/intel-go/
cd projects/src/github.com/intel-go/

Step 3. Export needed environment variables

# export path to your project folder
export GOPATH=/home/ec2-user/projects
export PATH=/home/ec2-user/projects/bin/:$PATH

Step 4. Clone and builf nff-go

git clone https://github.com/intel-go/nff-go.git
cd nff-go
scripts/get-depends.sh
make -j30

NOTE! if dpdk version is less than 18.05.1 apply patch https://patches.dpdk.org/patch/41585/ and rebuild dpdk. If NFF-GO version is less than 0.4.2, apply commit 1a6d3833f1e1438b02a3736d25b9d73082004fb2 and rebuild nff

Step 5. Mount hugepages

mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
mount -t hugetlbfs nodev /mnt/huge -o pagesize=2M

Step 6. Bind ports

# run ifconfig, find interface names and make them down
# if device you want to use under dpdk is acvite, run (instead of eth1 and eht2 your device names)
ifconfig eth1 down
ifconfig eth2 down
modprobe uio
insmod dpdk/dpdk-18.02/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
# run cmd below and find port numbers, then bind to dpdk driver
python dpdk/dpdk-18.02/usertools/dpdk-devbind.py –status
# change 0000:05:00.0  and 0000:06:00.0 to your port numbers
./dpdk/dpdk-18.02/usertools/dpdk-devbind.py --bind=igb_uio 0000:05:00.0  0000:06:00.0 

#run
python dpdk/dpdk-18.02/usertools/dpdk-devbind.py --status

Output should have some ports under “Network devices using DPDK-compatible driver” line

Network devices using DPDK-compatible driver
============================================
0000:05:00.0 'Device ec20' drv=igb_uio unused=ena
0000:06:00.0 'Device ec20' drv=igb_uio unused=ena
Network devices using kernel driver
===================================
0000:04:00.0 'Device ec20' if=eth0 drv=ena unused=igb_uio *Active*

How to run NFF-Go on Azure

TODO