@@ -38,44 +38,59 @@ Currently, besides authorized DNS server of DNSPod, there are various products i
3838    yum install numactl-devel          # on Centos 
3939    #sudo apt-get install libnuma-dev  # on Ubuntu 
4040
41+     # Install dependencies (FreeBSD only) 
42+     #pkg install meson pkgconf py38-pyelftools 
43+ 
4144    cd f-stack 
4245    # Compile DPDK 
4346    cd dpdk/ 
4447    meson -Denable_kmods=true build 
4548    ninja -C build 
4649    ninja -C build install 
4750
48-     # Set hugepage 
51+     # Set hugepage (Linux only)  
4952    # single-node system 
5053    echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages 
5154
52-     # or NUMA 
55+     # or NUMA (Linux only)  
5356    echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages 
5457    echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages 
5558
56-     # Using Hugepage with the DPDK 
59+     # Using Hugepage with the DPDK (Linux only)  
5760    mkdir /mnt/huge 
5861    mount -t hugetlbfs nodev /mnt/huge 
5962
60-     # Close ASLR; it is necessary in multiple process 
63+     # Close ASLR; it is necessary in multiple process (Linux only)  
6164    echo 0 > /proc/sys/kernel/randomize_va_space 
6265
6366    # Install python for running DPDK python scripts 
6467    sudo apt install python # On ubuntu 
68+     #sudo pkg install python # On FreeBSD 
6569
6670    # Offload NIC 
71+     # For Linux: 
6772    modprobe uio 
6873    insmod /data/f-stack/dpdk/build/kernel/linux/igb_uio/igb_uio.ko 
6974    insmod /data/f-stack/dpdk/build/kernel/linux/kni/rte_kni.ko carrier=on # carrier=on is necessary, otherwise need to be up `veth0` via `echo 1 > /sys/class/net/veth0/carrier` 
7075    python dpdk-devbind.py --status 
7176    ifconfig eth0 down 
7277    python dpdk-devbind.py --bind=igb_uio eth0 # assuming that use 10GE NIC and eth0 
7378
79+     # For FreeBSD: 
80+     # Refer DPDK FreeBSD guide to set tunables in /boot/loader.conf 
81+     # Below is an example used for our testing machine 
82+     #echo "hw.nic_uio.bdfs=\"2:0:0\"" >> /boot/loader.conf 
83+     #echo "hw.contigmem.num_buffers=1" >> /boot/loader.conf 
84+     #echo "hw.contigmem.buffer_size=1073741824" >> /boot/loader.conf 
85+     #kldload contigmem 
86+     #kldload nic_uio 
87+ 
7488    # On Ubuntu, use gawk instead of the default mawk. 
7589    #sudo apt-get install gawk  # or execute `sudo update-alternatives --config awk` to choose gawk. 
7690
7791    # Install dependencies for F-Stack 
78-     sudo apt install gcc make libssl-dev # On ubuntu 
92+     sudo apt install gcc make libssl-dev                            # On ubuntu 
93+     #sudo pkg install gcc gmake openssl pkgconf libepoll-shim       # On FreeBSD 
7994
8095    # Upgrade pkg-config while version < 0.28 
8196    #cd /data 
@@ -92,14 +107,16 @@ Currently, besides authorized DNS server of DNSPod, there are various products i
92107    export FF_PATH=/data/f-stack 
93108    export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig 
94109    cd /data/f-stack/lib/ 
95-     make 
110+     make    # On Linux 
111+     #gmake   # On FreeBSD 
96112
97113    # Install F-STACK 
98114    # libfstack.a will be installed to /usr/local/lib 
99115    # ff_*.h will be installed to /usr/local/include 
100116    # start.sh will be installed to /usr/local/bin/ff_start 
101117    # config.ini will be installed to /etc/f-stack.conf 
102-     make install 
118+     make install    # On Linux 
119+     #gmake install   # On FreeBSD 
103120
104121#### Nginx  
105122
0 commit comments