Coder Social home page Coder Social logo

f-stack / f-stack Goto Github PK

View Code? Open in Web Editor NEW
3.7K 275.0 873.0 113.91 MB

F-Stack is an user space network development kit with high performance based on DPDK, FreeBSD TCP/IP stack and coroutine API.

Home Page: http://www.f-stack.org

License: Other

Makefile 0.21% Assembly 3.78% C++ 0.20% C 91.97% Perl 0.10% HTML 0.17% Roff 0.58% XS 0.01% Objective-C 0.04% Shell 1.76% M4 0.26% XSLT 0.01% CSS 0.01% Batchfile 0.01% Lua 0.04% Ruby 0.02% Tcl 0.48% Smarty 0.01% Python 0.29% Awk 0.06%

f-stack's Introduction

Build Status

F-Stack

Introduction

With the rapid development of Network Interface Cards the poor performance of data packet processing with the Linux kernel has become the bottleneck in modern network systems. Yet, the increasing demands of the Internet's growth demand a higher performant network processing solution. Kernel bypass has emerged to catch more and more attention. There are various similar technologies such as: DPDK, NETMAP and PF_RING. The main idea of kernel bypass is that Linux is only used to deal with control flow; all data streams are processed in user space. Therefore, kernel bypass can avoid performance bottlenecks caused by kernel packet copying, thread scheduling, system calls, and interrupts. Furthermore, kernel bypass can achieve higher performance with multi-optimizing methods. Within various techniques, DPDK has been widely used because of it's more thorough isolation from kernel scheduling and active community support.

F-Stack is an open source high performant network framework based on DPDK with the following characteristics:

  1. Ultra high network performance which the network card can achieve under full load: 10 million concurrent connections, 5 million RPS, 1 million CPS.
  2. Transplant FreeBSD 11.01 user space stack, which provides a complete stack function, and cut a great amount of irrelevant features. This greatly enhances network performance.
  3. Support Nginx, Redis, and other mature applications. Services can easily use F-Stack.
  4. Easy to extend with multi-process architecture.
  5. Provides micro thread interface. Various applications with stateful applications can easily use F-Stack to get high performance without processing complex asynchronous logic.
  6. Provide an Epoll/Kqueue interface that allow many kinds of applications to easily use F-Stack.

History

To deal with the increasingly severe DDoS attacks the authorized DNS server of Tencent Cloud DNSPod switched from Gigabit Ethernet to 10-Gigabit at the end of 2012. We faced several options: one is to continue to use the original network stack in the Linux kernel, another is to use kernel bypass techniques. After several rounds of investigation; we finally chose to develop our next generation of DNS server based on DPDK. The reason is DPDK provides ultra-high performance and can be seamlessly extended to 40G, or even 100G NIC, in the future.

After several months of development and testing, DKDNS, high-performance DNS server based on DPDK officially released in October 2013. It's capable of achieving up to 11 million QPS with a single 10GE port and 18.2 million QPS with two 10GE ports. And then we developed a user-space TCP/IP stack called F-Stack that can process 0.6 million RPS with a single 10GE port.

With the fast growth of Tencent Cloud more and more of our services needed higher network access performance. Meanwhile, F-Stack was continuing to improve, being driven by our business growth, and, ultimately developed into a general network access framework. But our initial TCP/IP stack couldn't meet the needs of these services. Continuing to develop and maintain a complete high performance network stack would have been too expensive. After evaluating several plans; we finally determined to port FreeBSD's (13.0 stable) TCP/IP stack into F-Stack. Not only does this allow us to stop reinventing the wheel, we can take advantage of the the improvements the FreeBSD community will bring in the future. Thanks to libplebnet and libuinet this work became a lot easier.

With the rapid development of all kinds of applications, in order to help different APPs quick and easily use F-Stack, F-Stack has integrated Nginx, Redis and other commonly used APPs, and a micro thread framework, and provides a standard Epoll/Kqueue interface.

Currently, besides authorized DNS server of DNSPod, there are various products in Tencent Cloud has used the F-Stack, such as HttpDNS (D+), COS access module, CDN access module, etc..

Quick Start

# clone F-Stack
mkdir -p /data/f-stack
git clone https://github.com/F-Stack/f-stack.git /data/f-stack

# Install libnuma-dev
yum install numactl-devel          # on Centos
#sudo apt-get install libnuma-dev  # on Ubuntu

pip3 install pyelftools --upgrade
# Install python and modules for running DPDK python scripts
pip3 install pyelftools --upgrade # RedHat/Centos
sudo apt install python # On ubuntu
#sudo pkg install python # On FreeBSD

# Install dependencies (FreeBSD only)
#pkg install meson pkgconf py38-pyelftools

cd f-stack
# Compile DPDK
cd dpdk/
# re-enable kni now, to remove kni later
meson -Denable_kmods=true -Ddisable_libs=flow_classify build
ninja -C build
ninja -C build install

# Set hugepage (Linux only)
# single-node system
echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

# or NUMA (Linux only)
echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages

# Using Hugepage with the DPDK (Linux only)
mkdir /mnt/huge
mount -t hugetlbfs nodev /mnt/huge

# Close ASLR; it is necessary in multiple process (Linux only)
echo 0 > /proc/sys/kernel/randomize_va_space

# Offload NIC
# For Linux:
modprobe uio
insmod /data/f-stack/dpdk/build/kernel/linux/igb_uio/igb_uio.ko
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`
python dpdk-devbind.py --status
ifconfig eth0 down
python dpdk-devbind.py --bind=igb_uio eth0 # assuming that use 10GE NIC and eth0

# For FreeBSD:
# Refer DPDK FreeBSD guide to set tunables in /boot/loader.conf
# Below is an example used for our testing machine
#echo "hw.nic_uio.bdfs=\"2:0:0\"" >> /boot/loader.conf
#echo "hw.contigmem.num_buffers=1" >> /boot/loader.conf
#echo "hw.contigmem.buffer_size=1073741824" >> /boot/loader.conf
#kldload contigmem
#kldload nic_uio

# On Ubuntu, use gawk instead of the default mawk.
#sudo apt-get install gawk  # or execute `sudo update-alternatives --config awk` to choose gawk.

# Install dependencies for F-Stack
sudo apt install gcc make libssl-dev                            # On ubuntu
#sudo pkg install gcc gmake openssl pkgconf libepoll-shim       # On FreeBSD

# Upgrade pkg-config while version < 0.28
#cd /data
#wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
#tar xzvf pkg-config-0.29.2.tar.gz
#cd pkg-config-0.29.2
#./configure --with-internal-glib
#make
#make install
#mv /usr/bin/pkg-config /usr/bin/pkg-config.bak
#ln -s /usr/local/bin/pkg-config /usr/bin/pkg-config

# Compile F-Stack
export FF_PATH=/data/f-stack
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig
cd /data/f-stack/lib/
make    # On Linux
#gmake   # On FreeBSD

# Install F-STACK
# libfstack.a will be installed to /usr/local/lib
# ff_*.h will be installed to /usr/local/include
# start.sh will be installed to /usr/local/bin/ff_start
# config.ini will be installed to /etc/f-stack.conf
make install    # On Linux
#gmake install   # On FreeBSD

Nginx

cd app/nginx-1.25.2
bash ./configure --prefix=/usr/local/nginx_fstack --with-ff_module
make
make install
cd ../..
/usr/local/nginx_fstack/sbin/nginx

for more details, see nginx guide.

Redis

cd app/redis-6.2.6/deps/jemalloc
./autogen.sh 
cd ../..
make
make install

 If KNI is enabled in the configuration file, you should create a virtual NIC after F-Stack started, and set the ipaddr, netmask, mac addr, route table, etc. These addrs must be same with F-Stack.

If you don't have another management port, you should execute a script like this.

/usr/local/nginx_fstack/sbin/nginx
sleep 10
ifconfig veth0 <ipaddr>  netmask <netmask>  broadcast <broadcast> hw ether <mac addr>
route add -net 0.0.0.0 gw <gateway> dev veth0
echo 1 > /sys/class/net/veth0/carrier # if `carrier=on` not set while `insmod rte_kni.ko` 
# route add -net ...  # other route rules

Nginx Testing Result

Test environment

NIC:Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+
CPU:Intel(R) Xeon(R) CPU E5-2670 v3 @ 2.30GHz(NUMA)
Memory:128G
OS:CentOS Linux release 7.2 (Final)
Kernel:3.10.104-1-tlinux2-0041.tl2

Nginx uses linux kernel's default config, all soft interrupts are working in the first CPU core.

Nginx si means modify the smp_affinity of every IRQ, so that the decision to service an interrupt with a particular CPU is made at the hardware level, with no intervention from the kernel.

Nginx Reuseport means enable "reuseport" in nginx.conf.

Nginx_FStack's 600 cache bytes' body was returned directly in nginx.conf.

All of these test cases use CPUs' physical cores.

CPS (Connection:close, Small data packet) test result

CPS_Reuseport (Connection:close, Small data packet) test result, This test case runs in a different test environment

RPS (Connection:Keep-Alive, Small data packet) test data

Bandwidth (Connection:Keep-Alive, 3.7k bytes data packet) test data

Licenses

See LICENSE

Join us

Tencent Cloud F-Stack team developed F-Stack which is a general network framework based on DPDK and provides ultra high network performance. We are here looking for more and more talented people with great passion on technology to join us. You would have the chance to work with brightest minds on this planet and help Tencent cloud and F-stack continuously evolve. Send us your resume or refer your friend to us if you are interested in joining us.

Open Positions: Software engineer(C/C++), Web developer, IOS/Android developer, Product Manager, Operating Manager, etc. Contact: Please send your resume to us

f-stack's People

Contributors

adamyyan avatar agerguo avatar bjosv avatar dgbo avatar dragonorloong avatar fidaullahnoonari-emumba avatar firesidefox avatar guhaoyu2005 avatar hawkxiang avatar jbwyatt4 avatar jfb8856606 avatar jinhao2 avatar orange30 avatar ppliu1979 avatar renzibei avatar rolfliu avatar shivansh avatar soroshsabz avatar tanjianfeng avatar teacup-on-rockingchair avatar vanlink avatar wenchengji159357 avatar whl739 avatar xklllll avatar xpu22 avatar yumm007 avatar yuyang0 avatar zengyi1001 avatar zhaozihanzzh avatar zjwsoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

f-stack's Issues

Can f-stack network stack run as 1 process on multiple cores with multiple threads?

Hi,

Based on start.sh demo, it looks like the f-stack starts a single process on 1 core.
My understanding is that f-stack can use multiple-process.
It is ok for every process is running on a specific core and 1 thread to deal with the send/recv.

I tried to run f-stack as 1 process on multiple cores with multiple threads. For example, I could give the parameters with multiple cores by set -c options like:
sudo ./demo ./config.ini -c 0x3 --proc-type=primary --num-procs=1 --proc-id=0

However ,the network stack will fall into segment fault. I used gdb to debug and found that the parameter 'curthread' passed to the network APIs in ff_syscall_wrapper is zero. For example, if -c 0x3 is specified, the slave core would call ff_epoll_create -> ff_kqueue -> (segment fault). It is because of the "curthread" on slave core is zero.

It is appreciated if anybody can give a light on why 'curthread' is zero on the slave cores and where the 'curthread' will be assigned with a valid value in the code.

Thanks,
oceanspark

compile method error

in README.md just like as

Compile F-Stack

cd ../../lib/
make
export FF_PATH=/data/f-stack
export FF_DPDK=/data/f-stack/dpdk/x86_64-native-linuxapp-gcc
I think compile like this:

Compile F-Stack

cd ../../lib/
export FF_PATH=/data/f-stack
export FF_DPDK=/data/f-stack/dpdk/x86_64-native-linuxapp-gcc
make

compile problem porting f-stack to linux kernel

I thought the f-stack was divided into 2 parts.
The first part was freebsd kernel + f-stack compatible layer. This part was compiled inter libfstack.a.
The second part was host part which is used to initialize freebsd kernel and feed packet to freebsd network stack.
Based on the idea above, the makefile is adjust like below:

obj-m += f-stack.o
f-stack-objs := ${HOST_OBJS} libfstack.a
all: libfstack.a
	$(MAKE) -C /lib/modules/`uname -r`/build M=$(PWD) modules

But there are several symbol can not be found:

WARNING: "__start_set_pcpu" [/home/ubuntu/f-stack/lib/f-stack.ko] undefined!
WARNING: "__start_set_sysuninit_set" [/home/ubuntu/f-stack/lib/f-stack.ko] undefined!
WARNING: "__stop_set_sysuninit_set" [/home/ubuntu/f-stack/lib/f-stack.ko] undefined!
WARNING: "__stop_set_pcpu" [/home/ubuntu/f-stack/lib/f-stack.ko] undefined!
WARNING: "_DYNAMIC" [/home/ubuntu/f-stack/lib/f-stack.ko] undefined!

Is there any suggestions for this ? thx a lot

Can f-stack support bonding?

I have a Intel 82599 NIC with 2 ports, I configured 2 IP address in config.ini, but only one was actived(in the smae LAN), so, how can I config these 2 interface to be bonding to one interface?

Nginx performance test issue

We followed README to setup nginx web server base on f-stack.
Test environment:
CPU: [email protected]
memory: 8G
NIC: Intel Corporation Ethernet Controller 82599 for 10GBE
OS1: CentOS-7-x86_64-Minimal-1611.iso
kernel: 3.10.0-514.el7.x86_64
OS2: ubuntu14.04 LTS
kernel: 4.4.0-64-generic
We got two issues as below:

  1. Our test result of nginx using f-stack with CentOS is worse than nginx using f-stack with ubuntu,
    what's the reason for our results? what's the difference for f-stack between ubuntu and CenOS? We fund that tencent using CenOS with tlinux kernel, I'd like to know if tlinux kernel is so important for f-stack performance test or not?
  2. Our web server cannot work well with multi-core, some of core (or process running f-stack) cannot reply http requests. test cmd "ab -kc 300 -n 30000 http://192.168.22.22"

nginx进程发起tcp连接,双向数据包不在同一个进程?

   在测试nginx时,启动了2个nginx进程,进程A对应接收队列0,发送队列0;进程B对应接收队列1,发送队列1.进程A发起tcp 时,有时从外部服务器回的tcp报文被接收队列1收到,进入了进程B,但B没有tcp会话,就会reset这个连接,这个问题怎么解决呢?
  在in_pcb.c 端口分配时执行了ff_rss_check,感觉是要保证回来的数据包进入同一个进程,但我测试没有成功。

what advantage and disadvantage in mtcp and seastar

Hi all:
This is a awesome project. I am glad to find this project, and I have some blow quession:
1. what about f-stack advantage and disadvantage in mtcp and seastar ? Could you tell me more about it?
2. What the detail next development plan?
3. Is there any operating system limitation?
Thanks for you in advance!

compiling error : error: #pragma GCC diagnostic not allowed inside functions

I tried to compile fstack, but I get several compiling errors, this make me thinking whether a low mistake is existing.

1, at first , I fellow "Quick start" steps. when go to "Compile F-Stack". get error below:

cc1: warnings being treated as errors
ff_dpdk_pcap.c: In function ‘ff_dump_packets’:
ff_dpdk_pcap.c:92:11: error: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
ff_dpdk_pcap.c:95:15: error: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
ff_dpdk_pcap.c: In function ‘ff_enable_pcap’:
ff_dpdk_pcap.c:69:11: error: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
make: *** [ff_dpdk_pcap.o] Error 1

2, I add flags "-Wno-unused-result " to Makefile to omit them . but new errors come.

cc1: warnings being treated as errors
In file included from ff_glue.c:50:0:
/root/fstack/lib/../freebsd/sys/buf.h:130:4: error: declaration does not declare anything
/root/fstack/lib/../freebsd/sys/buf.h:131:3: error: declaration does not declare anything
In file included from ff_glue.c:53:0:
/root/fstack/lib/../freebsd/sys/mbuf.h:192:3: error: declaration does not declare anything
/root/fstack/lib/../freebsd/sys/mbuf.h:219:3: error: declaration does not declare anything
/root/fstack/lib/../freebsd/sys/mbuf.h:224:3: error: declaration does not declare anything
/root/fstack/lib/../freebsd/sys/mbuf.h:246:5: error: declaration does not declare anything
/root/fstack/lib/../freebsd/sys/mbuf.h:247:4: error: declaration does not declare anything
/root/fstack/lib/../freebsd/sys/mbuf.h:249:3: error: declaration does not declare anything
/root/fstack/lib/../freebsd/sys/mbuf.h: In function 'm_extaddref':
/root/fstack/lib/../freebsd/sys/mbuf.h:659:3: error: 'struct mbuf' has no member named 'm_ext'
/root/fstack/lib/../freebsd/sys/mbuf.h:660:3: error: 'struct mbuf' has no member named 'm_ext'
/root/fstack/lib/../freebsd/sys/mbuf.h:661:15: error: 'struct mbuf' has no member named 'm_ext'
/root/fstack/lib/../freebsd/sys/mbuf.h:662:3: error: 'struct mbuf' has no member named 'm_ext'
/root/fstack/lib/../freebsd/sys/mbuf.h:663:3: error: 'struct mbuf' has no member named 'm_ext'
/root/fstack/lib/../freebsd/sys/mbuf.h:664:3: error: 'struct mbuf' has no member named 'm_ext'
/root/fstack/lib/../freebsd/sys/mbuf.h:665:3: error: 'struct mbuf' has no member named 'm_ext'
/root/fstack/lib/../freebsd/sys/mbuf.h:666:3: error: 'struct mbuf' has no member named 'm_ext'
/root/fstack/lib/../freebsd/sys/mbuf.h:667:3: error: 'struct mbuf' has no member named 'm_ext'
/root/fstack/lib/../freebsd/sys/mbuf.h: In function 'm_init':
/root/fstack/lib/../freebsd/sys/mbuf.h:709:3: error: 'struct mbuf' has no member named 'm_next'
/root/fstack/lib/../freebsd/sys/mbuf.h:710:3: error: 'struct mbuf' has no member named 'm_nextpkt'
/root/fstack/lib/../freebsd/sys/mbuf.h:711:15: error: 'struct mbuf' has no member named 'm_dat'

Then I add " -fms-extensions" flag to Makefile .

3, But I meet new errors again :

/data/f-stack/lib/../freebsd/kern/kern_descrip.c: In function ‘fget_unlocked’:
/data/f-stack/lib/../freebsd/kern/kern_descrip.c:2500:12: error: #pragma GCC diagnostic not allowed inside functions
cc1: warnings being treated as errors
/data/f-stack/lib/../freebsd/kern/kern_descrip.c:2501:19: error: new qualifiers in middle of multi-level non-const cast are unsafe [-Wcast-qual]
/data/f-stack/lib/../freebsd/kern/kern_descrip.c:2502:21: error: #pragma GCC diagnostic not allowed inside functions
At top level:
cc1: error: unrecognized command line option "-Wno-unused-but-set-variable"
cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"

I even tried to change gcc version from 4.5.3 to 5.4.0 , Do I drop something ? Does anyone meet the same error like me ?

Performance bottleneck

Dear team,
I ran f-stack and nginx on a vm(non NUMA) which has 8c10G and a 10G NIC.
With ONE queue and ONE lcore wrk got

# ./wrk -c 200 -t 6 -d 30s http://192.1.1.3:8080
//sth nosiy
Requests/sec:  53773.02
Transfer/sec:     43.64MB

When i start nginx and f-stack with 2 cores and 2 queues, the result became

# ./wrk -c 200 -t 6 -d 30s http://192.1.1.3:8080
//sth nosiy
Requests/sec:  96035.38
Transfer/sec:     77.94MB

But more than 2 cores and 2 queues still got about 10k RPS, is there any way to figure out the bottleneck?

The benchmark setup

Dear authors,
Thank you for providing f-stack to the open source community. �May I ask how do you obtain the results of the F-stack? Is there any details on the environment of setup? Thanks.

compiling error with gcc 6.3.1 on fedora

# cd f-stack/lib
# make
cc -c -O2 -fno-strict-aliasing -frename-registers -pipe -Wno-maybe-uninitialized   -std=c99  -Wall -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-inline -Wcast-qual -Wno-pointer-sign -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unused-but-set-variable -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -DFSTACK  -fstack-protector -D__FreeBSD__ -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-builtin -I/home/liwei/src/f-stack/lib/include -undef -imacros filtered_predefined_macros.h -nostdinc  -I. -I/home/liwei/src/f-stack/lib/../freebsd -I./machine_include -I./opt -Werror -Wno-unused-variable  /home/liwei/src/f-stack/lib/../freebsd/netinet/cc/cc_cubic.c
/home/liwei/src/f-stack/lib/../freebsd/netinet/cc/cc_cubic.c: In function ‘cubic_cong_signal’:
/home/liwei/src/f-stack/lib/../freebsd/netinet/cc/cc_cubic.c:264:3: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
   if (CCV(ccv, t_rxtshift) >= 2)
   ^~
/home/liwei/src/f-stack/lib/../freebsd/netinet/cc/cc_cubic.c:266:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
    cubic_data->t_last_cong = ticks;
    ^~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:382: recipe for target 'cc_cubic.o' failed
make: *** [cc_cubic.o] Error 1

It seems newer version gcc added [-Werror=misleading-indentation] error checking,
I can fix this with following patch:

diff --git a/freebsd/netinet/cc/cc_cubic.c b/freebsd/netinet/cc/cc_cubic.c
index a447345..89e35f8 100644
--- a/freebsd/netinet/cc/cc_cubic.c
+++ b/freebsd/netinet/cc/cc_cubic.c
@@ -261,9 +261,10 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type)
                 * chance the first one is a false alarm and may not indicate
                 * congestion.
                 */
-               if (CCV(ccv, t_rxtshift) >= 2)
+               if (CCV(ccv, t_rxtshift) >= 2) {
                        cubic_data->num_cong_events++;
                        cubic_data->t_last_cong = ticks;
+               }
                break;
        }
 }

You shall keep the license statement in your ngx_ff_module.c file

Your socket hook way was copied from our project(https://github.com/opendp/dpdk-nginx/blob/master/src/event/modules/ans_module.c), you shall keep the license statement.

Our license is here.
/*-

BSD LICENSE
Copyright(c) 2015-2017 Ansyun [email protected]. All rights reserved.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

  • Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in
    the documentation and/or other materials provided with the
    distribution.
  • Neither the name of Ansyun [email protected] nor the names of its
    contributors may be used to endorse or promote products derived
    from this software without specific prior written permission.
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    Author: JiaKai ([email protected]) and Bluestar ([email protected])
    */

Curl fail for Proxy mode after restart.

About 1/10 HTTP access (curl) fails for Nginx proxy mode, after restart, and can recover it self.

Environment

  1. F-stack version: master:afba4e3b
  2. CPU: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
  3. OS: CentOS Linux release 7.2.1511 (Core)
  4. Kernel: 3.10.0-327.el7.x86_64

Steps to reproduce

  1. config f-stack/nginx as proxy (upstream), for example
    upstream my_backends {
        server 192.168.1.2:80 weight=100;
        server 192.168.1.3:80 weight=100;
    }

    server {
        listen 8080 backlog=81920;

        location / {
            proxy_pass http://my_backends;
        }
    }
  1. restart nginx
$ killall -9 nginx && sleep 2
$ ./start.sh -b /usr/local/nginx_fstack/sbin/nginx  -c config.ini
  1. wait nginx/dpdk to start (check with curl)
$ curl 192.168.0.1
... success response ...
  1. try access proxy for more then 20 times, and it may fail
$ curl 192.168.0.1:8080
  1. it can recover after a while, and curl always success after that.

param num_procs[0] or proc_id[0] error!

I successfully compiled the f-stack and set FF_PATH and FF_DPDK OK. After running the example code,

./helloworld ../config.ini

and the following error occurred:
[dpdk]: lcore_mask=3
[dpdk]: channel=4
[dpdk]: nb_ports=1
[dpdk]: promiscuous=1
[dpdk]: numa_on=1
[dpdk]: tso=0
[port0]: addr=192.168.44.129
[port0]: netmask=255.255.255.0
[port0]: broadcast=192.168.44.255
[port0]: gateway=192.168.44.2
[port0]: enable=1
[port0]: udp_port=53
[freebsd.boot]: hz=100
[freebsd.boot]: kern.ipc.maxsockets=262144
[freebsd.boot]: net.inet.tcp.syncache.hashsize=4096
[freebsd.boot]: net.inet.tcp.syncache.bucketlimit=100
[freebsd.boot]: net.inet.tcp.tcbhashsize=65536
[freebsd.sysctl]: kern.ipc.somaxconn=32768
[freebsd.sysctl]: kern.ipc.maxsockbuf=16777216
[freebsd.sysctl]: net.inet.tcp.fast_finwait2_recycle=1
[freebsd.sysctl]: net.inet.tcp.sendspace=16384
[freebsd.sysctl]: net.inet.tcp.recvspace=8192
[freebsd.sysctl]: net.inet.tcp.nolocaltimewait=1
[freebsd.sysctl]: net.inet.tcp.cc.algorithm=htcp
[freebsd.sysctl]: net.inet.tcp.sendbuf_max=16777216
[freebsd.sysctl]: net.inet.tcp.recvbuf_max=16777216
[freebsd.sysctl]: net.inet.tcp.sendbuf_auto=1
[freebsd.sysctl]: net.inet.tcp.recvbuf_auto=1
[freebsd.sysctl]: net.inet.tcp.sendbuf_inc=16384
[freebsd.sysctl]: net.inet.tcp.recvbuf_inc=524288
[freebsd.sysctl]: net.inet.tcp.inflight.enable=0
[freebsd.sysctl]: net.inet.tcp.sack=1
[freebsd.sysctl]: net.inet.tcp.blackhole=1
[freebsd.sysctl]: net.inet.tcp.msl=2000
[freebsd.sysctl]: net.inet.tcp.delayed_ack=0
[freebsd.sysctl]: net.inet.udp.blackhole=1
[freebsd.sysctl]: net.inet.ip.redirect=0
param num_procs[0] or proc_id[0] error!

I debug found getopt_long function return -1, is there any error in my usage? Thanks

static void
ff_load_arg(struct ff_config *cfg, int argc, char *const argv[])
{
    dpdk_argc_arg = 0;
    int c;
    int index = 0;
    while((c = getopt_long(argc, argv, short_options, long_options, &index)) != -1) {
        switch (c) {
            case 'c':
                cfg->dpdk.proc_mask = strdup(optarg);
                break;

循环变量i的重复使用

static int
init_arp_ring(void)
{
....
for (i = 0; i < nb_ports; i++) {
uint8_t port_id = ff_global_cfg.dpdk.port_cfgs[i].port_id;

    for(i = 0; i < nb_procs; ++i) {

}
这个循环中,i重复使用, 不会出问题吗?

vlan can not used

hi, when i use f-stack in vlan. i create vlan interface and set route ,but i can't ping the ip. also the pkt->vlan_tci is correct. can you tel me how to do in vlan?

compile error

cc -c -O2 -fno-strict-aliasing -frename-registers -pipe -Wno-maybe-uninitialized -std=c99 -Wall -Wnested-externs -Wstrict-prototypes -Wmissing-proto
types -Wpointer-arith -Wno-inline -Wcast-qual -Wno-pointer-sign -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unused-but-set-variable -fno-comm
on -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -DFSTACK -fstack-protector -D__FreeBSD__ -D_KERNEL -DHAVE_KE
RNEL_OPTION_HEADERS -include opt_global.h -fno-builtin -I/home/yuwh/fstack/f-stack/lib/include -undef -imacros filtered_predefined_macros.h -nostdinc
-I. -I/home/yuwh/fstack/f-stack/lib/../freebsd -I./machine_include -I./opt -Werror -Wno-unused-variable ff_compat.c
cc -c -O2 -fno-strict-aliasing -frename-registers -pipe -Wno-maybe-uninitialized -std=c99 -Wall -Wnested-externs -Wstrict-prototypes -Wmissing-proto
types -Wpointer-arith -Wno-inline -Wcast-qual -Wno-pointer-sign -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unused-but-set-variable -fno-comm
on -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -DFSTACK -fstack-protector -D__FreeBSD__ -D_KERNEL -DHAVE_KE
RNEL_OPTION_HEADERS -include opt_global.h -fno-builtin -I/home/yuwh/fstack/f-stack/lib/include -undef -imacros filtered_predefined_macros.h -nostdinc
-I. -I/home/yuwh/fstack/f-stack/lib/../freebsd -I./machine_include -I./opt -Werror -Wno-unused-variable ff_glue.c
cc1: warnings being treated as errors
In file included from ff_glue.c:50:
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/buf.h:130: error: declaration does not declare anything
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/buf.h:131: error: declaration does not declare anything
In file included from ff_glue.c:53:
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:192: error: declaration does not declare anything
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:219: error: declaration does not declare anything
...
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h: In function ‘m_free’:
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1174: error: ‘struct mbuf’ has no member named ‘m_next’
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h: In function ‘rt_m_getfib’:
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1190: error: ‘struct mbuf’ has no member named ‘m_pkthdr’
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h: In function ‘mbufq_drain’:
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1249: error: ‘struct mbuf’ has no member named ‘m_stailqpkt’
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h: In function ‘mbufq_last’:
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1265: error: ‘struct mbuf’ has no member named ‘m_stailqpkt’
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1265: error: type defaults to ‘int’ in declaration of ‘__x’
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1265: error: initialization from incompatible pointer type
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1265: error: ‘struct mbuf’ has no member named ‘m_stailqpkt’
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h: In function ‘mbufq_enqueue’:
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1288: error: ‘struct mbuf’ has no member named ‘m_stailqpkt’
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1288: error: ‘struct mbuf’ has no member named ‘m_stailqpkt’
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h: In function ‘mbufq_dequeue’:
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1300: error: ‘struct mbuf’ has no member named ‘m_stailqpkt’
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1301: error: ‘struct mbuf’ has no member named ‘m_nextpkt’
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h: In function ‘mbufq_prepend’:
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1311: error: ‘struct mbuf’ has no member named ‘m_stailqpkt’
/home/yuwh/fstack/f-stack/lib/../freebsd/sys/mbuf.h:1311: error: ‘struct mbuf’ has no member named ‘m_stailqpkt’
At top level:
cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"
make: *** [ff_glue.o] Error 1

[yuwh@localhost lib]$gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)

ping somehow failed and is ok after reboot

Hello,
Thanks for your attention.
I tried to bring up F-stack. It can work just like the examples.

However, I wanted to go further and failed to ping the configured ip address.
The config.init setting is as following:

[dpdk]
lcore_mask=1
channel=2
nb_ports=1
promiscuous=1
numa_on=1
tso=0

[port0]
addr=10.0.1.2
netmask=255.255.255.0
broadcast=10.0.1.255
gateway=10.0.1.1
pcap=./a.pcap

[freebsd.boot]
hz=100

kern.ipc.maxsockets=262144

net.inet.tcp.syncache.hashsize=4096
net.inet.tcp.syncache.bucketlimit=100

net.inet.tcp.tcbhashsize=65536

[freebsd.sysctl]
kern.ipc.somaxconn=32768
kern.ipc.maxsockbuf=16777216

net.inet.tcp.fast_finwait2_recycle=1
net.inet.tcp.sendspace=16384
net.inet.tcp.recvspace=8192
net.inet.tcp.nolocaltimewait=1
net.inet.tcp.cc.algorithm=htcp
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.sendbuf_auto=1
net.inet.tcp.recvbuf_auto=1
net.inet.tcp.sendbuf_inc=16384
net.inet.tcp.recvbuf_inc=524288
net.inet.tcp.inflight.enable=0
net.inet.tcp.sack=1
net.inet.tcp.blackhole=1
net.inet.tcp.msl=2000
net.inet.tcp.delayed_ack=0

net.inet.udp.blackhole=1
net.inet.ip.redirect=0

The configuration items are nearly same as the demo except the changed ip address.
Please advice if any suggestion on how to debug it.
Thanks.
OceanSpark

support nginx reload.

Nginx reload function doesn't work.

Environment

  1. F-stack version: master:afba4e3b
  2. CPU: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
  3. OS: CentOS Linux release 7.2.1511 (Core)
  4. Kernel: 3.10.0-327.el7.x86_64

Steps

  1. setup f-stack and nginx app, make sure curl works
  2. change the nginx configure file /usr/local/nginx_fstack/conf/nginx.conf
    e.g., add new server (listen port), or add a proxy server(upstream)
  3. try reload with 'killall -SIGHUP nginx'

consider fstack-nginx is working in "single-process" mode, no master process. So use killall to send signal to all processes.

Expect that new configure applied, actually it does not. Even the curl fails after "reload".

Reproducible

Being able to reproduce.

Can I use f-stack without enabling DPDK?

The DPDK support is optional in seastar. We can compile seastar with DPDK ./configure --enable-dpdk.
Can I use f-stack without DPDK? I just want to use the user space stack.

nginx readv errors

Dear team,
Today i config nignx as a proxy before my static pages server.
But nginx complain some errors and i have no idea about that.
My nginx.conf is:

#user  nobody;
worker_processes  1;
daemon off;
events {
    worker_connections  1024000;
    use kqueue;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  logs/access.log  main;
    error_log logs/nginx_error.log  debug;

    sendfile        off;
    keepalive_timeout  65;
    gzip  on;
    server {
        listen       8080;
        server_name  localhost;

        location / {
            proxy_pass   http://192.1.1.4:80;
        }
    }
}

As the configuration above, i have web server at 192.1.1.4:80 and proxy is running on 192.1.1.3:8080
When i run lynx 192.1.1.3:8080, i can see nothing on the screen and the web server log shows:

192.1.1.3 - - [02/Aug/2017:15:15:57 +0800] "GET / HTTP/1.0" 200 612 "-" "Lynx/2.8.8dev.15 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.0.1e-fips"

But the nginx listen on 192.1.1.3:8080 report:

2017/08/02 15:01:16 [alert] 17447#0: *1 readv() failed (9: Bad file descriptor) while reading upstream, client: 192.1.1.4, server: localhost, request: "GET / HTTP/1.0", upstream: "http://192.1.1.4:80/", host: "192.1.1.3:8080"

Any suggestions?
PS: The config.ini is origin from this repo without any modifications,
PS1: I started another nginx without f-stack and it works nicely with the same configurations

Why not replace system calls in libfstack.a ?

In my opinion, f-stack should replace syscalls in libfstack.a;
The apps will not care fd bits and call socket/read/write/kqueue the same as the normal network stack;
Developers just add ff_init at app init, and change the processing to ff_run;
I have modified it and test ok by the examples, nginx and redis;
But it dosen‘t work well with micro_thread, because "multiple definition of the system calls".

f-stack/nginx killed by oom-killer

found that after running for several days with high traffic test by wrk. f-stack/nginx cannot receive any packets. After checking dmesg, nginx triggered oom-killer.
So

  1. is there some memory leaks ?
  2. after killed by OOM, we can still see the nginx process by ps -ef, not sure if it's OK.

the dmesg logs, oom happened at

[1742446.360468] nginx invoked oom-killer: gfp_mask=0x280da, order=0, oom_score_adj=0


[436765.137875] ixgbe 0000:01:00.1 eth1: NIC Link is Down
[436783.913060] ixgbe 0000:01:00.1 eth1: NIC Link is Up 10 Gbps, Flow Control: None
[595421.915297] igb_uio: module verification failed: signature and/or required key missing - tainting kernel
[595421.915845] igb_uio: Use MSIX interrupt by default
[595424.607800] KNI: ######## DPDK kni module loading ########
[595424.607870] KNI: loopback disabled
[595424.607873] KNI: ######## DPDK kni module loaded  ########
[595443.030001] ixgbe 0000:01:00.1: removed PHC on eth1
[595452.630631] ixgbe 0000:01:00.1: complete
[595458.665798] igb_uio 0000:01:00.1: irq 153 for MSI/MSI-X
[595458.665963] igb_uio 0000:01:00.1: uio device registered with irq 99
[607141.545984] ixgbe 0000:01:00.0 eth0: NIC Link is Up 10 Gbps, Flow Control: None
[856198.438601] ixgbe 0000:01:00.0: removed PHC on eth0
[856199.941294] pps pps0: new PPS source ptp2
[856199.941300] ixgbe 0000:03:00.0: registered PHC device on enp3s0f0
[856200.163828] IPv6: ADDRCONF(NETDEV_UP): enp3s0f0: link is not ready
[856202.932163] pps pps1: new PPS source ptp3
[856202.932169] ixgbe 0000:01:00.0: registered PHC device on eth0
[856203.151522] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[856203.817039] ixgbe 0000:03:00.0 enp3s0f0: NIC Link is Up 10 Gbps, Flow Control: None
[856203.817198] IPv6: ADDRCONF(NETDEV_CHANGE): enp3s0f0: link becomes ready
[856207.848094] ixgbe 0000:01:00.0 eth0: NIC Link is Up 10 Gbps, Flow Control: None
[856207.848251] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[1198338.686376] UDP: bad checksum. From 104.243.41.53:48702 to 115.182.113.38:53 ulen 56
[1742446.360468] nginx invoked oom-killer: gfp_mask=0x280da, order=0, oom_score_adj=0
[1742446.360475] nginx cpuset=/ mems_allowed=0-1
[1742446.360480] CPU: 2 PID: 184708 Comm: nginx Tainted: G           OE  ------------   3.10.0-327.el7.x86_64 #1
[1742446.360482] Hardware name: Dell Inc. PowerEdge R630/02C2CP, BIOS 2.3.4 11/08/2016
[1742446.360485]  ffff881043f87300 00000000a6c21142 ffff880f8dd4fb00 ffffffff816351f1
[1742446.360495]  ffff880f8dd4fb90 ffffffff81630191 ffff880f88f7dbb0 ffff880f88f7dbc8
[1742446.360502]  0000000000003206 ffff881043f87300 ffff880f8dd4fb78 ffffffff8112882f
[1742446.360509] Call Trace:
[1742446.360520]  [<ffffffff816351f1>] dump_stack+0x19/0x1b
[1742446.360525]  [<ffffffff81630191>] dump_header+0x8e/0x214
[1742446.360532]  [<ffffffff8112882f>] ? delayacct_end+0x8f/0xb0
[1742446.360539]  [<ffffffff8116cdee>] oom_kill_process+0x24e/0x3b0
[1742446.360543]  [<ffffffff8116c956>] ? find_lock_task_mm+0x56/0xc0
[1742446.360548]  [<ffffffff8116d616>] out_of_memory+0x4b6/0x4f0
[1742446.360555]  [<ffffffff811737f5>] __alloc_pages_nodemask+0xa95/0xb90
[1742446.360563]  [<ffffffff811b78ca>] alloc_pages_vma+0x9a/0x140
[1742446.360570]  [<ffffffff81197655>] handle_mm_fault+0xb85/0xf50
[1742446.360576]  [<ffffffff81640e22>] __do_page_fault+0x152/0x420
[1742446.360581]  [<ffffffff81641113>] do_page_fault+0x23/0x80
[1742446.360587]  [<ffffffff8163d408>] page_fault+0x28/0x30
[1742446.360590] Mem-Info:
[1742446.360592] Node 0 DMA per-cpu:
[1742446.360595] CPU    0: hi:    0, btch:   1 usd:   0
[1742446.360597] CPU    1: hi:    0, btch:   1 usd:   0
[1742446.360599] CPU    2: hi:    0, btch:   1 usd:   0
[1742446.360601] CPU    3: hi:    0, btch:   1 usd:   0
[1742446.360603] CPU    4: hi:    0, btch:   1 usd:   0
[1742446.360604] CPU    5: hi:    0, btch:   1 usd:   0
[1742446.360606] CPU    6: hi:    0, btch:   1 usd:   0
[1742446.360608] CPU    7: hi:    0, btch:   1 usd:   0
[1742446.360610] CPU    8: hi:    0, btch:   1 usd:   0
[1742446.360611] CPU    9: hi:    0, btch:   1 usd:   0
[1742446.360613] CPU   10: hi:    0, btch:   1 usd:   0
[1742446.360615] CPU   11: hi:    0, btch:   1 usd:   0
[1742446.360617] CPU   12: hi:    0, btch:   1 usd:   0
[1742446.360619] CPU   13: hi:    0, btch:   1 usd:   0
[1742446.360620] CPU   14: hi:    0, btch:   1 usd:   0
[1742446.360622] CPU   15: hi:    0, btch:   1 usd:   0
[1742446.360624] CPU   16: hi:    0, btch:   1 usd:   0
[1742446.360626] CPU   17: hi:    0, btch:   1 usd:   0
[1742446.360628] CPU   18: hi:    0, btch:   1 usd:   0
[1742446.360630] CPU   19: hi:    0, btch:   1 usd:   0
[1742446.360631] CPU   20: hi:    0, btch:   1 usd:   0
[1742446.360633] CPU   21: hi:    0, btch:   1 usd:   0
[1742446.360635] CPU   22: hi:    0, btch:   1 usd:   0
[1742446.360637] CPU   23: hi:    0, btch:   1 usd:   0
[1742446.360638] CPU   24: hi:    0, btch:   1 usd:   0
[1742446.360640] CPU   25: hi:    0, btch:   1 usd:   0
[1742446.360642] CPU   26: hi:    0, btch:   1 usd:   0
[1742446.360644] CPU   27: hi:    0, btch:   1 usd:   0
[1742446.360646] CPU   28: hi:    0, btch:   1 usd:   0
[1742446.360648] CPU   29: hi:    0, btch:   1 usd:   0
[1742446.360649] CPU   30: hi:    0, btch:   1 usd:   0
[1742446.360651] CPU   31: hi:    0, btch:   1 usd:   0
[1742446.360653] CPU   32: hi:    0, btch:   1 usd:   0
[1742446.360655] CPU   33: hi:    0, btch:   1 usd:   0
[1742446.360656] CPU   34: hi:    0, btch:   1 usd:   0
[1742446.360658] CPU   35: hi:    0, btch:   1 usd:   0
[1742446.360660] CPU   36: hi:    0, btch:   1 usd:   0
[1742446.360662] CPU   37: hi:    0, btch:   1 usd:   0
[1742446.360664] CPU   38: hi:    0, btch:   1 usd:   0
[1742446.360666] CPU   39: hi:    0, btch:   1 usd:   0
[1742446.360667] CPU   40: hi:    0, btch:   1 usd:   0
[1742446.360669] CPU   41: hi:    0, btch:   1 usd:   0
[1742446.360671] CPU   42: hi:    0, btch:   1 usd:   0
[1742446.360673] CPU   43: hi:    0, btch:   1 usd:   0
[1742446.360674] CPU   44: hi:    0, btch:   1 usd:   0
[1742446.360676] CPU   45: hi:    0, btch:   1 usd:   0
[1742446.360678] CPU   46: hi:    0, btch:   1 usd:   0
[1742446.360680] CPU   47: hi:    0, btch:   1 usd:   0
[1742446.360681] Node 0 DMA32 per-cpu:
[1742446.360684] CPU    0: hi:  186, btch:  31 usd:  30
[1742446.360686] CPU    1: hi:  186, btch:  31 usd:   0
[1742446.360688] CPU    2: hi:  186, btch:  31 usd:  11
[1742446.360690] CPU    3: hi:  186, btch:  31 usd:   0
[1742446.360692] CPU    4: hi:  186, btch:  31 usd:  56
[1742446.360693] CPU    5: hi:  186, btch:  31 usd:   0
[1742446.360695] CPU    6: hi:  186, btch:  31 usd:  58
[1742446.360697] CPU    7: hi:  186, btch:  31 usd:  30
[1742446.360699] CPU    8: hi:  186, btch:  31 usd:   0
[1742446.360701] CPU    9: hi:  186, btch:  31 usd:  30
[1742446.360702] CPU   10: hi:  186, btch:  31 usd:  30
[1742446.360704] CPU   11: hi:  186, btch:  31 usd:   0
[1742446.360706] CPU   12: hi:  186, btch:  31 usd:  52
[1742446.360708] CPU   13: hi:  186, btch:  31 usd:   0
[1742446.360710] CPU   14: hi:  186, btch:  31 usd:   0
[1742446.360712] CPU   15: hi:  186, btch:  31 usd:  30
[1742446.360714] CPU   16: hi:  186, btch:  31 usd: 173
[1742446.360716] CPU   17: hi:  186, btch:  31 usd:   0
[1742446.360717] CPU   18: hi:  186, btch:  31 usd:  55
[1742446.360719] CPU   19: hi:  186, btch:  31 usd:   0
[1742446.360721] CPU   20: hi:  186, btch:  31 usd: 179
[1742446.360723] CPU   21: hi:  186, btch:  31 usd:   0
[1742446.360725] CPU   22: hi:  186, btch:  31 usd: 158
[1742446.360727] CPU   23: hi:  186, btch:  31 usd:   0
[1742446.360729] CPU   24: hi:  186, btch:  31 usd:   0
[1742446.360730] CPU   25: hi:  186, btch:  31 usd:   0
[1742446.360732] CPU   26: hi:  186, btch:  31 usd:   0
[1742446.360734] CPU   27: hi:  186, btch:  31 usd:   0
[1742446.360736] CPU   28: hi:  186, btch:  31 usd:   0
[1742446.360738] CPU   29: hi:  186, btch:  31 usd:   0
[1742446.360739] CPU   30: hi:  186, btch:  31 usd:   0
[1742446.360741] CPU   31: hi:  186, btch:  31 usd:   0
[1742446.360743] CPU   32: hi:  186, btch:  31 usd:  29
[1742446.360745] CPU   33: hi:  186, btch:  31 usd:   0
[1742446.360747] CPU   34: hi:  186, btch:  31 usd:   0
[1742446.360749] CPU   35: hi:  186, btch:  31 usd:   0
[1742446.360750] CPU   36: hi:  186, btch:  31 usd:   5
[1742446.360752] CPU   37: hi:  186, btch:  31 usd:   0
[1742446.360754] CPU   38: hi:  186, btch:  31 usd:   0
[1742446.360756] CPU   39: hi:  186, btch:  31 usd:   0
[1742446.360758] CPU   40: hi:  186, btch:  31 usd: 174
[1742446.360759] CPU   41: hi:  186, btch:  31 usd:   0
[1742446.360761] CPU   42: hi:  186, btch:  31 usd: 112
[1742446.360763] CPU   43: hi:  186, btch:  31 usd:   0
[1742446.360765] CPU   44: hi:  186, btch:  31 usd: 154
[1742446.360767] CPU   45: hi:  186, btch:  31 usd:   0
[1742446.360769] CPU   46: hi:  186, btch:  31 usd: 169
[1742446.360770] CPU   47: hi:  186, btch:  31 usd:   0
[1742446.360772] Node 0 Normal per-cpu:
[1742446.360774] CPU    0: hi:  186, btch:  31 usd:  72
[1742446.360776] CPU    1: hi:  186, btch:  31 usd:   0
[1742446.360778] CPU    2: hi:  186, btch:  31 usd:  52
[1742446.360780] CPU    3: hi:  186, btch:  31 usd:   0
[1742446.360782] CPU    4: hi:  186, btch:  31 usd: 161
[1742446.360784] CPU    5: hi:  186, btch:  31 usd:  23
[1742446.360785] CPU    6: hi:  186, btch:  31 usd:  58
[1742446.360787] CPU    7: hi:  186, btch:  31 usd:  23
[1742446.360789] CPU    8: hi:  186, btch:  31 usd:  30
[1742446.360791] CPU    9: hi:  186, btch:  31 usd:   0
[1742446.360793] CPU   10: hi:  186, btch:  31 usd: 106
[1742446.360795] CPU   11: hi:  186, btch:  31 usd:  25
[1742446.360796] CPU   12: hi:  186, btch:  31 usd:  83
[1742446.360798] CPU   13: hi:  186, btch:  31 usd:   0
[1742446.360800] CPU   14: hi:  186, btch:  31 usd: 140
[1742446.360802] CPU   15: hi:  186, btch:  31 usd:  25
[1742446.360804] CPU   16: hi:  186, btch:  31 usd:  42
[1742446.360806] CPU   17: hi:  186, btch:  31 usd:  58
[1742446.360808] CPU   18: hi:  186, btch:  31 usd: 164
[1742446.360809] CPU   19: hi:  186, btch:  31 usd:  15
[1742446.360811] CPU   20: hi:  186, btch:  31 usd:  41
[1742446.360813] CPU   21: hi:  186, btch:  31 usd: 174
[1742446.360815] CPU   22: hi:  186, btch:  31 usd:  42
[1742446.360817] CPU   23: hi:  186, btch:  31 usd:  61
[1742446.360819] CPU   24: hi:  186, btch:  31 usd:  68
[1742446.360820] CPU   25: hi:  186, btch:  31 usd:   0
[1742446.360822] CPU   26: hi:  186, btch:  31 usd:   0
[1742446.360824] CPU   27: hi:  186, btch:  31 usd:  56
[1742446.360826] CPU   28: hi:  186, btch:  31 usd:  29
[1742446.360828] CPU   29: hi:  186, btch:  31 usd:   0
[1742446.360830] CPU   30: hi:  186, btch:  31 usd:   0
[1742446.360831] CPU   31: hi:  186, btch:  31 usd:   0
[1742446.360833] CPU   32: hi:  186, btch:  31 usd:  22
[1742446.360835] CPU   33: hi:  186, btch:  31 usd:   0
[1742446.360837] CPU   34: hi:  186, btch:  31 usd:   0
[1742446.360839] CPU   35: hi:  186, btch:  31 usd:   0
[1742446.360841] CPU   36: hi:  186, btch:  31 usd:  51
[1742446.360843] CPU   37: hi:  186, btch:  31 usd: 155
[1742446.360845] CPU   38: hi:  186, btch:  31 usd:   0
[1742446.360846] CPU   39: hi:  186, btch:  31 usd:   0
[1742446.360848] CPU   40: hi:  186, btch:  31 usd:  86
[1742446.360850] CPU   41: hi:  186, btch:  31 usd:  22
[1742446.360852] CPU   42: hi:  186, btch:  31 usd:  70
[1742446.360854] CPU   43: hi:  186, btch:  31 usd: 102
[1742446.360856] CPU   44: hi:  186, btch:  31 usd: 163
[1742446.360857] CPU   45: hi:  186, btch:  31 usd: 103
[1742446.360859] CPU   46: hi:  186, btch:  31 usd:  25
[1742446.360861] CPU   47: hi:  186, btch:  31 usd:  45
[1742446.360863] Node 1 Normal per-cpu:
[1742446.360865] CPU    0: hi:  186, btch:  31 usd:  50
[1742446.360867] CPU    1: hi:  186, btch:  31 usd:  45
[1742446.360869] CPU    2: hi:  186, btch:  31 usd:  29
[1742446.360870] CPU    3: hi:  186, btch:  31 usd:  42
[1742446.360872] CPU    4: hi:  186, btch:  31 usd:  83
[1742446.360874] CPU    5: hi:  186, btch:  31 usd:  38
[1742446.360876] CPU    6: hi:  186, btch:  31 usd:  52
[1742446.360877] CPU    7: hi:  186, btch:  31 usd:  23
[1742446.360879] CPU    8: hi:  186, btch:  31 usd:  28
[1742446.360881] CPU    9: hi:  186, btch:  31 usd:  38
[1742446.360883] CPU   10: hi:  186, btch:  31 usd:  37
[1742446.360885] CPU   11: hi:  186, btch:  31 usd:  37
[1742446.360886] CPU   12: hi:  186, btch:  31 usd:  37
[1742446.360888] CPU   13: hi:  186, btch:  31 usd:   3
[1742446.360890] CPU   14: hi:  186, btch:  31 usd:  20
[1742446.360892] CPU   15: hi:  186, btch:  31 usd:  46
[1742446.360893] CPU   16: hi:  186, btch:  31 usd: 185
[1742446.360895] CPU   17: hi:  186, btch:  31 usd: 105
[1742446.360897] CPU   18: hi:  186, btch:  31 usd:  98
[1742446.360899] CPU   19: hi:  186, btch:  31 usd:  36
[1742446.360901] CPU   20: hi:  186, btch:  31 usd:  82
[1742446.360902] CPU   21: hi:  186, btch:  31 usd:  26
[1742446.360904] CPU   22: hi:  186, btch:  31 usd: 161
[1742446.360906] CPU   23: hi:  186, btch:  31 usd:  84
[1742446.360908] CPU   24: hi:  186, btch:  31 usd:  18
[1742446.360910] CPU   25: hi:  186, btch:  31 usd:  57
[1742446.360911] CPU   26: hi:  186, btch:  31 usd:   0
[1742446.360913] CPU   27: hi:  186, btch:  31 usd: 183
[1742446.360915] CPU   28: hi:  186, btch:  31 usd:  15
[1742446.360917] CPU   29: hi:  186, btch:  31 usd:   0
[1742446.360919] CPU   30: hi:  186, btch:  31 usd:   0
[1742446.360920] CPU   31: hi:  186, btch:  31 usd:   0
[1742446.360922] CPU   32: hi:  186, btch:  31 usd:  11
[1742446.360924] CPU   33: hi:  186, btch:  31 usd:   0
[1742446.360926] CPU   34: hi:  186, btch:  31 usd:   0
[1742446.360927] CPU   35: hi:  186, btch:  31 usd:   1
[1742446.360929] CPU   36: hi:  186, btch:  31 usd:  36
[1742446.360931] CPU   37: hi:  186, btch:  31 usd: 176
[1742446.360933] CPU   38: hi:  186, btch:  31 usd:   0
[1742446.360935] CPU   39: hi:  186, btch:  31 usd:   0
[1742446.360937] CPU   40: hi:  186, btch:  31 usd: 178
[1742446.360938] CPU   41: hi:  186, btch:  31 usd:  93
[1742446.360940] CPU   42: hi:  186, btch:  31 usd:  62
[1742446.360942] CPU   43: hi:  186, btch:  31 usd: 145
[1742446.360944] CPU   44: hi:  186, btch:  31 usd: 165
[1742446.360945] CPU   45: hi:  186, btch:  31 usd: 158
[1742446.360947] CPU   46: hi:  186, btch:  31 usd: 184
[1742446.360949] CPU   47: hi:  186, btch:  31 usd: 170
[1742446.360954] active_anon:13970763 inactive_anon:1034272 isolated_anon:0
 active_file:0 inactive_file:0 isolated_file:0
 unevictable:0 dirty:0 writeback:0 unstable:0
 free:57676 slab_reclaimable:19900 slab_unreclaimable:57678
 mapped:11537 shmem:41527 pagetables:31712 bounce:0
 free_cma:0
[1742446.360960] Node 0 DMA free:14600kB min:20kB low:24kB high:28kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15980kB managed:15896kB mlocked:0
kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
[1742446.360967] lowmem_reserve[]: 0 1567 31763 31763
[1742446.360971] Node 0 DMA32 free:123096kB min:2204kB low:2752kB high:3304kB active_anon:603488kB inactive_anon:555368kB active_file:4kB inactive_file:12kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:1854160kB man
aged:1606720kB mlocked:0kB dirty:0kB writeback:0kB mapped:12kB shmem:6080kB slab_reclaimable:1600kB slab_unreclaimable:8012kB kernel_stack:176kB pagetables:1916kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:
5529 all_unreclaimable? yes
[1742446.360979] lowmem_reserve[]: 0 0 30195 30195
[1742446.360983] Node 0 Normal free:43460kB min:42500kB low:53124kB high:63748kB active_anon:26784112kB inactive_anon:1780204kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:31457280
kB managed:30920616kB mlocked:0kB dirty:0kB writeback:0kB mapped:27576kB shmem:123248kB slab_reclaimable:34860kB slab_unreclaimable:124532kB kernel_stack:13456kB pagetables:60764kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:
0kB pages_scanned:66 all_unreclaimable? yes
[1742446.360990] lowmem_reserve[]: 0 0 0 0
[1742446.360994] Node 1 Normal free:49548kB min:45380kB low:56724kB high:68068kB active_anon:28495452kB inactive_anon:1801516kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:33554432
kB managed:33017524kB mlocked:0kB dirty:0kB writeback:0kB mapped:18560kB shmem:36780kB slab_reclaimable:43140kB slab_unreclaimable:98168kB kernel_stack:3888kB pagetables:64168kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB
 pages_scanned:32 all_unreclaimable? yes
[1742446.361000] lowmem_reserve[]: 0 0 0 0
[1742446.361004] Node 0 DMA: 0*4kB 1*8kB (U) 0*16kB 0*32kB 2*64kB (U) 1*128kB (U) 0*256kB 0*512kB 0*1024kB 1*2048kB (R) 3*4096kB (M) = 14600kB
[1742446.361019] Node 0 DMA32: 204*4kB (UEM) 2992*8kB (UEM) 1539*16kB (UEM) 553*32kB (UEM) 225*64kB (UEM) 85*128kB (UEM) 28*256kB (UEM) 14*512kB (UM) 10*1024kB (UM) 3*2048kB (UEM) 0*4096kB = 123072kB
[1742446.361036] Node 0 Normal: 1569*4kB (UEM) 974*8kB (UEM) 449*16kB (UEM) 242*32kB (UEM) 100*64kB (UEM) 67*128kB (UM) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 43972kB
[1742446.361049] Node 1 Normal: 1549*4kB (UEM) 1184*8kB (UEM) 449*16kB (UEM) 256*32kB (UEM) 120*64kB (UEM) 51*128kB (UEM) 11*256kB (UM) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 48068kB
[1742446.361065] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
[1742446.361067] Node 0 hugepages_total=1024 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
[1742446.361069] Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
[1742446.361071] Node 1 hugepages_total=1024 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
[1742446.361073] 376876 total pagecache pages
[1742446.361075] 332843 pages in swap cache
[1742446.361078] Swap cache stats: add 1068618, delete 735775, find 97278/99801
[1742446.361079] Free swap  = 0kB
[1742446.361081] Total swap = 4194300kB
[1742446.361083] 16720463 pages RAM
[1742446.361085] 0 pages HighMem/MovableOnly
[1742446.361086] 330274 pages reserved
[1742446.361087] [ pid ]   uid  tgid total_vm      rss nr_ptes swapents oom_score_adj name
[1742446.361119] [ 1137]     0  1137    32759    18107      68       48             0 systemd-journal
[1742446.361123] [ 1170]     0  1170    10794       29      22      106         -1000 systemd-udevd
[1742446.361127] [ 1562]     0  1562    97048    10763     101      644             0 rsyslogd
[1742446.361130] [ 1564]    81  1564     7201       77      19       51          -900 dbus-daemon
[1742446.361133] [ 1569]     0  1569     1093       23       7       16             0 rngd
[1742446.361137] [ 1570]   995  1570     2131        8       9       29             0 lsmd
[1742446.361140] [ 1573]     0  1573     6657       43      15      104             0 systemd-logind
[1742446.361143] [ 1597]     0  1597    50838        8      42     1139             0 gssproxy
[1742446.361146] [ 1640]     0  1640    13264        0      28      149             0 wpa_supplicant
[1742446.361149] [ 1641]   997  1641   131228      140      52     1527             0 polkitd
[1742446.361152] [ 1935]     0  1935    20636       12      42      203         -1000 sshd
[1742446.361155] [ 1936]     0  1936   138258      108      89     2578             0 tuned
[1742446.361158] [ 1945]     0  1945    31588       27      20      136             0 crond
[1742446.361160] [ 1959]     0  1959    27507        2      10       29             0 agetty
[1742446.361164] [11089]     0 11089     4079        6      13      231             0 dnsmasq
[1742446.361168] [58941]   993 58941    25160       24      19       50             0 chronyd
[1742446.361171] [59171]   850 59171   500736     2022      92     3642             0 cloud-agent
[1742446.361174] [62676]     0 62676    21145        9      41      189             0 zabbix_agentd_o
[1742446.361177] [62679]     0 62679    21145      704      42      178             0 zabbix_agentd_o
[1742446.361180] [62680]     0 62680    21145       11      39      191             0 zabbix_agentd_o
[1742446.361183] [62681]     0 62681    21729      109      41      165             0 zabbix_agentd_o
[1742446.361188] [184686]     0 184686  2036271   919255    1931    59520             0 nginx
[1742446.361191] [184701]     0 184701  2038122   904029    1935    76579             0 nginx
[1742446.361193] [184708]     0 184708  2034302   922169    1927    54565             0 nginx
[1742446.361206] [184715]     0 184715  2033423   900335    1925    75557             0 nginx
[1742446.361209] [184722]     0 184722  2035383   917121    1929    60707             0 nginx
[1742446.361212] [184729]     0 184729  2035977   900288    1931    78121             0 nginx
[1742446.361215] [184736]     0 184736  2036331   932556    1931    46207             0 nginx
[1742446.361218] [184743]     0 184743  2033032   899969    1925    75562             0 nginx
[1742446.361220] [184750]     0 184750  2037707   941911    1934    38173             0 nginx
[1742446.361223] [184757]     0 184757  2033520   901980    1926    74025             0 nginx
[1742446.361226] [184764]     0 184764  2034448   933774    1927    43142             0 nginx
[1742446.361229] [184771]     0 184771  2035371   901307    1929    76521             0 nginx
[1742446.361231] [184778]     0 184778  2035406   922233    1929    55575             0 nginx
[1742446.361234] [184785]     0 184785  2034811   902204    1928    75039             0 nginx
[1742446.361237] [184792]     0 184792  2034360   921332    1927    55535             0 nginx
[1742446.361240] [184799]     0 184799  2039812   906756    1938    75560             0 nginx
[1742446.361245] Out of memory: Kill process 184799 (nginx) score 54 or sacrifice child
[1742446.361268] Killed process 184799 (nginx) total-vm:8159248kB, anon-rss:3626832kB, file-rss:192kB

Compiling errors

I follow the instructions to install F-stack step by step, but I got some errors when compiling nginx.

root@ubuntu:~/downloads/f-stack/app/nginx-1.11.10# make -j 8
make -f objs/Makefile
make[1]: Entering directory /root/downloads/f-stack/app/nginx-1.11.10' cc -o objs/nginx \ objs/src/core/nginx.o \ objs/src/core/ngx_log.o \ objs/src/core/ngx_palloc.o \ objs/src/core/ngx_array.o \ objs/src/core/ngx_list.o \ objs/src/core/ngx_hash.o \ objs/src/core/ngx_buf.o \ objs/src/core/ngx_queue.o \ objs/src/core/ngx_output_chain.o \ objs/src/core/ngx_string.o \ objs/src/core/ngx_parse.o \ objs/src/core/ngx_parse_time.o \ objs/src/core/ngx_inet.o \ objs/src/core/ngx_file.o \ objs/src/core/ngx_crc32.o \ objs/src/core/ngx_murmurhash.o \ objs/src/core/ngx_md5.o \ objs/src/core/ngx_sha1.o \ objs/src/core/ngx_rbtree.o \ objs/src/core/ngx_radix_tree.o \ objs/src/core/ngx_slab.o \ objs/src/core/ngx_times.o \ objs/src/core/ngx_shmtx.o \ objs/src/core/ngx_connection.o \ objs/src/core/ngx_cycle.o \ objs/src/core/ngx_spinlock.o \ objs/src/core/ngx_rwlock.o \ objs/src/core/ngx_cpuinfo.o \ objs/src/core/ngx_conf_file.o \ objs/src/core/ngx_module.o \ objs/src/core/ngx_resolver.o \ objs/src/core/ngx_open_file_cache.o \ objs/src/core/ngx_crypt.o \ objs/src/core/ngx_proxy_protocol.o \ objs/src/core/ngx_syslog.o \ objs/src/event/ngx_event.o \ objs/src/event/ngx_event_timer.o \ objs/src/event/ngx_event_posted.o \ objs/src/event/ngx_event_accept.o \ objs/src/event/ngx_event_connect.o \ objs/src/event/ngx_event_pipe.o \ objs/src/os/unix/ngx_time.o \ objs/src/os/unix/ngx_errno.o \ objs/src/os/unix/ngx_alloc.o \ objs/src/os/unix/ngx_files.o \ objs/src/os/unix/ngx_socket.o \ objs/src/os/unix/ngx_recv.o \ objs/src/os/unix/ngx_readv_chain.o \ objs/src/os/unix/ngx_udp_recv.o \ objs/src/os/unix/ngx_send.o \ objs/src/os/unix/ngx_writev_chain.o \ objs/src/os/unix/ngx_udp_send.o \ objs/src/os/unix/ngx_udp_sendmsg_chain.o \ objs/src/os/unix/ngx_channel.o \ objs/src/os/unix/ngx_shmem.o \ objs/src/os/unix/ngx_process.o \ objs/src/os/unix/ngx_daemon.o \ objs/src/os/unix/ngx_setaffinity.o \ objs/src/os/unix/ngx_setproctitle.o \ objs/src/os/unix/ngx_posix_init.o \ objs/src/os/unix/ngx_user.o \ objs/src/os/unix/ngx_dlopen.o \ objs/src/os/unix/ngx_process_cycle.o \ objs/src/os/unix/ngx_linux_init.o \ objs/src/event/modules/ngx_epoll_module.o \ objs/src/os/unix/ngx_linux_sendfile_chain.o \ objs/src/event/modules/ngx_kqueue_module.o \ objs/src/event/modules/ngx_ff_module.o \ objs/src/core/ngx_regex.o \ objs/src/http/ngx_http.o \ objs/src/http/ngx_http_core_module.o \ objs/src/http/ngx_http_special_response.o \ objs/src/http/ngx_http_request.o \ objs/src/http/ngx_http_parse.o \ objs/src/http/modules/ngx_http_log_module.o \ objs/src/http/ngx_http_request_body.o \ objs/src/http/ngx_http_variables.o \ objs/src/http/ngx_http_script.o \ objs/src/http/ngx_http_upstream.o \ objs/src/http/ngx_http_upstream_round_robin.o \ objs/src/http/ngx_http_file_cache.o \ objs/src/http/ngx_http_write_filter_module.o \ objs/src/http/ngx_http_header_filter_module.o \ objs/src/http/modules/ngx_http_chunked_filter_module.o \ objs/src/http/modules/ngx_http_range_filter_module.o \ objs/src/http/modules/ngx_http_gzip_filter_module.o \ objs/src/http/ngx_http_postpone_filter_module.o \ objs/src/http/modules/ngx_http_ssi_filter_module.o \ objs/src/http/modules/ngx_http_charset_filter_module.o \ objs/src/http/modules/ngx_http_userid_filter_module.o \ objs/src/http/modules/ngx_http_headers_filter_module.o \ objs/src/http/ngx_http_copy_filter_module.o \ objs/src/http/modules/ngx_http_not_modified_filter_module.o \ objs/src/http/modules/ngx_http_static_module.o \ objs/src/http/modules/ngx_http_autoindex_module.o \ objs/src/http/modules/ngx_http_index_module.o \ objs/src/http/modules/ngx_http_auth_basic_module.o \ objs/src/http/modules/ngx_http_access_module.o \ objs/src/http/modules/ngx_http_limit_conn_module.o \ objs/src/http/modules/ngx_http_limit_req_module.o \ objs/src/http/modules/ngx_http_geo_module.o \ objs/src/http/modules/ngx_http_map_module.o \ objs/src/http/modules/ngx_http_split_clients_module.o \ objs/src/http/modules/ngx_http_referer_module.o \ objs/src/http/modules/ngx_http_rewrite_module.o \ objs/src/http/modules/ngx_http_proxy_module.o \ objs/src/http/modules/ngx_http_fastcgi_module.o \ objs/src/http/modules/ngx_http_uwsgi_module.o \ objs/src/http/modules/ngx_http_scgi_module.o \ objs/src/http/modules/ngx_http_memcached_module.o \ objs/src/http/modules/ngx_http_empty_gif_module.o \ objs/src/http/modules/ngx_http_browser_module.o \ objs/src/http/modules/ngx_http_upstream_hash_module.o \ objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \ objs/src/http/modules/ngx_http_upstream_least_conn_module.o \ objs/src/http/modules/ngx_http_upstream_keepalive_module.o \ objs/src/http/modules/ngx_http_upstream_zone_module.o \ objs/ngx_modules.o \ -ldl -lpthread -lcrypt -lpcre -lz \ -Wl,-E objs/src/os/unix/ngx_process_cycle.o: In function ngx_single_process_cycle':
/root/downloads/f-stack/app/nginx-1.11.10/src/os/unix/ngx_process_cycle.c:350: undefined reference to ff_run' objs/src/event/modules/ngx_ff_module.o: In function ff_mod_init':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:88: undefined reference to ff_init' objs/src/event/modules/ngx_ff_module.o: In function socket':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:102: undefined reference to ff_socket' objs/src/event/modules/ngx_ff_module.o: In function accept':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:203: undefined reference to ff_accept' objs/src/event/modules/ngx_ff_module.o: In function select':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:278: undefined reference to ff_select' objs/src/event/modules/ngx_ff_module.o: In function recv':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:158: undefined reference to ff_recv' objs/src/event/modules/ngx_ff_module.o: In function read':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:169: undefined reference to ff_read' objs/src/event/modules/ngx_ff_module.o: In function bind':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:114: undefined reference to ff_bind' objs/src/event/modules/ngx_ff_module.o: In function connect':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:125: undefined reference to ff_connect' objs/src/event/modules/ngx_ff_module.o: In function send':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:136: undefined reference to ff_send' objs/src/event/modules/ngx_ff_module.o: In function write':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:147: undefined reference to ff_write' objs/src/event/modules/ngx_ff_module.o: In function listen':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:180: undefined reference to ff_listen' objs/src/event/modules/ngx_ff_module.o: In function setsockopt':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:192: undefined reference to ff_setsockopt' objs/src/event/modules/ngx_ff_module.o: In function accept4':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:219: undefined reference to ff_accept' objs/src/event/modules/ngx_ff_module.o: In function close':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:230: undefined reference to ff_close' objs/src/event/modules/ngx_ff_module.o: In function writev':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:241: undefined reference to ff_writev' objs/src/event/modules/ngx_ff_module.o: In function readv':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:252: undefined reference to ff_readv' objs/src/event/modules/ngx_ff_module.o: In function ioctl':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:263: undefined reference to ff_ioctl' objs/src/event/modules/ngx_ff_module.o: In function kqueue':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:287: undefined reference to ff_kqueue' objs/src/event/modules/ngx_ff_module.o: In function kevent':
/root/downloads/f-stack/app/nginx-1.11.10/src/event/modules/ngx_ff_module.c:294: undefined reference to ff_kevent' collect2: error: ld returned 1 exit status make[1]: *** [objs/nginx] Error 1 make[1]: Leaving directory /root/downloads/f-stack/app/nginx-1.11.10'
make: *** [build] Error 2

init arp ring related issues

/* Create ring according to ports actually being used. */
    nb_ports = ff_global_cfg.dpdk.nb_ports;
    for (i = 0; i < nb_ports; i++) {
        uint8_t port_id = ff_global_cfg.dpdk.port_cfgs[i].port_id;

        for(i = 0; i < nb_procs; ++i) {
            snprintf(name_buf, RTE_RING_NAMESIZE, "ring_%d_%d", i, port_id);
            if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
                arp_ring[i][port_id] = rte_ring_create(name_buf,
                    ARP_RING_SIZE, socketid,
                    RING_F_SC_DEQ);
            } else {
                arp_ring[i][port_id] = rte_ring_lookup(name_buf);
            }

            /* === Here ====*/
            if (arp_ring[i][port_id] == NULL)
                rte_panic("create kni ring::%s failed!\n", name_buf);

            /* === And here ====*/
            if (rte_ring_lookup(name_buf) != arp_ring[i][port_id])
                rte_panic("lookup kni ring:%s failed!\n", name_buf);

            printf("create arp ring:%s success, %u ring entries are now free!\n",
                name_buf, rte_ring_free_count(arp_ring[i][port_id]));
        }
    }

I can not understand how this code have to do with kni ring, is this a typo? Or I understand wrong. Thanks

Cannot set socket fd to be nonblocking

Hi F-stack team, I recently got blocked when playing with f-stack. I found I cannot set the file descriptor to be nonblocking.
I am trying to use UDP in epoll mode. When a new event whose mask is EPOLLIN come, I then call the function ff_recvmsg() to read from the fd. However, ff_recvmsg is always blocking my program.
Even though I tried the following code, I still got blocked.

int flags = ff_fcntl(fd, F_GETFL, 0);
exit_if(flags<0, "fcntl failed");
int r = ff_fcntl(fd, F_SETFL, flags | O_NONBLOCK);
exit_if(r<0, "fcntl failed");

Do you have any idea about it?

worker keep crashing

Hi, team
I update f-stack just now, and it seems no worker can start.

# /usr/local/nginx_fstack/sbin/nginx
# tailf /usr/local/nginx_fstack/logs/error.log 
2017/09/04 11:38:24 [alert] 4778#0: worker process 4832 exited on signal 11 (core dumped)
2017/09/04 11:38:24 [alert] 4778#0: worker process 4835 exited on signal 11 (core dumped)
2017/09/04 11:38:25 [alert] 4778#0: worker process 4838 exited on signal 11 (core dumped)
2017/09/04 11:38:25 [alert] 4778#0: worker process 4841 exited on signal 11 (core dumped)
2017/09/04 11:38:25 [alert] 4778#0: worker process 4846 exited on signal 11 (core dumped)

my nginx.conf:

# root account is necessary.
user  root;
# should be equal to the lcore count of `dpdk.lcore_mask` in f-stack.conf.
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;

# path of f-stack configuration file, default: $NGX_PREFIX/conf/f-stack.conf.
fstack_conf f-stack.conf;

events {
    worker_connections  102400;
    use kqueue;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        off;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        access_log /dev/null;
        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}

and f-stack.conf:

[dpdk]
## Hexadecimal bitmask of cores to run on.
lcore_mask=1
## Port mask, enable and disable ports.
## Default: all ports are enabled.
#port_mask=1
channel=4
## Number of ports.
nb_ports=1
promiscuous=1
numa_on=1
## TCP segment offload, default: disabled.
tso=0
## HW vlan strip, default: enabled.
vlan_strip=1

## Port config section
## According to dpdk.nb_ports: port0, port1...
[port0]
addr=192.167.167.14
netmask=255.255.255.0
broadcast=192.167.167.255
gateway=192.167.167.254
## Packet capture path, this will hurt performance
#pcap=./a.pcap

## Kni config: if enabled and method=reject,
## all packets that do not belong to the following tcp_port and udp_port
## will transmit to kernel; if method=accept, all packets that belong to
## the following tcp_port and udp_port will transmit to kernel.
#[kni]
#enable=1
#method=reject
#tcp_port=80,443
#udp_port=53

## FreeBSD network performance tuning configurations.
## Most native FreeBSD configurations are supported.
[freebsd.boot]
hz=100

## Block out a range of descriptors to avoid overlap
## with the kernel's descriptor space.
## You can increase this value according to your app.
fd_reserve=1024

kern.ipc.maxsockets=262144

net.inet.tcp.syncache.hashsize=4096
net.inet.tcp.syncache.bucketlimit=100

net.inet.tcp.tcbhashsize=65536

[freebsd.sysctl]
#kern.ipc.somaxconn=65536
kern.ipc.somaxconn=32768
kern.ipc.maxsockbuf=16777216

net.inet.tcp.fast_finwait2_recycle=1
net.inet.tcp.sendspace=16384
net.inet.tcp.recvspace=8192
net.inet.tcp.nolocaltimewait=1
net.inet.tcp.cc.algorithm=htcp
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.sendbuf_auto=1
net.inet.tcp.recvbuf_auto=1
net.inet.tcp.sendbuf_inc=16384
net.inet.tcp.recvbuf_inc=524288
net.inet.tcp.inflight.enable=0
net.inet.tcp.sack=1
net.inet.tcp.blackhole=1
net.inet.tcp.msl=2000
net.inet.tcp.delayed_ack=0

net.inet.udp.blackhole=1
net.inet.ip.redirect=0

Do i miss something?

how to create a shared library base on libfstack.a?

gcc reports error, because the objects in libfstack.a need recompile with -fPIC, since f-stack depends on DPDK, so I'm not sure if it's enough to just recompile f-stack with -fPIC. Any advice on how to solve this problem? thx

enable sctp in fstack

hi, all, I am doing some work to enable sctp. But sctp create some kproc working thread.
Is there any suggestion about how to port this part?
Thanks in advance!

apr_poll: The timeout specified has expired (70007)

Hi f-stack maintainers,

I configured the addr, netmask, broadcast and gateway in config.ini, ping and curl -v http://x.x.x.x/ is ok(x.x.x.x is my server address), but when I run ab -n 10000 -c 20 http://x.x.x.x/ on client side, the above error occurred.

server side command as follows:

# ./start.sh -b example/helloworld -c config.ini
  • f-stack is the latest version.
  • CentOS 7.2.1511
  • gcc version 4.8.5
  • Intel Corporation Ethernet Controller 10-Gigabit X540-AT2
  • cpu 24 cores

Do I need to configure other fields of config.ini?
Thanks.

Rx queue configuration

Hi all,
Im using f-stack in an 10c16G kvm box.
When i started Nginx it seems dpdk's NIC driver in a vm only init with ONE rx/tx queue(tried both e1000 and virtio model in qemu) and the start scripts complains:

create mbuf pool on socket 0
create ring:arp_ring_0_0 success, 2047 ring entries are now free!
create ring:arp_ring_1_0 success, 2047 ring entries are now free!
create ring:arp_ring_2_0 success, 2047 ring entries are now free!
create ring:arp_ring_3_0 success, 2047 ring entries are now free!
create ring:arp_ring_4_0 success, 2047 ring entries are now free!
create ring:arp_ring_5_0 success, 2047 ring entries are now free!
create ring:arp_ring_6_0 success, 2047 ring entries are now free!
create ring:arp_ring_7_0 success, 2047 ring entries are now free!
EAL: Error - exiting with code: 1
  Cause: num_procs[8] bigger than max_rx_queues[1]

Be a totally newbie and not fimilar with the NIC drivers configurations in dpdk, my question is:
Is it possible to take advantage of multi-processes in a vm for f-stack, or what i missed?

没有找到ff_api.h!编译报错

In file included from src/core/nginx.c:8:0:
src/core/ngx_config.h:47:20: fatal error: ff_api.h: No such file or directory
#include "ff_api.h"
^
compilation terminated.
In file included from src/core/ngx_log.c:8:0:
src/core/ngx_config.h:47:20: fatal error: ff_api.h: No such file or directory
#include "ff_api.h"
^
compilation terminated.
make[1]: *** [objs/src/core/ngx_log.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [objs/src/core/nginx.o] Error 1
make[1]: Leaving directory `/data/f-stack/app/nginx-1.11.10'
make: *** [build] Error 2

dpdk installation error

Error occured when I was compiling dpdk using dpdk/tools/dpdk-setup.sh, both with x86_64-native-linuxapp-gcc and x86_64-native-linuxapp-clang.

  CC [M]  /home/cholerae/cxcode/f-stack/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.o
/home/cholerae/cxcode/f-stack/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c: In function ‘igb_kni_probe’:
/home/cholerae/cxcode/f-stack/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2475:30: error: ‘%d’ directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 11 [-Werror=format-truncation=]
        "%d.%d, 0x%08x, %d.%d.%d",
                              ^~
/home/cholerae/cxcode/f-stack/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2475:8: note: directive argument in the range [0, 65535]
        "%d.%d, 0x%08x, %d.%d.%d",
        ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/cholerae/cxcode/f-stack/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2473:4: note: ‘snprintf’ output between 23 and 43 bytes into a destination of size 32
    snprintf(adapter->fw_version,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        sizeof(adapter->fw_version),
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "%d.%d, 0x%08x, %d.%d.%d",
        ~~~~~~~~~~~~~~~~~~~~~~~~~~
        fw.eep_major, fw.eep_minor, fw.etrack_id,
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        fw.or_major, fw.or_build, fw.or_patch);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

[cholerae@x240s tools]$ gcc --version
gcc (GCC) 7.1.1 20170503 (Red Hat 7.1.1-1)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[cholerae@x240s tools]$ clang --version
clang version 3.9.1 (tags/RELEASE_391/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

[cholerae@x240s tools]$ uname -a
Linux x240s 4.11.0-2.fc26.x86_64 #1 SMP Tue May 9 15:24:49 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

add documents

1.requirment.
2.recommended configuration(hardware and software).
3.wiki.

Why nginx coredump on Suse12 ? Give me some advice, please!

SUSE 12SP1, x86_64, gcc version 4.8.5 (SUSE Linux) , OpenSSL 1.0.1i-fips
All following steps are OK, except the last one core dump.

  • cd ../
  • cd app/nginx-1.11.10
  • ./configure --prefix=/usr/local/nginx_fstack --with-ff_module
  • make
  • make install
  • cd ../../
  • ./start.sh -b /usr/local/nginx_fstack/sbin/nginx -c config.ini
    After start.sh executed, /usr/local/nginx_fstack/sbin/nginx failed with core dump as:
    (gdb) bt
    #0 0x0000000000000000 in ?? ()
    #1 0x00007ffff6af4ae1 in RAND_poll () from /lib64/libcrypto.so.1.0.0
    #2 0x00007ffff6af38b4 in ssleay_rand_bytes () from /lib64/libcrypto.so.1.0.0
    #3 0x00007ffff6af41d3 in ?? () from /lib64/libcrypto.so.1.0.0
    #4 0x00007ffff6b628e5 in ?? () from /lib64/libcrypto.so.1.0.0
    #5 0x00007ffff6b6300f in FIPS_drbg_instantiate () from /lib64/libcrypto.so.1.0.0
    #6 0x00007ffff6af4773 in RAND_init_fips () from /lib64/libcrypto.so.1.0.0
    #7 0x00007ffff6a6e110 in OPENSSL_init_library () from /lib64/libcrypto.so.1.0.0
    #8 0x00007ffff7dea92a in call_init.part () from /lib64/ld-linux-x86-64.so.2
    #9 0x00007ffff7deaa13 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
    #10 0x00007ffff7ddd1ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
    #11 0x0000000000000007 in ?? ()
    #12 0x00007fffffffe666 in ?? ()
    #13 0x00007fffffffe689 in ?? ()
    #14 0x00007fffffffe694 in ?? ()
    #15 0x00007fffffffe697 in ?? ()
    #16 0x00007fffffffe699 in ?? ()
    #17 0x00007fffffffe6ad in ?? ()
    #18 0x00007fffffffe6bb in ?? ()

compile error: fatal error: opt_vlan.h: No such file or directory

compile f-stack on CentOS7 get an error:

cc -c -O2 -fno-strict-aliasing -frename-registers -pipe -Wno-maybe-uninitialized -std=c99 -Wall -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-inline -Wcast-qual -Wno-pointer-sign -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unused-but-set-variable -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -DFSTACK -fstack-protector -D__FreeBSD__ -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-builtin -I/root/f-stack/lib/include -undef -imacros filtered_predefined_macros.h -nostdinc -I. -I/root/f-stack/lib/../freebsd -I./machine_include -I./opt -Werror -Wno-unused-variable /root/f-stack/lib/../freebsd/net/if_vlan.c
/root/f-stack/lib/../freebsd/net/if_vlan.c:48:22: fatal error: opt_vlan.h: No such file or directory
#include "opt_vlan.h"
^
compilation terminated.
make: *** [if_vlan.o] Error 1

f-stack nginx as a reverse proxy

Hi,
When f-stack runs as multi-core, multi-queue, and nginx acts as a web server, different IP will be assigned to different queues for processing and will be fixed. If nginx acts as a reverse proxy, will all requests from all IP be sent centrally to the same queue of the web server? How can this situation be solved?

Add VIP for a NIC

Hi, I want to set up multiple virtual IP for the DPDK bound NIC, and then the client can access the web service through the virtual IP.

I set it by tools/ifconfig/ifconfig.
cd tools/ifconfig
./ifconfig f-stack-0 192.168.0.6 netmask 255.255.0.0 alias

Then "./ifconfig" ,shows thst:
lo0: flags=8008<LOOPBACK,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
groups: lo
f-stack-0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=3<RXCSUM,TXCSUM>
ether 48:7b:6b:79:dc:cc
inet 192.168.0.3 netmask 0xffff0000 broadcast 192.168.255.255
inet 192.168.0.6 netmask 0xffff0000 broadcast 192.168.255.255

Now, I can ping 192.168.0.3 but can't ping 192.168.0.6.

helloworld down when it send a lot

wo change the helloworld to let it send very large size file, but it works down after sending 31*1024 chars.
i can not ping or connect again!
can you help me ?
and my hugepage info:
HugePages_Total: 498
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB

ff_dpdk_init函数的代码重复问题

int
ff_dpdk_init(int argc, char **argv)
{
if (ff_global_cfg.dpdk.nb_procs < 1 ||
ff_global_cfg.dpdk.nb_procs > RTE_MAX_LCORE ||
ff_global_cfg.dpdk.proc_id >= ff_global_cfg.dpdk.nb_procs ||
ff_global_cfg.dpdk.nb_procs < 0) {
....

ff_global_cfg.dpdk.nb_procs < 1
ff_global_cfg.dpdk.nb_procs < 0

这个比较是不是重复了? 怎么考虑的?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.