Commit Graph

349 Commits (173e66311e0c2d4e64661f29e064a9626f971e2e)

Author SHA1 Message Date
logwang 1cb22d0a41 Merge pull request #214 from chadwill/master
Nginx: fixbug, hijack `getpeername` and `getsockname`.
2018-05-28 12:03:07 +08:00
chenwei 4e4a28b584 Nginx: fixbug, hijack `getpeername` and `getsockname`. 2018-05-27 12:29:26 +08:00
logwang deed089a75 travis-ci:fix the permission of dpdk's shell files. 2018-05-15 20:43:22 +08:00
logwang 5150e168ac travis-ci: update the dependences and clean cache. 2018-05-15 20:17:42 +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
logwang 5e5c25c329 kern_timeout: decrease the cpu usage of timer.
There's a bug of last version, every tick, the timer will traverse all the
entries in callwheel, when lots of connections comming, the callout
process will use lots of cpu resources.

This commit fixes it, every tick, check the bucket which is hashed with current
tick, if there are entries, compare the callout tick, and invoke
callbacks.
2018-05-10 17:53:18 +08:00
logwang 87b869fb7a Merge pull request #197 from chadwill/master
Nginx: fixbug, support process `NGX_PROCESS_HELPER` .e.g cache, refer to #142
2018-05-04 17:34:46 +08:00
chenwei 0eb653e5ef Nginx: fixbug, support `NGX_PROCESS_HELPER` .e.g cache, refer to #142 2018-05-04 17:02:02 +08:00
logwang b428cee7e5 Merge pull request #194 from ouliuquan/patch-1
Update vnode_if.src
2018-04-27 18:08:14 +08:00
ouliuquan 744da4ea50 Update vnode_if.src
Missing end-of-line ; in " IN struct task *task;   ".
2018-04-27 17:42:22 +08:00
logwang 19e3e88159 Merge pull request #192 from chadwill/master
Update F-Stack_Nginx_APP_Guide.md
2018-04-26 15:36:42 +08:00
陈威 55d550ae80 Update F-Stack_Nginx_APP_Guide.md
The context of `schedule_timeout` is `main`.
2018-04-26 14:35:04 +08:00
logwang 1b3f93b30a Merge pull request #191 from jbwyatt4/patch-1
More grammar and sentence rewrites
2018-04-23 15:06:14 +08:00
jbwyatt4 eb6b6fa602 spelling error 2018-04-20 12:25:22 -07:00
jbwyatt4 aa833a4a07 More grammar and sentence rewrites 2018-04-20 10:58:32 -07:00
logwang e14c25b01c Merge pull request #190 from jbwyatt4/master
Grammar and other fixes
2018-04-20 10:50:10 +08:00
jbwyatt4 9ece0b02d0 Grammar and other fixes 2018-04-19 05:45:35 -07:00
logwang e35f03d569 Merge pull request #189 from chadwill/master
Nginx: fixbug, hijack `__recv_chk`.
2018-04-16 19:47:33 +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
logwang 19a141c455 Merge pull request #186 from chadwill/master
Nginx: bugfix, shouldnot pollute `socket type`
2018-04-10 19:18:33 +08:00
chenwei bcb122a7a7 Nginx: bugfix, shouldnot pollute `socket type` 2018-04-10 17:28:10 +08:00
logwang bf55da0b2d Merge pull request #183 from chadwill/master
Nginx: some logs are no longer needed on nginx-fstack.
2018-04-09 16:36:21 +08:00
chenwei 9012784489 Nginx: some logs are no longer needed on nginx-fstack. 2018-04-09 15:42:21 +08:00
logwang da7b45f1e7 Merge pull request #182 from chadwill/master
API: [BugFix] On success, `ff_sendmsg` return the number of chars sent.
2018-04-09 11:55:13 +08:00
chenwei d16cce93d7 API: [BugFix] On success, `ff_sendmsg` return the number of chars sent. 2018-04-09 11:22:26 +08:00
logwang 16ddcf4653 Merge pull request #171 from chadwill/master
Nginx :  a more friendly hint. Refer to #169.
2018-03-22 15:47:00 +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
logwang 5c98936cc5 Merge pull request #170 from yangqiang71/master
🐛 ai->ai_addr should be (struct sockaddr *)(ai+1)
2018-03-19 11:29:23 +08:00
root 6b283f8e27 🐛 ai->ai_addr should be (struct sockaddr *)(ai+1) 2018-03-19 10:40:01 +08:00
logwang 459d8e3935 Merge pull request #169 from chadwill/master
Nginx: bugfix, secondary worker should be spawned after primary completing initialization of fstack(dpdk)
2018-03-12 19:46:23 +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
logwang 92b0c746e9 Merge pull request #166 from chadwill/master
Nginx : bugfix, changing `listening socket type` may lead to errors.
2018-03-01 16:03:28 +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
logwang 895b4b629f Merge pull request #161 from chadwill/master
Nginx : directive proxy_kernel_network_stack
2018-02-24 18:03:29 +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
陈威 f8aeb5ebf4 Update F-Stack_Nginx_APP_Guide.md 2018-02-09 20:09:05 +08:00
陈威 33f57e6e77 Merge pull request #1 from chadwill/develop
Nginx :directive ```proxy_kernel_network_stack```
2018-02-06 01:56:24 -06:00
logwang 6213bcc6e0 Merge pull request #159 from chadwill/master
Nginx :  ngx_configure_listening_sockets and hijack `recvmsg`
2018-02-06 15:22:14 +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 6c629acab4 API : ff_sendmsg, use transient variables to avoid polluting user's data. 2018-02-02 17:58:17 +08:00
chenwei d8829f7e5a API : fix bug of ff_sendmsg and ff_recvmsg
freebsd and linux have a different "struct sockaddr".
In ff_recvmsg and ff_recvmsg, ```msg->msg_name```,which can refer to address, can be expected to be converted .
2018-02-02 15:28:58 +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
logwang 94e48a9b34 Merge pull request #158 from chadwill/master
Nginx : Fix Compile error with `--with-stream`
2018-01-31 12:45:26 +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
logwang 13270ed0ec Merge pull request #156 from chadwill/patch-1
Update F-Stack_Nginx_APP_Guide.md
2018-01-29 19:01:26 +08:00
logwang 676ac0fa5b Merge pull request #151 from chadwill/master
Nginx : Get rid of "ff_host" thread
2018-01-29 19:01:11 +08:00