Commit Graph

72 Commits

Author SHA1 Message Date
jfb8856606 171a039c22 modify permission of nginx-1.16.0's configure. 2019-07-01 19:42:57 +08:00
jfb8856606 e296384d5a modify `nginx.conf`'s default config to response date directly, not file. 2019-07-01 19:24:53 +08:00
jfb8856606 5af66259d5 add `make install` and `make uninstall` in f-tack's lib and tools, refer #396 2019-07-01 19:18:54 +08:00
fengbojiang(姜凤波) fdf61a3fd2 Nginx: add nginx1.16.0 that support TLSv1.3, refer #340. 2019-06-28 15:29:30 +08:00
chenwei 3b18e987d1 Nginx: fixbug, support "master_process off". 2018-11-06 12:51:46 +08:00
chenwei bbae7c2f78 Nginx: fixbug, stack-buffer-overflow, refer to #286. 2018-11-06 12:06:29 +08:00
10077240 37324d912f FreeBSD define IP_BINDANY in freebsd/netinet/in.h
Fstack should only support IP_BINDANY.
2018-10-23 15:18:03 +08:00
fengbojiang 1c1eafbf32 fix a typo 2018-08-16 16:25:57 +08:00
10077240 b43e0dde49 replace __linux__ with HAVE_FF_KQUEUE
Only f-stack redis server need bind cpu,  and forked process will inherit it.
2018-08-09 07:16:44 +08:00
10077240 9518765b1f reset cpu affinity when new process forked.
New forked process should not compete same core with redis server.
2018-08-08 07:40:39 +08:00
fengbojiang efb6796dac Fix #251:Compiling errors on Ubuntu.
On Ubuntu 16.04/18.04, fixed compile error with -Wunused-result
and -Wimplicit-fallthrough.
2018-07-23 18:22:09 +08:00
fengbojiang(姜凤波) 5c6bf25f18 Fixed redis' compile error of 'struct timespec' when use gcc7.3.0 on ubuntu 18.04. 2018-07-10 16:08:05 +08:00
whl739 524e801cfb Nginx: hijack `shutdown`.
Fix typo in previous commit.
2018-06-21 17:25:56 +08:00
whl739 a29bb116db Nginx: hijack `shutdown`.
In some cases, nginx will call `ngx_shutdown_socket`, so we need to hijack `shutdown`.
2018-06-21 17:22:59 +08:00
chenwei 4e4a28b584 Nginx: fixbug, hijack `getpeername` and `getsockname`. 2018-05-27 12:29:26 +08:00
logwang 2bfe3f2e55 DPDK: upgrade to 17.11.2 LTS.
Changes:
1. This version is downloaded from
https://fast.dpdk.org/rel/dpdk-17.11.2.tar.xz.
2. Adapt the new interface `rte_ring_dequeue_burst`.
3. Change the type of `port_id` from uint8_t to uint16_t.
4. Just link libdpdk.a instead of the other libaries.
5. Install libnuma-dev first.
6. Update the documents.
2018-05-15 17:49:22 +08:00
chenwei 0eb653e5ef Nginx: fixbug, support `NGX_PROCESS_HELPER` .e.g cache, refer to #142 2018-05-04 17:02:02 +08:00
chenwei bc0822cf2e Nginx: fixbug, hijack `__recv_chk`.
Nginx maybe call `__recv_chk` with https because of _FORTIFY_SOURCE.
Refer to #179.
See _FORTIFY_SOURCE (since glibc 2.3.4)
2018-04-16 18:52:58 +08:00
chenwei bcb122a7a7 Nginx: bugfix, shouldnot pollute `socket type` 2018-04-10 17:28:10 +08:00
chenwei 9012784489 Nginx: some logs are no longer needed on nginx-fstack. 2018-04-09 15:42:21 +08:00
陈威 b62e74d7c3 Nginx : a more friendly hint
If the f-stack primary process hasn't been initialized successful, the nginx master gives a more friendly hint.
2018-03-22 15:41:17 +08:00
chenwei 917b95625c Nginx: bugfix, secondary worker should be spawned after primary worker completing initialization of fstack(dpdk)
When starting nginx with mutil-processes, secondary worker may be spawned before primary worker completing initialization of fstack(dpdk), so errors occurred, for one, in kni.
2018-03-12 17:13:02 +08:00
logwang bb6ad8038f Set the default configuration `kern.ncallout`(number of entries in
callwheel and size of timeout() preallocation).
2018-03-01 16:07:35 +08:00
chenwei 8eec41ee4c Nginx : bugfix, changing `listening socket type` in cycle may lead to errors.
Uses a temporaty variable to hold of potentially changing socket type but
does not modify `listening socket type` in cycle.
2018-03-01 15:39:33 +08:00
chenwei 99c10b6c22 Nginx: revise indent. 2018-02-24 17:08:59 +08:00
chenwei 7f2b0d8fb1 Nginx : add a creation flag SOCK_FSTACK(create-fstack-socket) for socket()
1. `#define SOCK_FSTACK 0x1000`
2. when we want to create socket by fstack, we code like this :
`s = ngx_socket(domain, type | SOCK_FSTACK , protocol);`
2018-02-24 16:45:10 +08:00
chenwei 3d7e1b6b15 Nginx : directive proxy_kernel_network_stack
1. Add a new directive proxy_kernel_network_stack :
    Syntax: 	proxy_kernel_network_stack on | off;
    Default: 	proxy_kernel_network_stack off;
   Context: 	http, stream, mail, server
  This directive is available only when NGX_HAVE_FF_STACK is defined.
  Determines whether proxy should go throught kernel network stack or fstack.
2.Update F-Stack_Nginx_APP_Guide.md
2018-02-05 15:55:20 +08:00
chenwei d65c1f94b4 Nginx : replace macro with inline function to implement ```ngx_ff_skip_listening_socket``` 2018-02-01 16:30:46 +08:00
chenwei 19acab5d5f Nginx: hijack `recvmsg`.
Since Nginx calls `recvmsg` in stream with udp, we must
hijack this function, so that the network IO can pass through
f-stack.
2018-01-31 13:47:44 +08:00
chenwei c41d837fae Nginx : ngx_configure_listening_sockets
1. Nginx based on fstack delays setting up server on fstack until ngx_worker_process_init. ngx_configure_listening_sockets should as well.
2. FStack does not support IP_PKTINFO
2018-01-31 13:37:58 +08:00
chenwei 8c19c41dfc Nginx : Fix Compile error
Fix compile error when configure nginx with --with-stream
2018-01-31 09:02:25 +08:00
chenwei fc3a7422fa Nginx: Restore ngx_get_connection and ngx_free_connection
The code that we used to preserve ngx_get_connection and ngx_free_connection thread safety , is not necessary now.
2018-01-29 16:41:35 +08:00
陈威 5eaa396dce Nginx: Cut out code about poll-kernel frequency
Cut out unreasonable code about poll-kernel frequency
2018-01-26 17:14:13 +08:00
陈威 3fc9d4594d Nginx: Restore unexpected Comment 2018-01-17 17:33:01 -06:00
chenwei 57f062150d Nginx : Get rid of "ff_host" thread, so single thread is used for both fstack and kernel. 2018-01-17 17:51:08 +08:00
logwang a20feca0fb Nginx: fix crash when server configuration item [`kernel_network_stack`] is on and uses `proxy_pass`.
When nginx is configured like this:
```
server {
    listen       8000;
    kernel_network_stack on;
    location / {
        proxy_pass http://127.0.0.1:8080/;
    }
}
```
nginx will crash, becasue kernel network stack is handled in a single thread, but we have hijacked all the socket apis, it causes that all apis enter to f-stack's path which is in main thread.
2018-01-11 18:20:41 +08:00
chenwei 65074cf4f4 Nginx : The I/O functions with glue code may be called before ngx_max_sockets is initialized, fix this error. 2017-12-14 15:07:30 +08:00
chenwei fb8ab126f5 Nginx : Follow nginx programming convention - indent. 2017-12-14 14:55:36 +08:00
chenwei 03e8baeb66 rename "timers" and "events_posted" 2017-12-09 15:24:58 +08:00
chenwei a7886ec8af rename ngx_event_actions_dy to ngx_ff_host_event_actions 2017-12-09 15:02:13 +08:00
chenwei 6b647d46a9 rename module module ff_channel to ff_host_event 2017-12-09 14:55:48 +08:00
chenwei d7bd9e987b Using a more friendly name : belong_to_aeds to belong_to_host 2017-12-09 14:18:11 +08:00
chenwei 4b4f027dad Using a more friendly name
1.  remove the assert(ff_fdisused(sockfd))
2017-12-09 14:07:08 +08:00
chenwei 70bb2888cb Nginx: support kernel network stack, so we can do what fstack can't do,
e.g. unix socket, ipc (with APP on kernel network stack), packet from kernel network stack.
1. Add a new directive kernel_network_stack :
    Syntax: 	kernel_network_stack on | off;
    Default: 	kernel_network_stack off;
   Context: 	http, server
  This directive is available only when NGX_HAVE_FF_STACK is defined.
  Determines whether server should run on kernel network stack or fstack.
2. Use a simpler and  more effective solution to discriminate fstack fd(file descriptor, only socket for now) from kernel fd.
2017-12-08 18:32:08 +08:00
logwang ffdb15be57 Configuration: optimize the description. 2017-12-01 16:53:57 +08:00
logwang 5ac59bc49a Micro_thread: convert encoding of source files and remove chinese comments. 2017-11-20 22:39:00 +08:00
logwang b1bb619a90 Nginx: fix that worker may crash when reload or recv signals. 2017-11-20 17:06:02 +08:00
logwang 20be49f608 Nginx: hijack `read` and `write`.
Since libssl calls `read` and `write` when SSL handshake, we must
hijack these two functions, so that the network IO can pass through
f-stack.
2017-09-26 17:00:20 +08:00
logwang 1c388a5257 Update f-stack.conf of nginx.
Close #81.
2017-09-25 12:03:26 +08:00
logwang 63fb3d1fbf Fix nginx coredump on virtio vm and support kni.
1.close #67.
2.replace ff_primary process to primary worker process(the first one to
start and the last one to exit).
3.it's not graceful to reload.
2017-09-05 20:24:51 +08:00