diff --git a/.gitignore b/.gitignore index 5eb175afa..292f86156 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ *.la *.o *.so +*.swap diff --git a/LICENSE b/LICENSE index db600d5a8..f4dfaea0b 100644 --- a/LICENSE +++ b/LICENSE @@ -22,7 +22,7 @@ BSD 3-Clause, Copyright(c) 2010-2017 Intel Corporation.All rights reserved. 2.FreeBSD -BSD 2-Clause, Copyright 1992-2016 The FreeBSD Project. All rights reserved. +BSD 2-Clause, Copyright 1992-2017 The FreeBSD Project. All rights reserved. 3.Libplebnet diff --git a/README.md b/README.md index cbe8f0a09..532e59ea4 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ![](F-Stack.png) ## Introduction -With the rapid development of NIC, the poor performance of data packets processing with Linux kernel has become the bottleneck. However, the rapid development of the Internet needs high performance of network processing, kernel bypass has caught more and more attention. There are various similar technologies appear, 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 copy, thread scheduling, system calls and interrupt. Furthermore, kernel bypass can achieve higher performance with multi optimizing methods. Within various techniques, DPDK has been widely used because of its more thorough isolation from kernel scheduling and active community support. +With the rapid development of NIC, the poor performance of data packets processing with Linux kernel has become the bottleneck. However, the rapid development of the Internet needs high performance of network processing, kernel bypass has caught more and more attentions. There are various similar technologies appear, 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 its more thorough isolation from kernel scheduling and active community support. -[F-Stack](http://www.f-stack.org/?from=github) is an open source network framework with high performance based on DPDK. With follow characteristics +[F-Stack](http://www.f-stack.org/?from=github) is an open source network framework with high performance based on DPDK. With following characteristics -1. Ultra high network performance which can achieve network card under full load, 10 million concurrent connection, 5 million RPS, 1 million CPS. +1. Ultra high network performance which can achieve network card under full load, 10 million concurrent connections, 5 million RPS, 1 million CPS. 2. Transplant FreeBSD 11.01 user space stack, provides a complete stack function, cut a great amount of irrelevant features. Therefore greatly enhance the performance. 3. Support Nginx, Redis and other mature applications, service can easily use F-Stack 4. With Multi-process architecture, easy to extend diff --git a/doc/F-Stack_API_Reference.md b/doc/F-Stack_API_Reference.md index 571737653..ffd27d0a0 100644 --- a/doc/F-Stack_API_Reference.md +++ b/doc/F-Stack_API_Reference.md @@ -195,21 +195,21 @@ However, it is currently only supported before F-Stack is started. Use connection pool to send and recv tcp packet, keep-alive default are 10 mintues. The parameter of buf can't use `static`. ​ - enum MT\_TCP\_CONN\_TYPE + enum MT_TCP_CONN_TYPE { - MT\_TCP\_SHORT = 1, - MT\_TCP\_LONG = 2, - MT\_TCP\_SHORT\_SNDONLY = 3, - MT\_TCP\_LONG\_SNDONLY = 4, - MT\_TCP\_BUTT + MT_TCP_SHORT = 1, + MT_TCP_LONG = 2, + MT_TCP_SHORT_SNDONLY = 3, + MT_TCP_LONG_SNDONLY = 4, + MT_TCP_BUTT }; - int mt\_tcpsendrcv\_ex(struct sockaddr_in* dst, void* pkg, int len, void* rcv_buf, int* buf_size, int timeout, MtFuncTcpMsgLen func, MT_TCP_CONN_TYPE type = MT_TCP_LONG); + int mt_tcpsendrcv_ex(struct sockaddr_in* dst, void* pkg, int len, void* rcv_buf, int* buf_size, int timeout, MtFuncTcpMsgLen func, MT_TCP_CONN_TYPE type = MT_TCP_LONG); Tcp send and recv interface, you can choose if the connection is keep-alive or close.The parameter of buf can't use `static`. - int mt\_tcpsendrcv\_ex(struct sockaddr_in* dst, void* pkg, int len, void*& rcv_buf, int& recv_pkg_size, int timeout, MtFuncTcpMsgChecker check_func, void* msg_ctx=NULL, MT_TCP_CONN_TYPE type = MT_TCP_LONG, bool keep_rcv_buf=false); + int mt_tcpsendrcv_ex(struct sockaddr_in* dst, void* pkg, int len, void*& rcv_buf, int& recv_pkg_size, int timeout, MtFuncTcpMsgChecker check_func, void* msg_ctx=NULL, MT_TCP_CONN_TYPE type = MT_TCP_LONG, bool keep_rcv_buf=false); Tcp send and recv interface, you can choose if the connection is keep-alive or close.The parameter of buf can't use `static`. ​