1# F-Stack Quick Start Guide 2 3 F-Stack is an open source high performance network framework based on DPDK. 4 5 6## System Requirements 7 8See Intel DPDK [linux_gsg](http://dpdk.org/doc/guides/linux_gsg/index.html) 9 10## clone F-Stack 11 12 mkdir /data/f-stack 13 git clone https://github.com/F-Stack/f-stack.git /data/f-stack 14 15## Compile DPDK 16 17Read DPDK Quick Started Guide or run the command below 18 19 cd /data/f-stack/dpdk/tools 20 ./dpdk-setup.sh 21 22Compile with x86_64-native-linuxapp-gcc 23 24## Set hugepage 25 26For a single-node system, the command to use is as follows (assuming that 1024 pages are required): 27 28 echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages 29 30On a NUMA machine, pages should be allocated explicitly on separate nodes: 31 32 echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages 33 echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages 34 35Once the hugepage memory is reserved, to make the memory available for DPDK use, perform the following steps: 36 37 mkdir /mnt/huge 38 mount -t hugetlbfs nodev /mnt/huge 39 40The mount point can be made permanent across reboots, by adding the following line to the `/etc/fstab` file: 41 42 nodev /mnt/huge hugetlbfs defaults 0 0 43 44## offload NIC 45 46 modprobe uio 47 insmod /data/f-stack/dpdk/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko 48 insmod /data/f-stack/dpdk/x86_64-native-linuxapp-gcc/kmod/rte_kni.ko 49 python dpdk-devbind.py --status 50 ifconfig eth0 down 51 python dpdk-devbind.py --bind=igb_uio eth0 # assuming that use 10GE NIC and eth0 52 53## Compile lib 54 55 export FF_PATH=/data/f-stack 56 export FF_DPDK=/data/f-stack/dpdk/x86_64-native-linuxapp-gcc 57 cd ../../ 58 cd lib 59 make 60 61### Compile Nginx 62 63 cd ../ 64 cd app/nginx-1.11.10 65 ./configure --prefix=/usr/local/nginx_fstack --with-ff_module 66 make 67 make install 68 cd ../../ 69 /usr/local/nginx_fstack/sbin/nginx 70 71### Compile Redis 72 73 cd app/redis-3.2.8/ 74 make 75 # run with start.sh 76 ./start.sh -b ./redis-server -o /path/to/redis.conf 77 # or run like this: 78 #./redis-server --conf config.ini --proc-type=primary --proc-id=0 /path/to/redis.conf 79 80